Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Copy Table with Data
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sunny_10
Yak Posting Veteran

72 Posts

Posted - 11/09/2014 :  01:22:41  Show Profile  Reply with Quote
Hi

I want to copy table with data from 1 Database to another Database.

Thanks

ahmeds08
Aged Yak Warrior

India
737 Posts

Posted - 11/11/2014 :  15:36:34  Show Profile  Send ahmeds08 a Yahoo! Message  Reply with Quote
use generate script option in SSMS

Javeed Ahmed
https://www.linkedin.com/pub/javeed-ahmed/25/5b/95
Go to Top of Page

gbritton
Flowing Fount of Yak Knowledge

2780 Posts

Posted - 11/11/2014 :  16:51:34  Show Profile  Reply with Quote
or use the import/export wizard
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
38200 Posts

Posted - 11/11/2014 :  17:26:06  Show Profile  Visit tkizer's Homepage  Reply with Quote
I would use T-SQL to get the table definition and data, and then I'd use the generate script option to get the dependent objects such as indexes, foreign keys, etc.

SELECT * INTO DB2.dbo.Table1 FROM DB1.dbo.Table1

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

gbritton
Flowing Fount of Yak Knowledge

2780 Posts

Posted - 11/12/2014 :  09:16:44  Show Profile  Reply with Quote
unless you can't link to DB2 from DB1 from some reason. Then SSIS is your friend.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000