Author Topic: How can I convert a Secondary DB to a Primary DB?  (Read 5966 times)

Rick Leffler

  • Guest
How can I convert a Secondary DB to a Primary DB?
« on: January 19, 2010, 02:10:49 PM »
This post only applies to the Legacy database!

Question: We use the database check-out/check-in feature and we've lost the primary database. All we have is one checked out secondary Database. Is there any way we can use that going forward as our main database?

Answer: That Secondary DB can be converted to become the new Primary Database.

NOTE: the instructions below assume there is only ONE Secondary database. If there is more than one Secondary database, DO NOT DO THIS. Instead, contact customer support.

1.  Log into the Secondary database and run the backup utility.

2.  Open the SQL workbench (Admin > Database Utilities > SQL Workbench).

3.  Copy all three lines below (all of them at once):

update Administration set IsPrimary = True;
update Club_Checkout set Checked_Out = null, Checkout_Key = null;
update Person set IsCheckedOut = False, Checkout_Key = null

4.  Paste into the SQL workbench and click Run SQL.

5.  Exit the database and then restart it.

It should now indicate it is a "Primary" database on the login screen and the main toolbar.
« Last Edit: March 24, 2022, 11:03:59 AM by Annette »