I´m a newbiew to MS-SQL Server. I used Snitz Forum only with Access. But I have (with some difficulty) managed to create a fully functional database for a site using a MS-SQL database.
Now I want to replicate this MS-SQL database in order to customize it for a new site to be accessed by another group of users. I asked the DBA to create a new database by just copying the tables and data from the operating database. He asked me if he should copy the data as well. I said yes, but perhaps this was not a very good idea, because there were problems aftwards (for example: some fields in many tables could not accept null values). Now when I point to the first database, in the config.asp file the forum is OK, but when I change the settings pointing to the new database I can´t use it.
What is the best way to copy and use a database structure in MS-SQL Server? I remember that with Access to MS=SQL we had to use the setup.asp file to create the forum tables. But now I just want to copy a database in MS-SQL, and use it with a different name.
Would you please help me with this little problem?
A member here (can't remember who) has suggested that you copy object and data when exporting to a new sql server db. I've never tried it. I prefer to copy over the mdf file and reattach it to the new sql server.
On the same server or one that you have ODBC access to, use the "Copy objects and data between SQL Server databases" option. You could also restore a backup to a new DB name.
To recreate it on another server, script the database (including indexes and keys) and create the shell in the destination server. Export all your data to Access and import.
If you want a blank database the best way to get everything setup the same would be to just run the setup.asp file on the new database and then delete out all the records. Once you delete out all the records you can use DTS to copy over all the information. If you have mod's installed then you would either have to run the setup for each mod again or just open up both tables in EM and make sure you have the exact column names in each table if you do not want to do any of the above options.