KB: Configuring SQL Database Library to display only relevant tables

Altium Designer Altium Designer
When using an SQL Connection String in the Altium Database library, you may encounter an issue where unwanted tables are listed alongside the desired tables. This article explains why this happens and provides instructions on how to configure the Database Library to display only the relevant tables.

Solution Details

The Altium Database library is displaying a number of unwanted tables when connected to an SQL database using an ODBC Connection String.

This typically occurs because:

1. The ODBC configuration is set to display system tables
2. No specific schema or search path has been defined in the connection settings
3. The user account used for the connection has visibility to all tables in the database

To address these issues, consider the following solutions:

1. Disable System Tables in ODBC Configuration

The SQL-based Database Library might be displaying system tables due to your ODBC configuration settings. To disable them:

1. Open the ODBC Configuration with administrator rights
2. Navigate to the System DSN tab and select your Database source
3. Click the Configure button
4. Click on the Database option
5. Locate the setting Show system tables and disable it
6. Click Apply and then OK
7. In the Altium Database library, switch the Source of Connection to Microsoft Access and then back to Use Connection String
8. Click Reconnect
9. Verify the table list now shows only the relevant tables

The changes should result in system tables no longer being displayed in your Database Library. For further configuration details, refer to: PostgreSQL ODBC Configuration Documentation.

2. Setting a Specific Search Path for Tables in ODBC Configuration 

When your database containts multiple tables within the schema and you want to target specific tables:

1. Configure the ODBC connection with a specific search path
2. For example, add the following to your connection settings: SET search_path To myschema,public;
3. This will restrict the tables shown to only those in the specified schema

For more details refer to: Stack Overflow: Setting Search Path to Schema in PostgreSQL using ODBC.

3. Hide SQL Tables for Specific Users

You can also hide SQL tables in the SQL server database for specific user logins:

1. Configure the user login that you use for the DB library connection or ODBC configuration
2. Set appropriate permissions to hide irrelevant tables
3. This ensures that other tables are hidden and not visible for the user

For further configuration details, refer to: PostgreSQL ODBC Configuration Documentation

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.