ThanksYou can use Enterprise Manager to create the script. Once you have this all you have to do is run it to create another database. The GUI interface allows you to select many options about what exactly you want to include in the script.
Select the database in Enterprise Manager and thenAll Tasks and thenGenerate SQL Script
hope this helps,
sivilian|||Another easy way to do this is to create a SQL .bak and then to jsut restore it as a new DB name. The reason thsi is easier is because when you create the script, you can create the DB and ALL objects, but no data. So after you apply the script, then you have to DTS the data if you need it. The only reason I do scripts is if I do not have access to get the .bak file on a different server. When you create and restore backups, you can only do it from that local machine. So if you are moving to a different server and do not want to or can not get the .bak file on that new server, then using the Genereate script and applying it to the new DB is great. But if you are working on the same machine, just try creating a SQL .bak filke and then restoring it as the new DB name. This is really easy and works great!!
Rory|||I have a similar but in a way opposite problem:
I want to export a local SQL Server database into a .sql file and include all data. It's quite simple to do using "Generate SQL Script," but there's no way (at least that I've noticed) to export the current data as well.
I've been trying everything, it seems, but no luck.
Any clue would be appreciated.
Alex.|||So, here's answering my own question.
The solution I've found (there're simpler ones, I'm sure) is to use Microsoft SQL Web Administration Tool. I've downloaded it a while ago, and now used it to export a whole database and its data into a *.sql script file.
Hope that helps others.
Alex.
No comments:
Post a Comment