Attaching SQL Database files Using SQL Server Management Studio
If you do not already have SQL Management Studio installed, you'll need to install it first. Please see this guide: Downloading and Installing SSMS
If you ever have a need to use SQL Server Management Studio to attach the Kennel Connection .MDF and .LDF files, please follow the below. This type of function is normally needed if a hard drive or computer crashes and you or your technician were able to recover the database and log file from the hard drive. The files you will need are:
Kennel Connection 6.0 (No longer supported) : wkennel.mdf & wkennel_log.ldf
Kennel Connection 7.0: wkennel7.mdf & wkennel7_log.ldf
You MUST obtain both mdf and ldf files for the attach to work.
- Firstly open SQL Server Management Studio
Press Windows key + S and search for SQL Server Management Studio. Select it when shown in results:
- Please wait while it opens to login screen. If you used the KC7 install wizard to install SQL Server, the instance name will be YOURCOMPUTERNAME\WKENNEL. If you did not use the wizard, it may be YOURCOMPUTERNAME\SQLEXPRESS or whatever you named it. Change the login to SQL Server Authentication and login using the user id: sa and the pw: kc7000 (this is if you used the KC7 setup wizard to install SQL.) If you did not, the password will be different.) You can locate it by going into C:\KC7 and opening the wkennel.ini file in note pad. Scroll to the bottom and under the SQL Parameters, look for the UID and PID. Those are your user id's and password for SQL. Use those to login. Click Connect.
- The next window will show the object explorer items on left side. Select and Right click on Databases then choose Attach option
- The window appears on the screen called Attach Database Window. Click on Add button
- It displays a list of SQL Server database Files select it and click on Ok Button. (Note if you do not see the wkennel7.mdf file, you'll need to navigate to the directory you saved it in or its located in. Do this on the left-hand side. Once you get to the folder where the files live, they will show so you can select them. Select both the .mdf and .ldf files together by holding the CTRL key down and selecting.) If the locate database screen does NOT show the .ldf file and only shows the .mdf, select the .mdf and it will automatically pull in both files.
- Now Confirm the MDF file and LDF files are both showing under database details at the bottom. Again:
Kennel Connection 6.0 (no longer supported): wkennel.mdf & wkennel_log.ldf
Kennel Connection 7.0: wkennel7.mdf & wkennel7_log.ldf
- If no errors, you will see your database show up on the left hand object explorer under the databases folder. You can close SQL Server Management Studio and open Kennel Connection as long as you have already configured the wkennel.ini file to point to the instance of SQL Server.