Rhett 1. Make a backup of the database 2. Make a backup of the backup!! (You'll see why in a minute) 3. Work on the backup 4. Do NOT make the structure changes using the database designer. Instead, try to figure out the correct syntax for the ALTER TABLE command for each change you need. Test them at the R> prompt. It is not at all unlikely that you'll make a mistake or two here, and that's why you want the extra backup so you can start over.
ALTER TABLE is a very complex command - study the syntax and write here if you have questions. 5. As you get each ALTER TABLE command right, copy and paste it into a file to with RBEDIT. When you've made all the structure changes on the backup, you'll have a program in a file with all the commands needed to make the same changes on the live database. 6. Modify each form you need to change. 7. For each form you change, in the Database Explorer, right click on the form name, click on unload. R:Base will default the file name to Formname.FRM - accept it by clicking on OK. It also creates a FormName.LOB file for each form. 8.. When all the form changes are done, write into the same file where you pasted the ALTER TABLE commands a RUN FormName.FRM command for each form you changed. 9. The file you created now has all the commands necessary to make the changes on the live database. Copy this file, plus all the .FRM and .LOB files created into the live directory. 10. Get everyone else out of the database. To confirm that you have done this successfully type at the R> prompt: DISCONNECT SET MULTI OFF CONNECT databasename If it works, you have exclusive access to the database and can proceed. 11. Backup the database again (no doubt changes will have been made since you started at step 1 above!) 12. RUN the file you created in steps 1 - 8 above. That should do it! David Blocker [EMAIL PROTECTED] 781-784-1919 Fax: 781-784-1860 Cell: 339-206-0261 ----- Original Message ----- From: "Rhett McPeake" <[EMAIL PROTECTED]> To: "RBG7-L Mailing List" <[email protected]> Sent: Friday, April 22, 2005 9:43 AM Subject: [RBG7-L] - Best Practices > I have to make changes to a production database (RBase 7.1). > > I was looking for any ideas on how you professionals approach such > changes. > > I have to modify table structures by adding some new columns and > changing the value of some computed columns. > > Then I have to modify several forms. > > Do you make a backup of the production database and then make the > changes to the backup? > > If you modify the forms on the backup, how do you copy the new forms > back to the original database? > > Thank you in advance for any ideas or suggestions. > >
