Installation

Installation happens in two stages: on the IBM i (TCP services and license, once per partition), then on the .NET side (the NuGet package and a first program).

1. Start the IBM i TCP/IP services

The *DATABASE, *RMTCMD and *SIGNON TCP services must be running. If they are not, start them with the following commands:

  • STRTCPSVR SVR(*DATABASE)
  • STRTCPSVR SVR(*RMTCMD)
  • STRTCPSVR SVR(*SIGNON)

2. Install the NTi license (IBM i)

Retrieve the automatically generated SQL script from the client portal. It contains your license key and the values associated with your partition (a free 30-day trial license is available).

Open Run SQL Scripts (ACS), then run the script provided by the client portal (the script below is given for reference only):

CL: CRTLIB KNTI;
CREATE TABLE KNTI.NTI (SN VARCHAR(10), PN VARCHAR(10), DAT CHAR(8), NTI VARCHAR(344));
LABEL ON TABLE KNTI.NTI IS 'AUMERIAL NTi License';
LABEL ON COLUMN KNTI.NTI.SN IS 'System serial number';
LABEL ON COLUMN KNTI.NTI.PN IS 'LPAR Id';
LABEL ON COLUMN KNTI.NTI.DAT IS 'End date';
LABEL ON COLUMN KNTI.NTI.NTI IS 'License key';
INSERT INTO KNTI.NTI (SN, PN, DAT, NTI) VALUES ('...', '...', '...', '...');

To renew the license, retrieve the renewal script from the client portal and run it the same way; the update takes effect immediately, with no action required on the .NET side:

UPDATE KNTI.NTI SET DAT = '...', NTI = '...';

Note: the license is looked up in the KNTI library by default; another library can be designated with the license library connection keyword. Each key is tied to one partition (serial number and partition id) and is valid for a limited period.


3. Reference the NuGet package

Add the Aumerial.Data.Nti package to your project:

dotnet add package Aumerial.Data.Nti --version 5.0.0

or directly in the project file:

<PackageReference Include="Aumerial.Data.Nti" Version="5.0.0" />

The package is 100% managed and AnyCPU: nothing else to install, neither on the client nor on the IBM i.

Note: applications written for NTi 4 compile and run on version 5 without modification. For Entity Framework Core, also add the Aumerial.EntityFrameworkCore package in the version matching your EF Core: 8.5.0 (EF Core 8), 9.5.0 (EF Core 9) or 10.5.0 (EF Core 10).


4. First program

The following program opens a connection, which validates the license along the way, and runs a first SQL query. It is the quickest way to validate the whole installation (TCP/IP services, license, network). Async is NTi's normal path: opening, execution and disposal honor the cancellation token end to end.

using System;
using System.Data;
using System.Threading.Tasks;
using Aumerial.Data.Nti;

class Program
{
    static async Task Main()
    {
        // Replace SERVER, USERNAME and PASSWORD with the address (IP or host name)
        // of your IBM i partition, your user profile and your password.
        var connectionString = "server=SERVER;user=USERNAME;password=PASSWORD;pooling=true";

        await using var connection = new NTiConnection(connectionString);
        await connection.OpenAsync();

        if (connection.State == ConnectionState.Open)
        {
            Console.WriteLine("IBM i connection and NTi license OK.");
            Console.WriteLine($"SQL job: {connection.DatabaseJob}");
        }

        using var command = connection.CreateCommand();
        command.CommandText = "SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1";
        var database = await command.ExecuteScalarAsync();
        Console.WriteLine($"Current database: {database}");
    }
}

The same is available synchronously (Open, ExecuteScalar), notably for .NET Framework or existing code:

using System;
using System.Data;
using Aumerial.Data.Nti;

class Program
{
    static void Main()
    {
        var connectionString = "server=SERVER;user=USERNAME;password=PASSWORD";

        using (var connection = new NTiConnection(connectionString))
        {
            connection.Open();
            Console.WriteLine("IBM i connection and NTi license OK.");

            using (var command = connection.CreateCommand())
            {
                command.CommandText = "SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1";
                Console.WriteLine($"Current database: {command.ExecuteScalar()}");
            }
        }
    }
}

Note: connection pooling is inactive by default; pooling=true is strongly recommended for web and service workloads. All timeouts are unlimited by default (0 = infinite). See the Connection page for the full keyword list.


5. AI assistants: install the NTi skill (optional)

The package ships a skill for development agents (Claude Code and compatible agents): connection strings, SQL, CL commands, program calls and IBM i pitfalls are described so the agent writes correct NTi code from the start. Installation is opt-in; nothing is installed by default:

dotnet msbuild -t:NTiInstallAgentSkills

The target copies the skill into .claude/skills/nti-ibmi-provider/ at the repository root; the agent then loads it automatically whenever the code involves NTi.


What's next?

Your environment is ready. Continue with:

Reconnecting to the server...

The connection to the server was lost. The page will reload.