How do I run a SQL Query against the IntranetConnections SQL database?

Disclaimer: Support is unable to provide custom code (Eg. Special features, generating reports, etc). However, in some cases, data may need to be altered using a SQL script. To keep data integrity intact, we advise against running data-altering SQL scripts unless provided to you from an Intranet Connections team member.

* Note: Always take a backup of the database before running data-altering queries

Step 1 – Locating your SQL Server

To access your IntranetConnections database, you will need to know what SQL Server the database resides on. For some, the SQL Server may reside on the web server that hosts your Intranet site, whereas others may have it on a separate SQL Server entirely. 

Use the following steps to locate the server of where your SQL Server is stored:

  1. Access your Railo/Lucee Web Administrator portal - click here for instructions
  2. Click 'Datasource' from the left nav options
  3. Click the pencil icon beside your SQLFunctions datasource as shown here: 
  4. Look for the server information as shown in the image below: 

If you see 'localhost' as shown in the image above, this refers to the web server where the Intranet site is hosted. You can access the SQL server by using the IP address of the web server, or by its name.

Step 2 – SQL Server Management Studio

To run a SQL Query against your database, you will need to have SQL Server Management Studio installed on your computer, or a computer that you have remote access to.

Click here to download the client. http://www.microsoft.com/en-ca/download/details.aspx?id=42299

On the download screen, scroll down and select the option for: MgmtStudio 64BIT\SQLManagementStudio_x64_ENU.exe

Step 3 – Connect to the SQL Server

Now that you have SQL Server Management Studio installed, you can connect to your SQL server as shown in the image below: 

In the example above, localhost is used as we are connected to the server, and 'intraconnections' is the SQL Server instance where the database is hosted.

Step 4 – Open a New Query window

  1. Once connected to the SQL Server, right-click on the IntranetConnections database
  2. Click ‘New Query’ as shown in the following image:  

Step 5 – Execute SQL Script

  1. Paste the script into the provided query window
  2. Click execute as shown in the image below: 
  3. Look at the results window that appears below to report results or show that the script was ran successfully. The messaging will reflect the action you are trying to take. The following image demonstrates listing the Employee Departments that appears within the Employee Directory: 
Have more questions? Submit a request

0 Comments

Article is closed for comments.