Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Method to copy the schema and data?

Status
Not open for further replies.

iRead

Programmer
Mar 12, 2004
25
US
I need to create some sort of method to copy the schema and data from an existing database and recreate that database schema and data at another location i.e. customer site. I would like to be able to start the rendered script from a command line. I will be very appreciative of anyone who can get me started in the right direction.

Thank you,
iRead
 
Enterprise Manager,
select your database

rightclick on it
All Tasks
Generate SQL scripts...
 
I endup generating a script for the schema from Enterprise Manager then generated a script for the data with a third party utility. Combined the two. Then I found a vb script file to prompt for the server name and launch the sql script with osql. The solution turned out reasonably elegant and simple for the end user to self-install.

Thanks Again!
David
 
gotta love OSQL.. I manage 150+ servers and use OSQL to do everything from database maintenence to server maintenence..

Log on to my pc as a sqladmin, osql with xp_cmdshell and you can do anything... just a great tool! Updates programs, stops processes, starts services, reads directorys, copys files etc..etc..

Oh yeah, and so scriptable.. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top