Skip to main content
Skip table of contents

Configure the SQL Server database

In this article, you will learn how to create and configure the SQL Server database to use NDD Print MF HP.

Considerations before starting

  • If you are upgrading NDD Print MF HP from version 5.24.0 to 5.25.8, perform the Database settings update after installation.

  • This configuration is only for scenarios in which the NDD Print MF HP installation or upgrade was carried out using the “I have a SQL Server database and want to use it” option.

  • This setting must be made before adding new printers to NDD Print MF HP.

  • It is recommended that you always use a unique database for NDD Print MF HP.

  • Only administrator users can configure the database.

  • If you already have an operational database being used by other NDD Print MF HP, the new NDD Print MF HP that will be connected to the same database must be removed and reinstalled by selecting the option “I have a PostgreSQL or SQL Server database and I want to use it”.

Configuring database access

  1. Open the NDD Print MF HP interface

  2. In the menu, click on Tools > Settings

image-20240628-164907.png
  1. Select SQL Server

  2. Fill in the database information

If you use a user with database creation permission, NDD Print MF HP will create the database and migrate the data. If you don't have create permission, use the SQL script.

  1. Click Apply > OK

Using an SQL script

If you prefer, you can use the SQL script to create the tables in the database.

You need a user with permission to create a database.

  1. Go to the NDD Print MF HP installation folder

  2. Open the Initial_Migration_Script_Billing_Control.sql file and copy its contents

  3. In pgAdmin, right-click on the created database

  4. Click on New query

  5. Paste the contents of the Initial_Migration_Script_Billing_Control.sql file and click execute

  6. When finished, configure access to the database

Database settings update

This configuration should only be done if you are upgrading NDD Print MF HP from version 5.24.0 to 5.25.8.

In environments where NDD Print MF HP is already installed in versions 5.24 to 5.25.8, it is necessary to run an SQL script in the database to create the tables missing in these versions.

The script should only be run after updating NDD Print MF HP using the installation package provided by NDD Tech. After completing the update using the installation package, follow the steps below:

  1. Update NDD Print MF HP using the official installation package.

  2. After completing the update process, open the NDD Print MF HP installation folder.

  3. Locate the file CreateDatabaseSQLServerMFHP.sql in the NDD Print MF HP installation folder and copy its contents.

  4. Open SQL Server Management Studio (SSMS).

  5. In Object Explorer, locate the existing MF HP database, which corresponded to version 5.24 to 5.25.8

  6. Right-click on the database and select New Query.

  7. Paste and run the script copied in step 3

  8. Click Execute or press F5.

After completing the above steps, NDD Print MF HP should be updated and all tables should be configured correctly in the database.

Auto Close parameter

Change the Auto Close parameter to False in the database - SQL Server

In certain scenarios using SQL Server databases, the Auto Close parameter may be set to True, when it should ideally be set to False.

If this situation is identified in the environment, follow the steps below to make the change and ensure that the parameter remains set to False:

Option 1 — SSMS (SQL Management Studio)
  1. Open SSMS and connect to the instance.

  2. In Object Explorer, expand Databases.

  3. Right-click on the desired databaseProperties.

  4. Go to Options.

  5. Under Automatic, locate Auto Close and set it to False.

  6. Click OK.

  7. Refresh Object Explorer (F5).

Option 2 — T-SQL (a database)
  1. Open SQL Server Management Studio (SSMS).

  2. In Object Explorer, expand the instance where the database is located.

  3. Right-click on the desired database and select New Query.

  4. In the blank query window that opens, paste the script below, replacing YourDatabase with the name of the database:

    SQL
    ALTER DATABASE [SeuBanco] SET AUTO_CLOSE OFF;
  5. Click Execute or press F5.

  6. To validate that the change has been applied, paste and execute the following command:

    SQL
    SELECT name, is_auto_close_on
    FROM sys.databases
    WHERE name = N'SeuBanco';
    -- is_auto_close_on = 0 indicates OFF (False)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.