Showing posts with label index. Show all posts
Showing posts with label index. Show all posts

Wednesday, March 7, 2012

Copying a full-text index from 1 DB to another...

Hi everyone,
I noticed that when I did an export on a database (lets call it DB_a)
to another one (lets call it DB_b) it did not copy over the full text
index (FTI) that was on DB_a.
Is there anyway I can get the FTI from DB_a to be copied over to DB_b
without having to rebuild the FTI on DB_b'
Would appreciate any comments/hints/user-experience that you may like
to share.
Thanking you,
Al.What version of SQL Server are you using. If both servers are SQL Server
2005 then detach/attach should work fine.
almurph@.altavista.com wrote in
news:1153478984.289344.12530@.i3g2000cwc.googlegroups.com:

> I noticed that when I did an export on a database (lets call it
> DB_a)
> to another one (lets call it DB_b) it did not copy over the full text
> index (FTI) that was on DB_a.
> Is there anyway I can get the FTI from DB_a to be copied over to
> DB_b
> without having to rebuild the FTI on DB_b'
> Would appreciate any comments/hints/user-experience that you may
> like
> to share.
Ole Kristian Bangs
MCT, MCDBA, MCDST, MCSE:Security, MCSE:Messaging, MCTS, MCITP|||HI
For SQL 2000 you may want to look at http://support.microsoft.com/kb/240867/
and other methods and useful information about moving/copying databases may
be found at http://support.microsoft.com/kb/314546
John
"almurph@.altavista.com" wrote:

> Hi everyone,
>
> I noticed that when I did an export on a database (lets call it DB_a)
> to another one (lets call it DB_b) it did not copy over the full text
> index (FTI) that was on DB_a.
> Is there anyway I can get the FTI from DB_a to be copied over to DB_b
> without having to rebuild the FTI on DB_b'
> Would appreciate any comments/hints/user-experience that you may like
> to share.
> Thanking you,
> Al.
>

Copying a full-text index from 1 DB to another...

Hi everyone,
I noticed that when I did an export on a database (lets call it DB_a)
to another one (lets call it DB_b) it did not copy over the full text
index (FTI) that was on DB_a.
Is there anyway I can get the FTI from DB_a to be copied over to DB_b
without having to rebuild the FTI on DB_b'
Would appreciate any comments/hints/user-experience that you may like
to share.
Thanking you,
Al.What version of SQL Server are you using. If both servers are SQL Server
2005 then detach/attach should work fine.
almurph@.altavista.com wrote in
news:1153478984.289344.12530@.i3g2000cwc.googlegroups.com:
> I noticed that when I did an export on a database (lets call it
> DB_a)
> to another one (lets call it DB_b) it did not copy over the full text
> index (FTI) that was on DB_a.
> Is there anyway I can get the FTI from DB_a to be copied over to
> DB_b
> without having to rebuild the FTI on DB_b'
> Would appreciate any comments/hints/user-experience that you may
> like
> to share.
--
Ole Kristian Bangås
MCT, MCDBA, MCDST, MCSE:Security, MCSE:Messaging, MCTS, MCITP|||HI
For SQL 2000 you may want to look at http://support.microsoft.com/kb/240867/
and other methods and useful information about moving/copying databases may
be found at http://support.microsoft.com/kb/314546
John
"almurph@.altavista.com" wrote:
> Hi everyone,
>
> I noticed that when I did an export on a database (lets call it DB_a)
> to another one (lets call it DB_b) it did not copy over the full text
> index (FTI) that was on DB_a.
> Is there anyway I can get the FTI from DB_a to be copied over to DB_b
> without having to rebuild the FTI on DB_b'
> Would appreciate any comments/hints/user-experience that you may like
> to share.
> Thanking you,
> Al.
>

Friday, February 24, 2012

Copy/move database with full-text index

Is there any way to move a db with full-text indexes from one physical machine to another without having to drop catalog/indexes and the re-create them?

Cheers!

/Eskil

Hi,

From your description, it seems that you want to move a database with full indexes, right?

Full-text catalogs and indexes are not stored in a SQL Server database. Full-text catalogs and indexes are stored in separate files that the Microsoft Search service manages. You cannot use the Transact SQL statements BACKUP and RESTORE to back up and to restore full-text catalog files. After recovery or restore operations, you must separately resynchronize the full-text catalogs.

You may refer the following link which shares some solutions to move, copy, and back up full-text catalog folders and files.

http://support.microsoft.com/kb/240867

Hope it helps. Thanks.

|||

That article mate it utterly clear that I will just save my index creation statements in my snippets collection...

Thanks for helping out!

/Eskil

Sunday, February 19, 2012

Copy table Structure including primary keys, index etc.

Hi all,

I was wondering if there is a SQL command to copy the table structure of a table that includes primary keys, foreign keys, indexes, etc.

Thanks and have a nice day to all

Not a SQL command, but you can script this stuff out using the tools by right clicking the table, or programatically using SMO.

|||can you post a sample script or SMO please or send me a link discuss this matter thanks|||

Hi,

The easiest way to create the script is to right click the original table within SQL Server Management Studio and select "Script Table As ...\ Create To\ ..." . This will create a script for the table and its indexes.

Then you need to run the script but with the new tablename. After that, you need to copy the records using a insert/select command. (it is best to set the constraints/indexes afterwards).

Greetz,

Geert

Geert Verhoeven
Consultant @. Ausy Belgium

My Personal Blog

|||

I was thinking to use that script in my SP, On my SP I add a linked server then i want to copy all the tables exactly the same

and on the linked server the table names and table count change everyday, but i dont have any problem with that.

I was thinking if there is a way to copy exactly the same table inside an SP in that case.

Thanks

|||You can use sys tables/views inside your SP|||

can you post your samples script please.

thanks

|||

SELECT * INTO NewEmployee FROM Employee WHERE 1 = 0

above query will create same structure table called NewEmployee with structure of Employee. But will not have triggers and primary keys etc. you can create them by using follwing scripts

SELECT *

FROM sysobjects

WHERE parent_obj = OBJECT_ID('Employee')

SELECT *

FROM syscomments

WHERE id IN ( SELECT id

FROM sysobjects

WHERE parent_obj = OBJECT_ID('Employee') )

|||thanks for the reply Dinesh. Nice sql Stmt, does this work when you have a MS Access linked Server, is there a sysobjects table on the linked server?