July 15, 2009 at 4:29 am
i Have an apllication which uses sql server 2000 database as a backend. for every accounting year i using separate database. Am creating database manually. only master table entries need to copied in a new database and transactions table as empty. Is there any way to do this using procedure? thnks in advance..
July 15, 2009 at 5:59 am
Have you tried writing a procedure that creates the database, then the objects within it, and then call that procedure from your app?
Randy
July 15, 2009 at 6:03 am
You could backup and restore under different name the original database and truncate tables that don't need data inside.
If the instance you're working on is dedicated to this application, you could also create the tables in the model database, so that each DB you create issuing CREATE DATABASE contains the tables you need. Obviously you would have do move data manually from the original DB to the new one you just created. If data doesn't change in the tables you need, you could also populate the tables in the model db.
Hope this helps
Gianluca
-- Gianluca Sartori
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply