Solved

Management Studio - Move table from one database to another.

Posted on 2007-04-11
3
189 Views
Last Modified: 2010-03-19
This question is about SQL Server 2005 Management Studio.
Both databases are visible within Management Studio.  They are both in the same instance.  All permissions are properly granted.

Please outline the steps necessary (using Managment Studio) to move a table from one database to another.

 
0
Comment
Question by:Volibrawl
  • 2
3 Comments
 
LVL 21

Expert Comment

by:Kevin3NF
Comment Utility
Schema only, or schema and data?  If you want data, you are probably going to have to use SSIS which I am not very familiar with.

For just schema, right click the table, Script table as>>Create To>>(pick the appropriate option)

Then run that script against the other database to create it
0
 
LVL 9

Author Comment

by:Volibrawl
Comment Utility
Schema and data.
0
 
LVL 21

Accepted Solution

by:
Kevin3NF earned 125 total points
Comment Utility
SSIS or if the destination table does not exist:

Select *  --all columns
Into MyTestDB2.dbo.Test --destination database (usnig 3 part naming convention)
From MyTestDB.dbo.Test  --source database
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now