Using MSSQL for Collection Database

Installation Guide for MS-SQL database back end support
Tested Environment: Windows XP and Windows 2003 Server

Tested MS-SQL installation: Microsoft SQL server 2005 Express Tested C++ Compiler: Microsoft Visual C++ 2008 Express Edition Build time setup  Modified files  perllib/dbutil.pm

 

Installation requirements  Microsoft SQL server 2005 Microsoft SQL server 2005 Manager Microsoft Visual C++ 2008 Express Edition

Active Perl</li> </ul> </li>

Perl Module required: DBD:ADO Following are the steps for installing DBD:ADO manually  make sure ActivePerl is installed</li>

Make sure Visual C++ is installed</li> Go to CPAN and download the source package</li> Untar it and run Makefile.PL</li> Run "nmake", "nmake test" and "nmake install"</li> </ul> </li>

Database creation We need to create database manually, use the Manager and create a database You can basically call it anything you like You will need to set this database name in the dbutil.pm    </li>

Configuration for the dbutil.pm

Open the dbutil.pm file and search for the following lines my $host = "localhost,1660"; # Need to look up your SQL server and see what port is it using. my $user = "sa"; my $pwd = "[When installing the MSSQL, you will be asked to input a password for the sa user, use that password]"; my $database = "[Create a database in MSSQL and use it here]"; 

$host Go to [Programs]=>[Microsoft SQL Server 2005]=>[Configuration Tools]=>[SQL Server Configuration Manager] Under [SQL Server 2005 Network Configuration]=>[Protocols for SQLEXPRESS] You need to make sure TCP/IP is enabled Right click on the properties and find the "TCP Dynamic Ports" in the "IP Address" tab </li> $user and $pwd

When installing the "Microsoft SQL server 2005 Express" You should be asked to input a password for the "sa" user. </li> $database Set it to whatever database you have created. Uncomment the following lines to enable DBD:ADO use DBI;

use DBD::ADO; Win32::OLE->Option(CP => Win32::OLE::CP_UTF8); </li> </ul> </li>

collect.cfg configuration Open your collection's collect.cfg file and add (or set) "infodbtype mssql" </li>

Additional information Once the index is created, you will find the mssql connection information for the runtime code in index/text/[collection].mssdbinfo </li> </ul>

Runtime setup  <li>Modified files <ul> <li>win32.mak</li>

<li>runtime-src/win32.mak</li> <li>runtime-src/src/colservr/win32.mak</li> <li>runtime-src/src/colservr/collectset.cpp</li> <li>common-src/win32.mak</li> <li>common-src/src/lib/win32.mak</li> <li>common-src/src/lib/mssqldbclass.cpp</li>

<li>common-src/src/lib/mssqldbclass.h</li> </ul> </li> <li>msado Make sure you have C:\Program Files\Common Files\System\ado\msado27.tlb If not, edit the mssqldbclass.h to use C:\Program Files\Common Files\System\ADO\msado15.dll instead </li>

<li>Build the system In GSDLHOME, do nmake /f win32.mak USE_MSSQL=1 </li> </ul>