Layton ServiceDesk - FAQ - Manual SQL Connection

From Layton Support
(Difference between revisions)
Jump to: navigation, search
(APPENDIX A – MS SQL Server Database Connection)
(New section: "Restarting the World Wide Web Publishing Service")
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== APPENDIX A – MS SQL Server Database Connection ==
+
<p align="right">[[File:btn_back_up.png|link=User Guide for Layton ServiceDesk]] [[User Guide for Layton ServiceDesk|<u>Back to Contents</u>]]</p>
Layton ServiceDesk™ uses MS SQL Server for the data storage.  Layton ServiceDesk™ can connect to the MS SQL Server by either NT Authentication or SQL Server Authentication. This technical note is a detailed explanation of what needs to be done to establish a database connection by either method.
+
=Overview=
 +
Although the '''[[Layton ServiceDesk - Installation - Connect to Existing Database|DBTool application]]''' is the preferred method of configuring a SQL connection, it can be configured manually. This is useful in the event where a change in the '''[[Layton ServiceDesk - Settings - System Settings - Application Database Connection|Application Database Connection]]''' settings has caused Layton ServiceDesk to lose its connection.
  
=== Database Backup Method ===
+
There are two options: NT or SQL authentication.
  
It is advised that you make a back up of the entire LaytonHelpBox program folder by Right clicking on the '''C:\LaytonServiceDesk''' folder and select  “Copy”, then “Paste” it to a new folder on the production server (e.g. ‘C:\LaytonServiceDesk backup’).
+
==Location of SQL Configuration File==
 +
The SQL configuration file is
  
To make a back up of the HelpBox SQL database you can use a SQL DB manager such as “E'''nterprise Manager'''” or “'''MS Management Studio'''” as this is the most reliable method of backing up a SQL database. Under the “Databases” directory, locate the '''LaytonServiceDesk''' database and right click on it.  Under “All Tasks” select the “Backup” option on the “'''LaytonServiceDesk'''’ Database.  You can give the back up a file name such as “LaytonServiceDesk.bak’, then once the backup is completed, save this in a safe location.
+
    config.xml
  
To restore a backup copy of the “'''LaytonServiceDesk'''” database use the same method to locate the options mention above, and under “All Tasks” choose the “Restore” option and select the previous “LaytonServiceDesk.bak” file to restore.
+
It is located in
  
A manual backup of the HelpBox database can also be run from within HelpBox by going to Administration | System Settings | Database Connection | Back-up Path.  Specify the backup path and then click the backup icon and this will create the backup file (LaytonServiceDesk.BAK) in the specified location.
+
    C:\Program Files (x86)\Layton Technology\Layton ServiceDesk\HB_Data\ConfigXML\
  
'''Note''' - It is recommended to make regular backups of both the '''LaytonHelpBox''' program folder and '''HelpBox''' database.
+
The file can be edited with any text editor such as Notepad.
  
=== Connecting Using NT Authentication (Trusted Connection) ===
+
==Restarting the World Wide Web Publishing Service==
 +
After manually reconfiguring the SQL connection, it is not registered unless the World Wide Web Publishing Service is restarted. This step is important.
  
The NT Authentication can be set up by editing the config.xml file in the LaytonServiceDesk/HB_Data/configXML subfolder.  The user can edit the file using any text editor such as notepad.  The sample below shows the four lines that need to be configured to allow connection to SQL server using NT Authentication.
+
=Connecting Using NT Authentication (Trusted Connection)=
<br/><br/>
+
The sample below shows the four lines that need to be configured to allow connection to SQL server using NT Authentication.
<'''appodbc label'''="'''Connection'''">(local)</'''appodbc'''><br/>
+
<'''appdb''' label="'''Database'''">LaytonServiceDesk</'''appdb'''><br/>
+
<'''appdbuid''' label="'''User ID (Blank = NT Trusted)'''"></'''appdbuid'''><br/>
+
<'''appdbpwd''' label="'''Password'''"></'''appdbpwd'''><br/>
+
<br/><br/>
+
The “appodbc” tag value of (local) should contain the server name of the SQL Server you are connecting to. This can be a server name or an IP address. The value of (local) is a default value that tells LaytonServiceDesk to connect to the same server as it is installed on.
+
  
The “appdb” tag value refers to the database within the SQL Server that LaytonServiceDesk is to connect to.  It should always be LaytonServiceDesk unless you have installed the LaytonServiceDesk database using a different name.
+
    <appodbc label="Connection">'''(local)'''</appodbc>
 +
    <appdb label="Database">'''LaytonServiceDesk'''</appdb>
 +
    <appdbuid label="User ID (Blank = NT Trusted)"></appdbuid>
 +
    <appdbpwd label="Password"></appdbpwd>
  
The “appdbuid” and “appdbpwd” tags content should be blank as shown, or LaytonServiceDesk will try to connect using SQL Server Authentication.
+
==appodbc==
 +
The server name of the SQL Server you are connecting to. This can be a server name or an IP address. If an instance is used, it should be specified, e.g. ''SERVER\SQLEXPRESS''. The value of (local) is a default value that tells LaytonServiceDesk to connect to the same server as it is installed on.
  
The NT Authentication method is the method that is used by default by the LaytonServiceDesk SQL installation routine.  For the NT authentication to work the IIS username must be added to the SQL server logins section or the user will get an error message. The IIS username is usually IUSR_machinename where machinename is the name of the IIS server.
+
==appdb==
 +
The database within the SQL Server that LaytonServiceDesk is to connect to. The default name as installed is ''LaytonServiceDesk'', unless you have installed the LaytonServiceDesk database using a different name.
  
 +
==appdbuid and appdbpwd==
 +
Should be null as shown, or LaytonServiceDesk will try to connect using SQL Server Authentication.
  
<center>[[File:Fig59.png]]
+
=Connecting Using SQL Authentication=
<br/>
+
These are the four lines that need to be configured to allow connection to SQL server using SQL Authentication. Note that the SQL user '''[[Layton ServiceDesk - FAQ - LaytonUser1 Configuration|LaytonUser1]]''' was created on installation and can be used.
'''Figure 59 - MS Enterprise Manager'''</center>
+
<br/>
+
  
 +
    <appodbc label="Connection">'''(local)'''</appodbc>
 +
    <appdb label="Database">'''LaytonServiceDesk'''</appdb>
 +
    <appdbuid label="User ID (Blank = NT Trusted)">'''SQLACCOUNTNAME'''</appdbuid>
 +
    <appdbpwd label="Password">'''PASSWORD'''</appdbpwd>
  
Figure 59 above shows the IUSR_JHAL_SERVER1 username added to the Windows NT Security Logins
+
==appodbc==
 +
The server name of the SQL Server you are connecting to. This can be a server name or an IP address. If an instance is used, it should be specified, e.g. ''SERVER\SQLEXPRESS''. The value of (local) is a default value that tells LaytonServiceDesk to connect to the same server as it is installed on.
  
 +
==appdb==
 +
The database within the SQL Server that LaytonServiceDesk is to connect to. The default name as installed is ''LaytonServiceDesk'', unless you have installed the LaytonServiceDesk database using a different name.
  
<u>'''IMPORTANT !'''</u>
+
==appdbuid==
 +
The SQL account name to be used. By default, '''[[LaytonUser1 Configuration|LaytonUser1]]''' is configured on database creation. You can use this, or another account.
  
When added to the logins, the IIS username must be given full owner access to the Layton ServiceDesk database.
+
==appdbpwd==
 
+
The SQL account's password. This is entered in plain text.
=== Connecting Using SQL Server Authentication ===
+
<p align="right">[[File:btn_back_up.png|link=User Guide for Layton ServiceDesk]] [[User Guide for Layton ServiceDesk|<u>Back to Contents</u>]]</p>
 
+
The SQL Server Authentication can be set up by editing the config.xml file in the LaytonServiceDesk/HB_Data/configXML subfolder.  The user can edit the file using any text editor such as notepad.
+
 
+
Layton ServiceDesk can be configured to connect using SQL Server Authentication by inserting a SQL server User Id between the “appdbuid” tags, and the password between the “appdbpwd” tags as in the sample below.
+
 
+
 
+
<center>[[File:Fig60.png]]
+
<br/>
+
'''Figure 60 - SQL Server Login Properties'''</center>
+
<br/>
+
 
+
<br/><br/>
+
<'''appodbc label'''="'''Connection'''">(local)</'''appodbc'''><br/>
+
<'''appdb''' label="'''Database'''">LaytonServiceDesk</'''appdb'''><br/>
+
<'''appdbuid''' label="'''User ID (Blank = NT Trusted)'''">LaytonUser1</'''appdbuid'''><br/>
+
<'''appdbpwd''' label="'''Password'''">LaytonUser1</'''appdbpwd'''><br/>
+
<br/><br/>
+
 
+
'''sa''' is the default system admin password for SQL server and as such has full access to all databases on the SQL Server.  It is recommended that you create a separate login other than sa with owner access to just the Layton ServiceDesk Database and specify this username between the appdbuid tags.  By default, Layton ServiceDesk will create an account for you called “LaytonUser1” with a password of “LaytonUser1”.  This was done to simplify the installation however you may wish to change the password to this account to increase security in the database.
+
 
+
If you clear the contents of the appdbuid tag the system will attempt to connect using NT Authentication (See Above).
+

Latest revision as of 06:02, 11 July 2017

Btn back up.png Back to Contents

Contents

[edit] Overview

Although the DBTool application is the preferred method of configuring a SQL connection, it can be configured manually. This is useful in the event where a change in the Application Database Connection settings has caused Layton ServiceDesk to lose its connection.

There are two options: NT or SQL authentication.

[edit] Location of SQL Configuration File

The SQL configuration file is

   config.xml

It is located in

   C:\Program Files (x86)\Layton Technology\Layton ServiceDesk\HB_Data\ConfigXML\

The file can be edited with any text editor such as Notepad.

[edit] Restarting the World Wide Web Publishing Service

After manually reconfiguring the SQL connection, it is not registered unless the World Wide Web Publishing Service is restarted. This step is important.

[edit] Connecting Using NT Authentication (Trusted Connection)

The sample below shows the four lines that need to be configured to allow connection to SQL server using NT Authentication.

   <appodbc label="Connection">(local)</appodbc>
   <appdb label="Database">LaytonServiceDesk</appdb>
   <appdbuid label="User ID (Blank = NT Trusted)"></appdbuid>
   <appdbpwd label="Password"></appdbpwd>

[edit] appodbc

The server name of the SQL Server you are connecting to. This can be a server name or an IP address. If an instance is used, it should be specified, e.g. SERVER\SQLEXPRESS. The value of (local) is a default value that tells LaytonServiceDesk to connect to the same server as it is installed on.

[edit] appdb

The database within the SQL Server that LaytonServiceDesk is to connect to. The default name as installed is LaytonServiceDesk, unless you have installed the LaytonServiceDesk database using a different name.

[edit] appdbuid and appdbpwd

Should be null as shown, or LaytonServiceDesk will try to connect using SQL Server Authentication.

[edit] Connecting Using SQL Authentication

These are the four lines that need to be configured to allow connection to SQL server using SQL Authentication. Note that the SQL user LaytonUser1 was created on installation and can be used.

   <appodbc label="Connection">(local)</appodbc>
   <appdb label="Database">LaytonServiceDesk</appdb>
   <appdbuid label="User ID (Blank = NT Trusted)">SQLACCOUNTNAME</appdbuid>
   <appdbpwd label="Password">PASSWORD</appdbpwd>

[edit] appodbc

The server name of the SQL Server you are connecting to. This can be a server name or an IP address. If an instance is used, it should be specified, e.g. SERVER\SQLEXPRESS. The value of (local) is a default value that tells LaytonServiceDesk to connect to the same server as it is installed on.

[edit] appdb

The database within the SQL Server that LaytonServiceDesk is to connect to. The default name as installed is LaytonServiceDesk, unless you have installed the LaytonServiceDesk database using a different name.

[edit] appdbuid

The SQL account name to be used. By default, LaytonUser1 is configured on database creation. You can use this, or another account.

[edit] appdbpwd

The SQL account's password. This is entered in plain text.

Btn back up.png Back to Contents

Personal tools
Namespaces

Variants
Actions
Main Page
Online User Guides
General Support
Release Notes
Toolbox