HOWTO create a database or copy of it

  • Hello!

    Was wondering how I can create a copy of one database? FYI I'm not

    interrested in the data, just the fields and triggers, and so on.

    Which way is the easiest? Do I create a script and run it from there? Is it

    smart to have it inside a SP?

    Any idea would be greatly appreciated.

    I'm programming SQL 2k and VC7.0 and ADO.

    I know I can do this in QA, but that's not the issue here. I'm looking for a way of doing it in code!

    At the beginning I was thinking of doing it in the model db, but I have up to four differnt database to create, so that didn't work.

    Could anyone help me please

    -Lars

    Please only reply to this newsgroup. All mails would be bounced back.


    -Lars

    Please only reply to this newsgroup. All mails would be bounced back.

  • Scripting is one way but you ould alsoo try backing it up and restoring to another location. From there truncate all the data from the restored copy and that one up. Make sure you also remove any user accounts and grant them access back to wherever you restore in the future. And for best results use roles to apply security then assign the users to the roles that are appropriate.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply