Script database | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Script database

How to script the database objects, I need to clone few database objects to a remote server for testing purpose.
Also will it be possible to script out data also or any tools are available.
To generate the script :
Goto to EM Expand server and databases, right-click the database to script, point to All Tasks, and then click Generate SQL Scripts. For more information refer to books online for ‘Documenting and Scripting Databases’ For data you can use DTS or BCP for selected tables. HTH
Satya SKJ

There is an article on my website on this topic you may find of interest. It is at: Also, if you do this a lot, you might consider some of the utilities from ——————
Brad M. McGehee
Thans for the article reference and learnt a lot. Unfortunately my budget doesn’t support using third party tools ;-( So I need to depend on available SQL tools only. Where can I find information for bcp or dts?
You look like newbie to the SQL server, as I referred do refer to books online for the prescribed topics. BCP syntax and other information.
DTS and its information. Its always worth sparing sometime to books online for reading, which gives you basic information what you’re looking for. HTH Satya SKJ

Yes satya I am a new to SQL server, most of my experience is with DB2 and mainframes.
I found lots of interest things with SQL and this site too. I will definetly follow your advice by referring books online. You people are great help.
Whats the size of your db? A simple dump and restore might be a viable quick solution.. good luck Brett ps the restore will create the db, even if it doesn’t exist. :cool:
Size does not matter here.
But restore does not deal with restoring specfic tables.
As I said its required to take specified objects in the database. I followed satyas suggestion and also used dts to get data for those tables, it worked without issues.
Using 6.5 EM you can restore a specific table from the database backup, but not from version 7 onwards. Satya SKJ