Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQLBase

Status
Not open for further replies.

indoaryaan

IS-IT--Management
Nov 19, 2003
26
0
0
US
I am using SQLBase 7 database. I have a PROD database and a DEV database. The data in PROD database is till date.

1.When i try to copy(copy and paste in explorer)the .dbs file from PROD to DEV, i find that DEV database is not updated. Is there anything else i have to do after copying the .dbs file to DEV from PROD??
2. I took backup snapshot of PROD database. When i try to restore the DEV database from the the PROD SNAPSHOT, the system does not let me. However, when i do the restore from DEV SNAPSHOT, the system does it fine. My aim is to update the DEV database with PROD database.

Thanks in advance.....
Indoaryaan.
 
If this is a manual process, I have found the best way is:
1. deinstall the PROD and DEV databases (if you have a maintenance time window)
2. copy the .DBS file to the \DEV folder
3. replace the DEV.DBS file with the copy
4. install both databases.

*****
If you cannot deinstall PROD:
1. find the time of least usage
2. deinstall DEV database and delete the .DBS file
3. copy the PROD.DBS and all *.LOG files into the \DEV folder
4. in \DEV, rename PROD.DBS to DEV.DBS
5. install DEV
6. connect and run a "check database". A result of "database checked" is good. If you get any other answer, a user was updating PROD during your copy and DEV is not corrupt. GOTO step 1.
 
Oops! Toward the end in step 6, if a user updated PROD during the copy, then DEV is "now" corrupt!
 
Databases that are still on engine are "in use" and attempting to move or overwrite could cause corruption.

If you are unable to shutdown the SQLBase engine to free up the dbs or you are unable deinstall PROD and you don't want to keep a copy of DEV... SQLTalk commands in bold

Option 1

1. Create a directory called c:\db

2. Set the Server

3. drop database DEV;
once you issue this command, there is no going back to the DEV db

4. BACKUP DATABASE from PROD to c:\db on server;
this will backup a stable copy of the database to that directory you created in Step 1. Once the backup is complete, proceed to the next step

5. RESTORE DATABASE from c:\db on server to DEV;

6. connect to the database

7. CHECK DATABASE;

8. UPDATE STATISTICS ON DATABASE;
Barring a corrupted index or rowpage, you should be in business.

9. DISCONNECT ALL;
**************************

Option 2

1. create a directory c:\db
2. connect to PROD
3. UNLOAD DATABASE C:\DB\PROD.SQL
depending on how big your database is, this could take a littke while. Once this unload is complete, proceed to the next step

4. Disconnect from PROD

5. DROP DATABASE DEV;
6. CREATE DATABASE DEV;
7. CONNECT DEV;
8. LOAD SQL C:\DB\PROD.SQL;
again, depending on how big the database it, this part could take even longer!

9. CHECK DATABASE;
10. UPDATE STATISTICS ON DATABASE;
After this, you should be in the business.

11. DISCONNECT ALL;

Hope that helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top