Back

Topic

[KB484]Troubleshooting HDS database creation or connection

Tags: HDS, SQL Server

14 years ago
By RM
Options
Print
Applies to:

PcVue version 8.10 onwards.


Summary:

You start PcVue with a data archiving configuration using the HDS and that doesn’t work!

Here is a checklist for troubleshooting the problem.


Details:

a) Check whether the SQL server (or SQL Server Express) is properly installed

By default the installation of PcVue doesn’t install SQL Server automatically. (Parts of the installation are shown as “SQL server client connectivity” but that is not an installation of SQL Server, just prerequisites for the HDS.).

There is a version of SQL Express Server on PcVue software media (CD or DVD). Refer to the Pcvue Installation help file for guidance on installing it.

The version on the media is in English. For versions in other languages, or to check if there is a newer version, visit the Microsoft website and search for SQL Express.

b) Check whether the connection to the SQL Server is set up correctly

Create a file text (test.txt) on the desktop. Rename it as test.udl. (The icon must change appearance.) Double-click on the file. Return to the first tab (Provider) and select Microsoft OLE DB Provider for  SQL server.

In the Connection tab, select the Server: “.\SQLServerExpressInstanceName”  or “LOCALHOST\SQLServerExpressInstanceName

For example, if you accepted the default name for your SQL Express instance, you will use the syntax “.\ SQLEXPRESS” or “LOCALHOST\ SQLEXPRESS”

Select the option for login and select a database.

If an error occurs when you select the database (Error message …), then the problem is not to do with the HDS but with the SQL Server configuration.

For example, you might not have enabled network connections to the SQL Server. In that case, you are best to refer to the Database Manager help and locate the topic Authorizing SQL Server.

You should also check that the firewall is preventing operation. If it is read the help topic Replication Across A Firewall for how to manage this.

Check the User and PassWord used.

c) The HDS doesn’t create a database

You can configure the archive unit and the HDS database either manually or using the wizard. The PcVue Database Configuration Wizard only applies the configuration (to generate the hdsconf.dat file).

The HDS will only create the databases at next PcVue project start-up.

When you create the related archive unit, you must at least define a log list and/or a trend variable, otherwise the database will not be created in SQL Server.

d) The HDS still does not create a database

For a default configuration, the path used for the databases is “C:\Program Files\Arc Informatique \… \ Databases”.

In the hds log file you may find an entry with an error of the following type:

CDbMgtSQLServer::CreateDatabase LPSQLDMODATABASES Add Trace=-2147219702,Result=1242720 [Microsoft][ODBC SQL Server Driver][SQL Server]CREATE FILE encountered operating system error 5 (Access refused.) while attempting to open or create the physical file ‘C:\PROGRA~1\ARCINF~1\810ena\bin\..\Databases\TEST_DB1.mdf’.

This means that, if the PC’s hard drive is formatted in NTFS, the user who runs the SQL Server doesn’t have the Write permission for this folder.

You then have to give that user the Write permission for the NTFS folder. The username to select is not that of the logged-in user but the user identified in SQLServer2005MSSQLUsers$HostName$InstanceName.

where HostNamecontains the name of the PC and InstanceName is the name ofthe SQL Server instance (if it is a named instance).

e) If that still doesn’t work: please contact Technical Support.


Created on: 12 Aug 2011 Last update: 04 Sep 2024