MS SQL®-Serverinstallation

Gehen Sie wie folgt vor, um den MS SQL®-Server auf Ihrem Betriebssystem zu installieren:

TCP/IP aktivieren

Der MS SQL® Server muss das TCP/IP-Protokoll verwenden können. Um eine TCP/IP-Verbindung zu aktivieren, befolgen Sie die Anweisungen unter https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-a-server-to-listen-on-a-specific-tcp-port?view=sql-server-ver16

DB-Schema Erstellung

  • Hier wird z.B. "D:/mssql"-Verzeichnis für Windows als Haupt-Verzeichnis für das Speichern der WinCC OA-Datenbank verwendet.
  • Erstellen Sie die Datenbank-Verzeichnisse:
    • D:/mssql/db
    • D:/mssql/backups

Ein DB-Schema erstellen

Navigieren Sie zu wincc_oa\data\NGA\MSSQLServer\Sql

  • Setzen Sie die Datenbankparameter in db.windows.config für Windows oder in db.linux.config für Linux. Die verfügbaren Parameter inklusive Defaultwerte sind unten angeführt.
    CAUTION:
    Beachten Sie, dass derzeit nur Buchstaben und Zahlen ([a-zA-Z0-9]) für den Inhalt der db.windows.config file-Datei verwendet werden können.
    # DB connection settings
    dbServer=localhost    	      # Server name.
    port=1433		            # Server port.
    adminUsername=sa		     # Database administrator user. The database that will be created will belong to the associated user.
    adminPassword=password	      # Database administrator user password.
    winccoaLogin=winccoa		 # Database server login. The login will be created if it does not exists.
    winccoaUsername=winccoa	     # Database user. The user will be created if it does not exists. The user will get minimum permission to work with the backend.
    winccoaPassword=password	    # Database user password.
    dbName=winccoa			# Name of DB instance to create.
    
    # DB specific options
    sqlscriprtpath=schema.sql          # The path to the SQL file to create the schema.
    numberType=DOUBLE PRECISION	 # Colum type of float values. Possible values are: DOUBLE PRECISION and NUMERIC
    dbInitSize=8MB                     # Specifies the initial size of the data file. The kilobyte (KB), megabyte (MB), gigabyte (GB), or terabyte (TB) suffixes can be used. Examples: 2KB, 2MB, 2GB, 2TB.
    dbFileGrowth=64MB                  # Specifies the automatic growth increment of the data file. The kilobyte (KB), megabyte (MB), gigabyte (GB), or terabyte (TB) suffixes can be used. Examples: 2KB, 2MB, 2GB, 2TB.
    logInitSize=8MB                    # Specifies the initial size of the log file. The kilobyte (KB), megabyte (MB), gigabyte (GB), or terabyte (TB) suffixes can be used. Examples: 2KB, 2MB, 2GB, 2TB.
    logFileGrowth=64MB                 # Specifies the automatic growth increment of the log file. The kilobyte (KB), megabyte (MB), gigabyte (GB), or terabyte (TB) suffixes can be used. Examples: 2KB, 2MB, 2GB, 2TB.
    logMaxSize=2097152MB               # Specifies the maximum size to which the log file can grow. The kilobyte (KB), megabyte (MB), gigabyte (GB), or terabyte (TB) suffixes can be used. Exam-ples: 2KB, 2MB, 2GB, 2TB.
    
    # DB directories
    dbPath="d:\mssql\db"		 # Path to DB schema files.
    dbBackupPath="d:\mssql\backups"    # Path to backed up segment files.
                        
    • Im Verzeichnis wincc_oa\data\NGA\MSSQLServer\Sql, führen Sie create_database_windows.ps1 für Windows oder create_database_linux.sh für Linux aus, um ein DB-Schema zu erstellen.
    • Es können auch Kommandozeilenparameter für create_database_windows.ps1 und create_database_linux.sh anstatt der Konfigdatei verwendet werden. Für die Kommandozeilenparameter, siehe Kapitel Database settings .
    Note:
    Das Backup-Verzeichnis muss für Benutzer, unter den WinCC OA läuft, freigegeben sein.

WinCC OA und MS SQL®-Server auf separaten Servern

Damit ein WinCC OA-Pojekt mit MS SQL® Server-Backend funktioniert, gehen Sie wie folgt vor:

Auf dem Datenbank-Server

Installieren Sie den MS SQL®-Server (siehe das Setup der MS SQL® Server DB).

Auf dem WinCC OA-Server:

Windows:

Linux: