Friday, March 30, 2012

is it possible to move table(s) from one db to another?

thanks in advance.
Use the import/export functionality in Enterprise Manager.
"Tin" <oe@.fawcette.com> wrote in message
news:%23AM8vlrPEHA.1276@.TK2MSFTNGP11.phx.gbl...
> thanks in advance.
>
|||By move you mean you want the data to be copied right ? If yes, then you
have:
1. Create a DTS package has a wizard approach that will transfer the same in
a few clicks.
2. Script out all the data using available third party tools and script the
data and import the same. One such script present at :
http://vyaskn.tripod.com/code/generate_inserts.txt
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
"Tin" <oe@.fawcette.com> wrote in message
news:%23AM8vlrPEHA.1276@.TK2MSFTNGP11.phx.gbl...
> thanks in advance.
>
|||Hi,
It seems tin needs to move the table from one database to another database
in the same server. In this case he can select * INTO statement.
For eg:
You have 2 databases- 1 is HR and the 2nd is Finance..
Incase if Tin need to move the EMPLOYEE table in HR to Finance then he can
execute the below command from Query Analyzer.
select * into FINANCE..Employee from HR..Employee
Once the tabe is successfully copied then you can drop the table from source
database. But ensure that full data is copied to destination.
Note:
If you need the indexes then you have to create the indexes by scripting
them using the Enterprise manager -- Databases-- Alltasks-- Generate Scripts
by selecting the current database and table.
Thanks
Hari
MCDBA
"Vinodk" <vinodk_sct@.NO_SPAM_hotmail.com> wrote in message
news:OhXlH0tPEHA.628@.TK2MSFTNGP11.phx.gbl...
> By move you mean you want the data to be copied right ? If yes, then you
> have:
> 1. Create a DTS package has a wizard approach that will transfer the same
in
> a few clicks.
> 2. Script out all the data using available third party tools and script
the
> data and import the same. One such script present at :
> http://vyaskn.tripod.com/code/generate_inserts.txt
> --
> HTH,
> Vinod Kumar
> MCSE, DBA, MCAD, MCSD
> http://www.extremeexperts.com
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techinf...2000/books.asp
>
> "Tin" <oe@.fawcette.com> wrote in message
> news:%23AM8vlrPEHA.1276@.TK2MSFTNGP11.phx.gbl...
>
|||Well Hari.
Cool. The select into clause is the easiest implementation. But having said
that this also copies the data not moves ...
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:%230rs5FuPEHA.556@.TK2MSFTNGP10.phx.gbl...
> Hi,
> It seems tin needs to move the table from one database to another
database
> in the same server. In this case he can select * INTO statement.
> For eg:
> You have 2 databases- 1 is HR and the 2nd is Finance..
> Incase if Tin need to move the EMPLOYEE table in HR to Finance then he can
> execute the below command from Query Analyzer.
> select * into FINANCE..Employee from HR..Employee
> Once the tabe is successfully copied then you can drop the table from
source
> database. But ensure that full data is copied to destination.
> Note:
> If you need the indexes then you have to create the indexes by scripting
> them using the Enterprise manager -- Databases-- Alltasks-- Generate
Scripts[vbcol=seagreen]
> by selecting the current database and table.
>
> Thanks
> Hari
> MCDBA
>
> "Vinodk" <vinodk_sct@.NO_SPAM_hotmail.com> wrote in message
> news:OhXlH0tPEHA.628@.TK2MSFTNGP11.phx.gbl...
same
> in
> the
>
|||If you need to move the table, with structure intact (indexes,
triggers, constraints, permissions, etc) I would probably recommend
using the DTS Import feature. This will better ensure that all
dependencies are intact. Select Into is quite fast, but may leave you
with some cleanup work on setting defaults, permissions, etc.
"Vinodk" <vinodk_sct@.NO_SPAM_hotmail.com> wrote in message news:<usDWiJxPEHA.1348@.TK2MSFTNGP12.phx.gbl>...[vbcol=seagreen]
> Well Hari.
> Cool. The select into clause is the easiest implementation. But having said
> that this also copies the data not moves ...
> --
> HTH,
> Vinod Kumar
> MCSE, DBA, MCAD, MCSD
> http://www.extremeexperts.com
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techinf...2000/books.asp
>
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:%230rs5FuPEHA.556@.TK2MSFTNGP10.phx.gbl...
> database
> source
> Scripts
> same
> in
> the

No comments:

Post a Comment