Manually Attaching Kingdom SQL Database
There are two types of Kingdom SQL projects: Manual and Auto.
Insight will automatically try to attach the Kingdom project's database files whether it is a manual or auto SQL project (see Downloading and Installing SQL Server). However, there are rare occasions when database files need to be manually attached. This page will take you through how to manually attach an SQL database.
Auto SQL projects automatically attach the SQL database when Kingdom is opened. Insight will automatically connect these databases to the SQL Server when the link is connected. When the link is disconnected, the database will be automatically detached. The Kingdom project should then be safe to copy.
Manual SQL projects are a little different. Kingdom does not automatically attach these databases (mdf/ldf files) to SQL Server, the user will have to manually do it. The manual mdf/ldf files are already attached to the instance if the Kingdom project is running. The Kingdom Reader will automatically connect to these projects. If the manual databases are not attached, Insight will still attempt to attach these files automatically.
Open the SQL Server Management Studio
- Open the SQL Server Management Studio. (If you are using a Windows machine, click the Start button to access the Start menu. At the Start menu, click on All Programs and select Microsoft SQL Server XXXX.
Note: If SQL Server reports a message similar to "Not able to access the database 'xxxxx' under the current security context", right-click the program and select 'Run as administrator'.
- Type the Server name. This is the name of the computer on which SQL Server is installed. If SQL Server is installed on your local machine, you can also use LOCALHOST as the server name.
- Click Connect to connect to the Kingdom instance.
- Right-click Databases.
- Click Attach.
Select database file to attach
- In the Databases to attach section, Click Add.
- Browse to the .mdf file in the Kingdom project directory.
- Click OK.
- In the Attach Databases window, click OK.
Detach a database
- Open the SQL Server Management Studio as described in the preceding steps.
- Expand the Databases folder.
- Select the database that you want to detach.
- Right-click the folder and click Tasks, and select Detach.
- In the Detach Database window, click OK.