> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/datran/datran-vi-scada/datran-trending/troubleshooting/not-a-valid-database.md).

# Trending won't start or says it isn't a valid DATRAN database

DATRAN Trending won't open, can't connect, or says the database isn't a valid DATRAN database. Check the connection, the SQL login, the licence and the version.

If the application does not start there can be a problem with the connection to the database. If this is the case no data will be displayed and the application will assume that there is no database to connect to. The connection will need to be checked. If you can't switch the database and it keeps saying "...invalid DATRAN database", work through the checks below.

{% hint style="info" %}
**Applies to:** DATRAN Trending V5.x. For a database that has just moved to a new SQL Server, also see [DATRAN won't connect to the SQL database](https://help.qtech.co.nz/datran/datran-vi-scada/datran-vi/troubleshooting/cannot-connect-to-sql.md#trending-cant-use-the-new-database).
{% endhint %}

## Check, in this order

1. Ensure that the DATRAN database exists on the computer specified. Ensure that this is the DATRAN database which DATRAN logs daily information to.
2. **Check the connection.** Use the Switch Database (**Data Link Properties**) dialog box. You can access this dialog box via the main menu **Database > Switch Database**:
   * Check that under the **Provider** tab there is a **Microsoft OLE DB Provider for SQL Server** option and it is currently selected.
   * **Connection** tab: ensure that the server name is set to the SQL Server computer where your DATRAN database resides. The alternative is to use the IP address of the SQL Server computer and the port number of the SQL Server instance. Each SQL Server instance should have its own port number. Do not type in the IP address together with the SQL Server instance.
   * Choose either **Use Windows NT Integrated security** or **Use a specific user name and password**. Note that the former is the preferred method of authentication.
   * Ensure that DATRANdatabase is selected under **Select the database on the server** (if DATRANdatabase is the name of your database). Check your spelling, especially the name of the SQL server and database name. Where possible, choose these values from the drop down combo boxes.
   * Click on the **Test Connection** button to ensure that it will connect properly. Keep testing until it works.
3. **Check the login in SQL Server.** Double check that you can sign into the database using the account info via SQL Server Management Studio, and keep testing the connection in Trending till it works. Make sure that the SQL login is not a Viewer role, it must be at least a User role.
4. **Re-enter the licence key.** Manually re-enter the license key. See [The licence won't stick or Enter License is greyed out](https://help.qtech.co.nz/datran/datran-vi-scada/datran-trending/troubleshooting/licence-will-not-stick.md).
5. **Try another provider.** If initializing the database provider fails: usually in the Data Link Properties dialog (**Database > Switch Database**) the **Provider** tab will have "Microsoft OLE DB Provider for SQL Server" selected. Occasionally you might need to change this to "SQL Server Native Client 11.0" (or 10.0). Use this with caution.

## Invalid object name tblPlotNotes

The message reads "Invalid object name 'tblPlotNotes'".

Trending v5 has a new database table associated with the feature of adding "sticky notes" to the plots. There is a one off task needed and a potential compatibility issue. If you get this message, check that you have run Trending 5 at least once using a Windows or SQL user that has administrative access over the DATRAN database.

* A user with administrative access over the DATRAN database should look like this in SQL Server Management Studio. Pass this to your SQL Server administrator to confirm.
* If you are using v4 on the DATRAN base station, and attempt to install v5 on a user's machine, the "Test Connection" will work, but when you launch Trending you are likely to get this message. In this scenario, either roll back the user version to v4x or perform the v5 install with admin rights to the server.

## A version error after an upgrade

The structure of the database has changed between v5.01 and v5.03. When you first run Trending after installing v5.03 you may see an error message. If **Force Version Update** is greyed out, first ensure that Trending is in Expert Mode, which can be selected from the **View** menu. Then select **Force Version Update** from the **Database** menu, confirm, and restart Trending. See [Upgrade from V5.01 or earlier](https://help.qtech.co.nz/datran/datran-vi-scada/datran-trending/install.md).

## "The user name ... could not be found"

If the application is displaying the message "The user name ... could not be found. Please add ... as a local user to this computer", check that your user name is included in the list of users on this computer. Use the user accounts tool via Start | Settings | Control Panel | User Accounts. Click on the Advanced button, select the Users node, then from the main menu select Action | New User... and fill in your user name and password.

## Access to the registry and folders

If the application is having problems accessing the registry keys and/or folders, check that you are logged in as a user that is able to create, open, write to and read from registry keys and/or folders.

## Still not working? Contact QTech

Email <techsupport@qtech.co.nz> with the exact message, your Trending version, and the SQL Server version.
