How to access the SWCS 4.2 company database using SQL Server Management Studio
This document assumes you are familiar with SQL Server and it's tools and have SQL Server Management Studio installed on your computer.
In order to access the SWCS 4.2 company database you'll need to gather some information from SWCS such as the name of the SQL Server, database name and login information. This information can be found in the .psd file which is located in the \Companies folder along with the actual database files .mdf and .ldf.
To open the .psd file
-
Run SWCS
-
From the File menu click File Manager.
-
Make sure the file type selected is Companies.
-
In the list of files locate the file with the type "PSD".
-
Right-click on the file and click "Show in Windows Explorer". When Windows Explorer opens it will
-
navigate to the \Companies folder and select the .psd file.
-
Right-click on the file in Windows Explorer, select Open With, and open the file in Notepad (or your
-
favorite text editor).
Gathering information from the .psd file
- Locate the text between <CompanyDatabase> and </CompanyDatabase>. Write this down as the database name.
-
Locate the text between <Host> and </Host>. Write this down as the SQL Server.
-
Locate the number between <Auth> and </Auth>. If this number is 0 then write down "Windows Authentication" otherwise write down "SQL Server Authentication".
- If you see <User> and </User> then write down the text between these tokens as the user name. Most of the time these nodes will not be this file. In that case write down "sa" (without the quotes) as the user name.
- If you see <Password> and </Password> then write down the text between these tokens as the password. Most of the time these nodes will not be this file. In that case write down "swcs" (without the quotes) as the password.
Connect to the database using SQL Server Management Studio
-
Run SQL Server Management Studio
-
When asked to connect to the database enter the name of the SQL Server that you wrote down.
-
If you wrote down "Windows Authentication" then select Windows Authentication, otherwise select SQL Server Authentication.
-
If you selected SQL Server Authentication then enter the user name and password that you wrote down.
-
Click Connect to connect to the server.
-
Once connected, expand the list of databases and expand the database where the name matches the one you wrote down.
Note
-
Make sure you have a recent database backup for proceeding with any further interaction with the database.
-
Do not add, update or delete records in any of the tables.
- Do not change the structure of any of the existing tables in any way. Doing so will prevent SWCS 4.2 from opening the database.
- You can add tables if required.
Related Articles
SWCS 4.x can't access a SQL Server 2005 database
Symptoms When you attempt to open a company file located on a server using SQL Server 2005 you receive the following error message: The company '...' is not a valid company or you don't have permission to access it. Check with your system ...
How to rename a SWCS company database
Summary This article explains how to rename a SWCS 4.2 company database. More Information There are a few prerequisites that must be met before you rename the company database: The Microsoft SQL Server Management Studio Express tool must be installed ...
Error while checking write access to a SWCS company
Summary While checking write level access to the last used SWCS company database the test failed. More Information This could happen if: You have the incorrect SQL Server drives installed. You don't have access to the company database. Your network ...
Error while checking read access to a SWCS company
Summary While checking read level access to the last used SWCS company database the test failed. More Information This could happen if: You have the incorrect SQL Server drives installed. You don't have access to the company database. Your network ...
Cannot connect to Solatech database server
Summary The instance of SQL Server for Solatech was found on this computer however a connection to the server could not be made. This problem can also occur if testing multiple connections to the company database fails. More Information This could ...