Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Replicating a DB in MS-SQL Server
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Eric Savanda
Starting Member

Brazil
3 Posts

Posted - 17 January 2005 :  13:17:40  Show Profile
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?

Edited by - ruirib on 17 January 2005 14:00:43

Podge
Support Moderator

Ireland
3775 Posts

Posted - 17 January 2005 :  14:19:15  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Do you only want to copy it once?

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.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

-gary
Development Team Member

406 Posts

Posted - 17 January 2005 :  16:38:52  Show Profile
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.

KawiForums.com


Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 17 January 2005 :  18:24:27  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
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.

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07