Sage Estimating SQL 19.12 and greater You use the Copy tool to create a new database by copying an existing standard or cost database.
Before you start
Make sure no other users are working with the databases you are going to copy. None of the fields on the Copy Database tab are available until you confirm that you have exclusive access to the databases.
To copy a database:
- On the ribbon in the Estimating Management Console, click the [Tools] button.
- In the navigation pane, click Copy.
- After verifying that no users are working with the database you are going to copy, select the Exclusive access confirmed check box on the Copy Database tab.
Estimating Management Console displays all your Sage Estimating standard databases in the table.
- In the table, select the database you want to copy.
- In the New standard database name, type the name you want to give to the new database.
- Click [Copy].
Sage Estimating SQL 18.11 and 18.12
You can now back up and restore a standard database or addressbook to adifferent name, provided you follow these steps:
- Use the Estimating Management Console Backup tool to back up the database.
- Using Windows Explorer, browse to the file location, and rename the backup file (with the BAK extension).
- Use the Estimating Management Console Restore tool to restore the renamed back up file.
Important! It is vital to rename the BAK file and to restore it using the Estimating Management Console. If you attempt to restore the database using SQL Server Management Studio, Estimating treats the renamed database as a duplicate, and does not display it in the database catalog.
Sage Estimating SQL 17.13 and older
Below are the steps for how to change the GUID for the database you would like to restore that already exists in your SQL instance.
- Find the .bak file backup of the items database. The default path is C:\Program Files\Microsoft SQL Server\[instance name]\MSSQL\Backup
- Use SSMS to restore the database making sure to assign a new name to the database at the time of restore (steps are in related resources below)
- In SSMS expand the database you just restored using the [+] sign.
- Expand out Programmability using the [+] sign.
- Expand out Stored Procedures using the [+] sign.
- Locate Security.GetAllPublicProperties
- Right click and select Properties
- In the Properties window select Extended Properties in the left pane
- Locate Sage.Estimating.SQL.DatabaseGUID in the list and copy the GUID string value from the Value column.
- Go back to Stored Procedures and find Security.SetDatabaseGUID
- Right click on Security.SetDatabaseGUID and select Execute Stored Procedure...
- Paste the copied value from step 9 above into the Value column and be sure to enclose it in quotation marks. Example: "7e2e8cf1-f14c-454b-bb71-f129e9f254c3" (If you do not use quotation marks you will get error:
Msg 102, Level 15, State 1, Line 5
Incorrect syntax near '[string]'. - Change the last value in the pasted GUID so that it is unique to the restored copy. (example: "7e2e8cf1-f14c-454b-bb71-f129e9f254c4")
- Click OK on the stored procedure window
You should now see the database show in the Estimating Configuration Wizard with its own unique GUID string value ID. You should also now be able to see the original and the restored copy in the Estimating Management Console (EMC) as well as through the Estimating application. If you do not see the restored database in the EMC, select the Standard DB tab, click the magnifying glass tool in the Standard Database Catalog list. Check the box next to your database and click ok.