Hi everyone!
How can I do to copy the data and the indexes from an existing table on a
database to a new table in another database?
I've tried with select * into base1.table1 from base2.table2, but it only
copy the data and not the indexes.
Can I do it by code? I'm trying to avoid the use of DTS.
Thanks.
Jaime Lucci
You would have to precreate the table on the destination server/database
with the indexes in place and then do an insert select like this
insert into base1..table1
select * from base2..table2
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
news:Oj%23$5Yr6FHA.2816@.tk2msftngp13.phx.gbl...
> Hi everyone!
> How can I do to copy the data and the indexes from an existing table on a
> database to a new table in another database?
> I've tried with select * into base1.table1 from base2.table2, but it only
> copy the data and not the indexes.
> Can I do it by code? I'm trying to avoid the use of DTS.
> Thanks.
> Jaime Lucci
>
|||Can I "read" by code the index of the table to preceate it in the
destination database?
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:e25bpkr6FHA.476@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> You would have to precreate the table on the destination server/database
> with the indexes in place and then do an insert select like this
> insert into base1..table1
> select * from base2..table2
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
> news:Oj%23$5Yr6FHA.2816@.tk2msftngp13.phx.gbl...
a[vbcol=seagreen]
only
>
|||sp_help tablename is good. You can use the results of this to build the
index.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
news:uK$DPor6FHA.1720@.TK2MSFTNGP09.phx.gbl...
> Can I "read" by code the index of the table to preceate it in the
> destination database?
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:e25bpkr6FHA.476@.TK2MSFTNGP15.phx.gbl...
> a
> only
>
Showing posts with label databaseive. Show all posts
Showing posts with label databaseive. Show all posts
Thursday, March 8, 2012
Copying data and indexes
Copying data and indexes
Hi everyone!
How can I do to copy the data and the indexes from an existing table on a
database to a new table in another database?
I've tried with select * into base1.table1 from base2.table2, but it only
copy the data and not the indexes.
Can I do it by code? I'm trying to avoid the use of DTS.
Thanks.
Jaime Lucci
You would have to precreate the table on the destination server/database
with the indexes in place and then do an insert select like this
insert into base1..table1
select * from base2..table2
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
news:Oj%23$5Yr6FHA.2816@.tk2msftngp13.phx.gbl...
> Hi everyone!
> How can I do to copy the data and the indexes from an existing table on a
> database to a new table in another database?
> I've tried with select * into base1.table1 from base2.table2, but it only
> copy the data and not the indexes.
> Can I do it by code? I'm trying to avoid the use of DTS.
> Thanks.
> Jaime Lucci
>
|||Can I "read" by code the index of the table to preceate it in the
destination database?
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:e25bpkr6FHA.476@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> You would have to precreate the table on the destination server/database
> with the indexes in place and then do an insert select like this
> insert into base1..table1
> select * from base2..table2
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
> news:Oj%23$5Yr6FHA.2816@.tk2msftngp13.phx.gbl...
a[vbcol=seagreen]
only
>
|||sp_help tablename is good. You can use the results of this to build the
index.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
news:uK$DPor6FHA.1720@.TK2MSFTNGP09.phx.gbl...
> Can I "read" by code the index of the table to preceate it in the
> destination database?
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:e25bpkr6FHA.476@.TK2MSFTNGP15.phx.gbl...
> a
> only
>
How can I do to copy the data and the indexes from an existing table on a
database to a new table in another database?
I've tried with select * into base1.table1 from base2.table2, but it only
copy the data and not the indexes.
Can I do it by code? I'm trying to avoid the use of DTS.
Thanks.
Jaime Lucci
You would have to precreate the table on the destination server/database
with the indexes in place and then do an insert select like this
insert into base1..table1
select * from base2..table2
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
news:Oj%23$5Yr6FHA.2816@.tk2msftngp13.phx.gbl...
> Hi everyone!
> How can I do to copy the data and the indexes from an existing table on a
> database to a new table in another database?
> I've tried with select * into base1.table1 from base2.table2, but it only
> copy the data and not the indexes.
> Can I do it by code? I'm trying to avoid the use of DTS.
> Thanks.
> Jaime Lucci
>
|||Can I "read" by code the index of the table to preceate it in the
destination database?
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:e25bpkr6FHA.476@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> You would have to precreate the table on the destination server/database
> with the indexes in place and then do an insert select like this
> insert into base1..table1
> select * from base2..table2
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
> news:Oj%23$5Yr6FHA.2816@.tk2msftngp13.phx.gbl...
a[vbcol=seagreen]
only
>
|||sp_help tablename is good. You can use the results of this to build the
index.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
news:uK$DPor6FHA.1720@.TK2MSFTNGP09.phx.gbl...
> Can I "read" by code the index of the table to preceate it in the
> destination database?
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:e25bpkr6FHA.476@.TK2MSFTNGP15.phx.gbl...
> a
> only
>
Copying data and indexes
Hi everyone!
How can I do to copy the data and the indexes from an existing table on a
database to a new table in another database?
I've tried with select * into base1.table1 from base2.table2, but it only
copy the data and not the indexes.
Can I do it by code? I'm trying to avoid the use of DTS.
Thanks.
Jaime Lucci
You would have to precreate the table on the destination server/database
with the indexes in place and then do an insert select like this
insert into base1..table1
select * from base2..table2
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
news:Oj%23$5Yr6FHA.2816@.tk2msftngp13.phx.gbl...
> Hi everyone!
> How can I do to copy the data and the indexes from an existing table on a
> database to a new table in another database?
> I've tried with select * into base1.table1 from base2.table2, but it only
> copy the data and not the indexes.
> Can I do it by code? I'm trying to avoid the use of DTS.
> Thanks.
> Jaime Lucci
>
|||Can I "read" by code the index of the table to preceate it in the
destination database?
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:e25bpkr6FHA.476@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> You would have to precreate the table on the destination server/database
> with the indexes in place and then do an insert select like this
> insert into base1..table1
> select * from base2..table2
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
> news:Oj%23$5Yr6FHA.2816@.tk2msftngp13.phx.gbl...
a[vbcol=seagreen]
only
>
|||sp_help tablename is good. You can use the results of this to build the
index.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
news:uK$DPor6FHA.1720@.TK2MSFTNGP09.phx.gbl...
> Can I "read" by code the index of the table to preceate it in the
> destination database?
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:e25bpkr6FHA.476@.TK2MSFTNGP15.phx.gbl...
> a
> only
>
How can I do to copy the data and the indexes from an existing table on a
database to a new table in another database?
I've tried with select * into base1.table1 from base2.table2, but it only
copy the data and not the indexes.
Can I do it by code? I'm trying to avoid the use of DTS.
Thanks.
Jaime Lucci
You would have to precreate the table on the destination server/database
with the indexes in place and then do an insert select like this
insert into base1..table1
select * from base2..table2
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
news:Oj%23$5Yr6FHA.2816@.tk2msftngp13.phx.gbl...
> Hi everyone!
> How can I do to copy the data and the indexes from an existing table on a
> database to a new table in another database?
> I've tried with select * into base1.table1 from base2.table2, but it only
> copy the data and not the indexes.
> Can I do it by code? I'm trying to avoid the use of DTS.
> Thanks.
> Jaime Lucci
>
|||Can I "read" by code the index of the table to preceate it in the
destination database?
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:e25bpkr6FHA.476@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> You would have to precreate the table on the destination server/database
> with the indexes in place and then do an insert select like this
> insert into base1..table1
> select * from base2..table2
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
> news:Oj%23$5Yr6FHA.2816@.tk2msftngp13.phx.gbl...
a[vbcol=seagreen]
only
>
|||sp_help tablename is good. You can use the results of this to build the
index.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jaime Lucci" <jaimelucci@.hotmail.com> wrote in message
news:uK$DPor6FHA.1720@.TK2MSFTNGP09.phx.gbl...
> Can I "read" by code the index of the table to preceate it in the
> destination database?
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:e25bpkr6FHA.476@.TK2MSFTNGP15.phx.gbl...
> a
> only
>
Subscribe to:
Posts (Atom)