July 3, 2008 at 12:23 am
Hi experts,
How to copy a table from one database to another in the same server.
TIA
July 3, 2008 at 12:46 am
Done using select * into...Can anyone please tell how to delete a post???I tried to delete but no use :hehe:
July 4, 2008 at 3:33 am
There are drawbacks to using Select Into...
For a more general stored procedure for copying a list of tables, procedures or functions from one database to another have a look at this procedure I wrote a while back..
http://www.simple-talk.com/code/MoreDMO/spDBTransfer.txt
Which is part of an article I wrote a while back that I'm quite proud of
Automating Common SQL Server Tasks using DMO[/url].
You'll need to Download DMO from the Feature Pack for Microsoft SQL Server 2005. Don't worry, it still works in SQL Server 2008.
Best wishes,
Phil Factor
July 4, 2008 at 6:48 am
Hi
The best method to copy objects (with/without data) from one database to another I think is Import/Export method.
Thnx
Vaseem
July 4, 2008 at 8:44 am
The select into wont carry over the Keys/Indexes.. even you have to redo the IDENTITY Field.
IMPORT/EXPORT is the best method for a Quick Table Move.
Maninder
www.dbanation.com
July 7, 2008 at 10:46 am
select * into [ Dist database name].[dbo].
from [Source Database name].[dbo].
/*
This is possiable only when the user have the Write on [Dist] and Read permission on [Source]
*/
This will helps you!!
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply