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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL Server Management Studio

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-07-13 : 09:25:06
David writes "I am kind of new to SQL Server Management Studio.
How do I export tables and stored procedures from a database on my PC to a database by the same name located on a remote server."

Wanderer
Master Smack Fu Yak Hacker

1168 Posts

Posted - 2006-07-13 : 11:01:00
Do you need to export the structure, or the contents, of the tables. You can do the table move using the Export/Import wizards, as long as you can connect to the target destination. It is, imho, a best practice to have scripts for all table and procedure (in fact, all object) creations - so another option would be to script the table and procedure creates, and then those scripts could be run on the destination server.

You should be able to script from SSMS - right click on the table (or procedure), and select 'Script table as', then choose 'Create to' then choose 'File...' and specify the path. You could do this for the entire DB as well ('SCript DB as', 'Create to','File..'). Needless to say, the scripting will not cover the data.

Alternatively, if you want to deployment you entire database over the existing target location, (i.e not keep ANY data from the target location), you could backup your db and restore on the target.

hth

*##* *##* *##* *##*

Chaos, Disorder and Panic ... my work is done here!
Go to Top of Page
   

- Advertisement -