Showing posts with label multiple. Show all posts
Showing posts with label multiple. Show all posts

Friday, March 30, 2012

More on Full Text Searching across multiple tables

Imagine you're building a search for a movie database which you wanted to index actors, quotes from scenes and movie names into a single search.... how do you accomplish this using full text search? The closest I can think of is... (for a sample search for "Walken"

select RANK, actorId as Id from FREETEXTTABLE( actors, *, 'ISABOUT (+ WALKEN + WEIGHT(1.0))') a JOIN actors b on a.[key] = b.actorid
UNION ALL
select RANK, sceneId as Id from FREETEXTTABLE( scenes, *, 'ISABOUT (+ WALKEN + WEIGHT(1.0))') a JOIN scenes b on a.[key] = b.sceneId
UNION ALL
select RANK, movieId as Id from FREETEXTTABLE( movie, *, 'ISABOUT (+ WALKEN + WEIGHT(1.0))') a JOIN movie b on a.[key] = b.movieId

But it doesn't rank correctly. Suggestions?

How do you want the ranking to work?

What do you want to return? have you tried

select RANK, actorId as Id from CONTAINSTABLE( actors, *, 'WALKEN') a JOIN actors b on a.[key] = b.actorid
UNION ALL
select RANK, sceneId as Id from CONTAINSTABLE( scenes, *, 'WALKEN') a JOIN scenes b on a.[key] = b.sceneId
UNION ALL
select RANK, movieId as Id from CONTAINSTABLE( movie, *, 'WALKEN') a JOIN movie b on a.[key] = b.movieId

The other thing to note is that RANK is not a fixed number it is relative to a number of factors, largely it is related to the batch of data a record was indexed with. So if you have records being indexed in differing batchs you can end up with odd ranking.

Bottom linke is a rank from tableA can't be used to compare with a rank from tableB

|||Ideally, i'd like to return the item(s), in order that match the query string. This means if the scene is a closer match than the movie, the scene is returned first. Each one should have the id returned which i can then construct a result from.|||

Unfortunately you can't use the rank from one index to compare with a rank from another index.

Have a lookin BOL under the heading "Understanding Ranking "

|||Right, what i'm looking for is a solution that will work across multiple tables... any suggestions?

Friday, March 23, 2012

monthly database merging

Hi,

I have to set up a project in SQLServer Express that will allow the export of tables from multiple PC's running SQLServer Express each month.

These have to be loaded into a single identical database on SQLServer Express each month for combined reporting.

so its basicaly

insert update on PC

export

import overlaying last months data (handle dup keys from the other pc's etc)

report

I've had a look at the SQLServer replication docs and got confused....

So if anyone can point me at appropriate documentation, or suggest a good method for this it would be appreciated

Thanks

SQL Server 2005 Express to SQL Server 2005 Express does NOT support replication. However there is a Import/Export tool (DTSWizard.exe) included with the Express Toolkit (Note: Requires SQL Express SP1 or higher.)

Download the Express Toolkit (and SQL Express SP2) here: http://msdn.microsoft.com/vstudio/express/sql/download/

After installing the toolkit, the Import/Export tool (called DTSWizard.exe) is located at:

"C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTSWizard.exe".

Add a 'shortcut to SSMSE: [Tools], [External Tools], name and add the shortcut by linking to the DTS file above.

In order to Schedule the process, you may have to employ the Windows Scheduler and add a Task that will run DTSRun.exe.

I recommend creating 'staging' tables, identical schemas to the actual tables. Load your data into the staging tables, then you can move the conforming data to the actual tables, leaving behind the non-conforming data for 'clean-up'.

|||

Thanks

Peter

monthly database merge

Hi,

I have to set up a project in SQLServer Express that will allow the export of tables from multiple PC's running SQLServer Express each month.

These have to be loaded into a single identical database on SQLServer Express each month for combined reporting.

so its basicaly

insert update on PC

export

import overlaying last months data (handle dup keys from the other pc's etc)

report

I've had a look at the SQLServer replication docs and got confused....

Can I do this with replication ?

So if anyone can point me at appropriate documentation, or suggest a good method for this it would be appreciated

Thanks

Yes, it's possible to do it with replication.

Look up the topic on merge replication on MSDN.

Also check out the following links for some additional info:

http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1527294&SiteID=17

http://msdn2.microsoft.com/en-us/library/ms151819.aspx

Gary

|||

Hello Peter,

Express Edition is not able to be a Publisher. It's capable of being a Subscriber only.

Check header "Integration and Interoperability" from the following link:

Features Comparison:

http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx

and these links to learn more about SQL Server Replication from BOL:

Replication Basics for Express Edition:

http://msdn2.microsoft.com/en-us/library/ms165700.aspx

SQL Server Replication:

http://msdn2.microsoft.com/en-us/library/ms151198.aspx

Ekrem ?nsoy

|||

Unfortunatly that was the documentation that confused me. Is there something a little more practical and less theoretical around.?

|||

The Remote PC's in my system are self sufficient (ie dont need recieve data back from the merge) and are not physically connected to the machine that aggregates the data.

The documentation seems to imply that although I can set up a copy of SQLServer Express to merge the data recieved on CD from the remote sites, that I cannot set up the SQLServer Express remote sites to generate the replication data to the CD's

Do you agree with that statement, from your experiance?

Monday, March 19, 2012

monitoring servers

Is there a way (script, tool, whatever) that I can monitor sql servers
and services on multiple different servers. Basically I want on screen
that can display that status of many sql servers and services on
multiple servers.
Thanks !bringmewater@.gmail.com a crit:

> Is there a way (script, tool, whatever) that I can monitor sql servers
> and services on multiple different servers. Basically I want on screen
> that can display that status of many sql servers and services on
> multiple servers.
>
Hello,
I've used Nagios for this purpose. You can have a look at
http://www.babaluga.org/doku.php/sq...r/outils/nagios for some notes
I've taken about how to do it.
Rudi Bruchez, MCDBA
http://www.babaluga.com/|||excellent! thanks
Rudi Bruchez wrote:
> bringmewater@.gmail.com a =E9crit:
>
> Hello,
> I've used Nagios for this purpose. You can have a look at
> http://www.babaluga.org/doku.php/sq...r/outils/nagios for some notes
> I've taken about how to do it.
>=20
> --=20
> Rudi Bruchez, MCDBA
> http://www.babaluga.com/

Monitoring replication from subscriber

Hi,
I have a replication scenario where multiple laptops merge replicate with a
central server. The subscriptions are set up as push subscriptions on the
distributor. My users want a tool to tell when they last replicated, and if
possible, how many records are waiting to be replicated. They need this
while disconnected from the server. Is there a way to get this information,
without having access to the publisher/distributor?
Thanks,
John Loveland
John,
have a look on my site for a script to find pending merge changes. There is
some discussion about the reliability of the data in it, but I've found it a
useful bit of data to use.
For the last time merged using a push, perhaps look at
sysmergesubscriptions.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul,
Thanks. That looks like exactly what I need.
John Loveland
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:%23A7Ma05FGHA.2568@.TK2MSFTNGP10.phx.gbl...
> John,
> have a look on my site for a script to find pending merge changes. There
> is some discussion about the reliability of the data in it, but I've found
> it a useful bit of data to use.
> For the last time merged using a push, perhaps look at
> sysmergesubscriptions.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>

Friday, March 9, 2012

Monitor Table Activity

Dear All,
I want to Monitor a table or multiple table activities with the follwing
results.
1. Previous Value
2. New Value
3. Table Row Changed
Thanks in advanceHi,
You have write your own triggers for Insert and Update actions.
Thanks
Hari
MCDBA
"Syed Zulfiqar" <zulfiqar_syed@.hotmail.com> wrote in message
news:OB4LyN#FEHA.3188@.TK2MSFTNGP10.phx.gbl...
> Dear All,
> I want to Monitor a table or multiple table activities with the follwing
> results.
> 1. Previous Value
> 2. New Value
> 3. Table Row Changed
> Thanks in advance
>|||THere is also a tool that Lumigent makes which analyzes the T-Log, etc which
( I beleive) can do what you wish... Integra ( www.lumigent.com)
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Syed Zulfiqar" <zulfiqar_syed@.hotmail.com> wrote in message
news:OB4LyN%23FEHA.3188@.TK2MSFTNGP10.phx.gbl...
> Dear All,
> I want to Monitor a table or multiple table activities with the follwing
> results.
> 1. Previous Value
> 2. New Value
> 3. Table Row Changed
> Thanks in advance
>|||I have just been playing around with the demo if this software and it seems
really good. Certainly look slike it will save me the many hours of
building an audit trail into my application!
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:OmW4dk%23FEHA.576@.TK2MSFTNGP11.phx.gbl...
> THere is also a tool that Lumigent makes which analyzes the T-Log, etc
which
> ( I beleive) can do what you wish... Integra ( www.lumigent.com)
>
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Computer Education Services Corporation (CESC), Charlotte, NC
> www.computeredservices.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Syed Zulfiqar" <zulfiqar_syed@.hotmail.com> wrote in message
> news:OB4LyN%23FEHA.3188@.TK2MSFTNGP10.phx.gbl...
>

Monitor Table Activity

Dear All,
I want to Monitor a table or multiple table activities with the follwing
results.
1. Previous Value
2. New Value
3. Table Row Changed
Thanks in advance
Hi,
You have write your own triggers for Insert and Update actions.
Thanks
Hari
MCDBA
"Syed Zulfiqar" <zulfiqar_syed@.hotmail.com> wrote in message
news:OB4LyN#FEHA.3188@.TK2MSFTNGP10.phx.gbl...
> Dear All,
> I want to Monitor a table or multiple table activities with the follwing
> results.
> 1. Previous Value
> 2. New Value
> 3. Table Row Changed
> Thanks in advance
>
|||THere is also a tool that Lumigent makes which analyzes the T-Log, etc which
( I beleive) can do what you wish... Integra ( www.lumigent.com)
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Syed Zulfiqar" <zulfiqar_syed@.hotmail.com> wrote in message
news:OB4LyN%23FEHA.3188@.TK2MSFTNGP10.phx.gbl...
> Dear All,
> I want to Monitor a table or multiple table activities with the follwing
> results.
> 1. Previous Value
> 2. New Value
> 3. Table Row Changed
> Thanks in advance
>
|||I have just been playing around with the demo if this software and it seems
really good. Certainly look slike it will save me the many hours of
building an audit trail into my application!
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:OmW4dk%23FEHA.576@.TK2MSFTNGP11.phx.gbl...
> THere is also a tool that Lumigent makes which analyzes the T-Log, etc
which
> ( I beleive) can do what you wish... Integra ( www.lumigent.com)
>
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Computer Education Services Corporation (CESC), Charlotte, NC
> www.computeredservices.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Syed Zulfiqar" <zulfiqar_syed@.hotmail.com> wrote in message
> news:OB4LyN%23FEHA.3188@.TK2MSFTNGP10.phx.gbl...
>