;Файл настроекS:\Wrk9x32\DBTypes.ini драйверов для сервера ТБ.
;(c) 1991-2014 ЗАО "ДИЦ"
;Осторожно при изменении данного файла.
;Это может привести к неработоспособности ТБ.

[General]
Version=31

[DriversInfo]
;Default - База данных может использоваться по умолчанию (создаваться автоматически)
;Directory, File, Alias - Это каталог, файл (указывается расширение) или псевдоним

;-------------------------------- MS SQL ---------------------------------------

MSSQL2019_ADO=Default,Alias=MS SQLServer 2019
MSSQL2017_ADO=Default,Alias=MS SQLServer 2017
MSSQL2016_ADO=Default,Alias=MS SQLServer 2016
MSSQL2014_ADO=Default,Alias=MS SQLServer 2014
MSSQL2012_ADO=Default,Alias=MS SQLServer 2012
MSSQL2008_ADO=Default,Alias=MS SQLServer 2008
MSSQL2005_ADO=Default,Alias=MS SQLServer 2005
MSSQL2000_ADO=Default,Alias=MS SQLServer 2000
MSSQL7_ADO=Default,Alias=MS SQLServer 7

MSSQL_DBX=Alias=MS SQLServer (dbExpress)

MSSQL2005_Express_ADO=Alias,Hidden=MS SQLServer 2005 Express

MSSQL2014_BDEODBC=Alias,Hidden=MS SQLServer 2014 (BDE&ODBC)
MSSQL2012_BDEODBC=Alias,Hidden=MS SQLServer 2012 (BDE&ODBC)
MSSQL2008_BDEODBC=Alias,Hidden=MS SQLServer 2008 (BDE&ODBC)
MSSQL2005_BDEODBC=Alias,Hidden=MS SQLServer 2005 (BDE&ODBC)
MSSQL2000_BDEODBC=Alias,Hidden=MS SQLServer 2000 (BDE&ODBC)
MSSQL7_BDEODBC=Alias,Hidden=MS SQLServer 7 (BDE&ODBC)

;-------------------------------- MS SQL CE ------------------------------------

MSSSQL_CE_40_ADO=Default,Alias(.sdf)=MS SQLServer Compact 4.0
MSSSQL_CE_35_ADO=Default,Alias(.sdf)=MS SQLServer Compact 3.5

;-------------------------------- MS Access ------------------------------------

MSAccess2007=File(.accdb)=MS Access 2007
MSAccess=File(.mdb)=MS Access

;-------------------------------- InterBase ------------------------------------

Interbase_DBX=Default,File(.gdb)=Interbase

;Interbase6=File(.gdb)=IB Database 6
;Interbase55=File(.gdb)=IB Database 5.5
;Interbase4=File(.gdb)=IB Database 4

;-------------------------------- FireBird -------------------------------------

Firebird_DBX=Default,File(.fdb)=Firebird (Ansi)
Firebird_DBX_Unicode=Default,File(.fdb)=Firebird (Unicode)

Firebird_Embedded=Default,File(.fdb)=Firebird Embedded (Ansi)
Firebird_Embedded_Unicode=Default,File(.fdb)=Firebird Embedded (Unicode)

;Firebird_ADO=Default,File(.fdb)=Firebird (ADO)

;-------------------------------- Sybase ---------------------------------------

Sybase5=File(.db)=Sybase SQL Anywhere 5

;-------------------------------- Informix -------------------------------------

;Informix_ADO=Alias=Informix Dynamic Server
Informix_BDEODBC=Alias=Informix Server (BDE&ODBC)
Informix_ADOODBC=Alias=Informix Server (ADO&ODBC)

;-------------------------------- Oracle ---------------------------------------

Oracle_DBX=Default,Alias=Oracle

;-------------------------------- Cache' ---------------------------------------

;Cache4_ADOODBC=Alias=InterSystems Cache 4 (ADO&ODBC)
;Cache4_BDEODBC=Alias=InterSystems Cache 4 (BDE&ODBC)

;-------------------------------- PostgreSQL ---------------------------------------

PostgreSQL_DBX=Default,Alias=PostgreSQL
PostgreSQL_ADO=Alias=PostgreSQL (ADO)
PostgreSQL_ODBC=Alias=PostgreSQL (ODBC)

;-------------------------------- MySQL ----------------------------------------

MySQL55_DBX=Alias,Hidden=MySQL 5.5
MySQL51_DBX=Alias,Hidden=MySQL 5.1
MySQL50_DBX=Alias,Hidden=MySQL 5.0
MySQL5X_DBX_Ansi=Default,Alias=MySQL (Ansi)
MySQL5X_DBX_Unicode=Default,Alias=MySQL (Unicode)

;-------------------------------- Pervasive ------------------------------------

;Pervasive_SQL_87_ADOODBC_Engine=Alias=Pervasive.SQL 8.7 (ADO&ODBC Engine)
Pervasive_SQL_87_ADOODBC_Client=Alias=Pervasive.SQL 8.7 (ADO&ODBC Client)

;-------------------------------- Linter ---------------------------------------

Linter61_DBX=Default,Alias=Linter 6.1 (dbExpress)
Linter60_DBX=Default,Alias=Linter 6.0 (dbExpress)
Linter61_ADO=Default,Alias=Linter 6.1 (ADO)
Linter60_ADO=Default,Alias=Linter 6.0 (ADO)

;-------------------------------- SQLite ---------------------------------------

SQLite_DBX=Default,File(.db)=SQLite

;-------------------------------- Other ----------------------------------------

Progress9c=Alias=Progress 9c
Paradox=Default,Directory=Paradox
DBase=Directory=DBase(Внешняя)


;-------------------------------------------------------------------------------

[DriversInfo.CheckInstalled]
Paradox=[SOFTWARE\Borland\Database Engine\Settings\DRIVERS\PARADOX\INIT]
DBase=[SOFTWARE\Borland\Database Engine\Settings\DRIVERS\DBASE\INIT]

MSSQL2019_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\150]
MSSQL2017_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\140]
MSSQL2016_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\130]
MSSQL2014_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\120]
MSSQL2012_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\110]
MSSQL2008_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\100]
;MSSQL2005_Express_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS]
MSSQL2005_Express_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\CurrentVersion],CurrentVersion=9.*
MSSQL2005_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\90]
MSSQL2000_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\80]
MSSQL7_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server 7.0], [SOFTWARE\Microsoft\MSDE\7.00.000]

;MSSSQL_CE_35_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\GAC]
MSSSQL_CE_35_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5]
MSSSQL_CE_40_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v4.0]

Oracle_DBX=[SOFTWARE\ORACLE]

Interbase_DBX=[SOFTWARE\Embarcadero\InterBase\Servers]
Firebird_DBX=[SOFTWARE\Firebird Project\Firebird Server]
Firebird_DBX_Unicode=[SOFTWARE\Firebird Project\Firebird Server]
Firebird_Embedded=File:%T9Bin%\FBE\fbembed.dll
Firebird_Embedded_Unicode=File:%T9Bin%\FBE\fbembed.dll

;MySQL55_DBX=[SOFTWARE\MySQL AB\MySQL Server 5.5]
;MySQL51_DBX=[SOFTWARE\MySQL AB\MySQL Server 5.1]
;MySQL50_DBX=[SOFTWARE\MySQL AB\MySQL Server 5.0]
MySQL5X_DBX_Ansi=[SOFTWARE\MySQL AB]
MySQL5X_DBX_Unicode=[SOFTWARE\MySQL AB]

PostgreSQL_DBX=[SOFTWARE\PostgreSQL]

Linter61_DBX=[SOFTWARE\Relex, Ltd.\Linter SQL Server],Version=6.1.*
Linter60_DBX=[SOFTWARE\Relex, Ltd.\Linter SQL Server],Version=6.0.*
Linter61_ADO=[SOFTWARE\Relex, Ltd.\Linter SQL Server],Version=6.1.*
Linter60_ADO=[SOFTWARE\Relex, Ltd.\Linter SQL Server],Version=6.0.*

SQLite_DBX=File:%T9Bin%\DBXSQLiteDrv.dll

[DriversInfo.CheckInstalled:Linux]
SQLite_DBX=File:%T9Bin%/libDBXSQLiteDrv.so  

[DriversInfo.CheckDefaultInstance]
;Определение дефолтового сервера СУБД
;<Драйвер>=<Секция в реестре с дефолтовым сервером>,<Имя значения>=<Чему равно>
MSSQL2019_ADO=[SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion],CurrentVersion=15.*
MSSQL2017_ADO=[SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion],CurrentVersion=14.*
MSSQL2016_ADO=[SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion],CurrentVersion=13.*
MSSQL2014_ADO=[SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion],CurrentVersion=12.*
MSSQL2012_ADO=[SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion],CurrentVersion=11.*
MSSQL2008_ADO=[SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion],CurrentVersion=10.*
MSSQL2005_ADO=[SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion],CurrentVersion=9.*
MSSQL2000_ADO=[SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion],CurrentVersion=8.*
MSSQL_DBX=[SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion],CurrentVersion=*

[DriversInfo.CheckInstance]
;Определение именованных инсталяций серверов СУБД
;<Драйвер>=<Секция в реестре со списком инсталяций>,<Секция в реестре что сравнивать>,<Имя значения>=<Чему равно>
MSSQL2019_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\InstalledInstances],[SOFTWARE\Microsoft\Microsoft SQL Server\%Instance%\MSSQLServer\CurrentVersion],CurrentVersion=15.*
MSSQL2017_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\InstalledInstances],[SOFTWARE\Microsoft\Microsoft SQL Server\%Instance%\MSSQLServer\CurrentVersion],CurrentVersion=14.*
MSSQL2016_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\InstalledInstances],[SOFTWARE\Microsoft\Microsoft SQL Server\%Instance%\MSSQLServer\CurrentVersion],CurrentVersion=13.*
MSSQL2014_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\InstalledInstances],[SOFTWARE\Microsoft\Microsoft SQL Server\%Instance%\MSSQLServer\CurrentVersion],CurrentVersion=12.*
MSSQL2012_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\InstalledInstances],[SOFTWARE\Microsoft\Microsoft SQL Server\%Instance%\MSSQLServer\CurrentVersion],CurrentVersion=11.*
MSSQL2008_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\InstalledInstances],[SOFTWARE\Microsoft\Microsoft SQL Server\%Instance%\MSSQLServer\CurrentVersion],CurrentVersion=10.*
MSSQL2005_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\InstalledInstances],[SOFTWARE\Microsoft\Microsoft SQL Server\%Instance%\MSSQLServer\CurrentVersion],CurrentVersion=9.*
MSSQL2000_ADO=[SOFTWARE\Microsoft\Microsoft SQL Server\InstalledInstances],[SOFTWARE\Microsoft\Microsoft SQL Server\%Instance%\MSSQLServer\CurrentVersion],CurrentVersion=8.*
MSSQL_DBX=[SOFTWARE\Microsoft\Microsoft SQL Server\InstalledInstances],[SOFTWARE\Microsoft\Microsoft SQL Server\%Instance%\MSSQLServer\CurrentVersion],CurrentVersion=*

Interbase_DBX=[SOFTWARE\Embarcadero\InterBase\Servers\*],[SOFTWARE\Embarcadero\InterBase\Servers\%Instance%],Version=*

MySQL5X_DBX_Ansi=[SOFTWARE\MySQL AB\*],[SOFTWARE\MySQL AB\%Instance%],Version=5.*
MySQL5X_DBX_Unicode=[SOFTWARE\MySQL AB\*],[SOFTWARE\MySQL AB\%Instance%],Version=5.*

PostgreSQL_DBX=[SOFTWARE\PostgreSQL\Services\*],[SOFTWARE\PostgreSQL\Services\%Instance%],Product Code=postgresql*

Oracle_DBX=[SOFTWARE\ORACLE\KEY_*],[SOFTWARE\ORACLE\%Instance%],ORACLE_HOME_NAME=*

[DriversInfo.CheckExcludeInstance]
;Определение неподдерживаемых именованных инсталяций серверов СУБД
;<Драйвер>=<список имён инсталяций через запятую>
;Windows Internal Database
MSSQL2005_ADO=MICROSOFT##SSEE


;-------------------------------------------------------------------------------

[General.Common]
; Способ авторизации. Допустимые значения: Server, Windows, Prompt
  AuthorizationMode=Prompt

  DefaultStringFieldSize=250
  MaxStringFieldSize=250
  MaxIndexedStringFieldSize=250
  MaxUniqueStringFieldSize=250

; MaxIndexedNumStringFieldSize=MaxStringFieldSize
; MaxUniqueNumStringFieldSize=MaxUniqueStringFieldSize

; DefaultNStringFieldSize=DefaultStringFieldSize
; MaxNStringFieldSize=MaxStringFieldSize
; MaxIndexedNStringFieldSize=MaxIndexedStringFieldSize
; MaxUniqueNStringFieldSize=MaxUniqueStringFieldSize

  DefaultStringFieldCharset=0

; 0-Определяется драйвером, 1-ANSI, 2-Unicode, 3-ANSI+UNICODE, или LocaleID 
  DatabaseCharset=0

  DefaultDateValue=30.12.1899

  UseJoins=1
  CanBeInternalDB=1
  ObjNamesTranslate=1
  SubTableLoadOptim=1
  ReadWriteConnection=0
  DefaultForPrimaryKey=1
  DBXStrLenExact=0

  DateTimeFieldProcess=%0:s
  DateTimeFrame="''"

; Установка 1 в любом из ключей заставит сервер добавлять upper в соотв. месте
  SQLWhereCaseSensitive=0
  SQLOrderCaseSensitive=0
  SQLIndexCaseSensitive=0

; Правила соритровки Null'ов: 
; 0 - в начале asc; 1 - в конце asc; 2 - в начале asc/desc; 3 - в конце asc/desc
  NullSortRule=0

  IndexAscDescDif=0

; 0 - Выполнять проверку sctTestConnection, 1 - отключать без проверки
  DisconnectSuspectConnection=0

  SetByValueTypes=Real,Integer,Date,String,Boolean,Int64

;  Список типов, задаваемых через строку отдельно для Select/Delete-запросов и для Insert/Update-запросов можно задавать с помощью следующих настроек:
;  SetByValueTypesSelect
;  SetByValueTypesInsert
  
  ParamPlaceholder=?

  StringValuePrefix=
; NStringValuePrefix=N
  NumStringValuePrefix=

; Для поддержки выражения LIKE
  LikeMaskedChars=_%\
  LikeMaskChar=\

; DoubleSymbol=

; Запрещённые ANSI символы: #COD;...
; ExceptSymbols=

; Символы не влияющие на сортировку строк
; SortSkipSymbols=

; Лигатуры
  SortLigatures=\u00DF=ss;\u00C6=AE;\u00E6=ae;\u0132=IJ;\u0133=ij;\u0152=OE;\u0153=oe;\u00DE=TH;\u00FE=th;\u01C4=DZ;\u01C5=Dz;\u01C6=dz;\u01F1=DZ;\u01F2=Dz;\u01F3=dz;\u01C7=LJ;\u01C8=Lj;\u01C9=lj;\u01CA=NJ;\u01CB=Nj;\u01CC=nj;\u01E2=AE;\u01E3=ae;\u01FC=AE;\u01FD=ae;\u0238=db;\u0239=qp

; MinDateTimeValue=01.01.1900
; MaxDateTimeValue=31.12.9999 23:59:59

  DBXVersion=1
  
; 0-Не возможно переместить, 1-Простое перемещение папки ИБ, 2-БД не храниться в папке ИБ, 3-При перемещении используется Detach/Attach
  DatabaseMoveMethod=0  

; Возможно ли выполнение alter table
  CanAlterTable=0
; Возможно ли выполнение alter column
  CanAlterColumn=0
; Метод изменения поля с PrimaryKey
; 0-по умолчанию, 1-удаление всех индексов перед удалением PKField, 2-Bulk Copy
  PKChangeMethod=0
; Создание индексов после операции insert into ... select при реорганизации таблицы
  RebuildIndexesAfterInsert=0

[General.SQLStrings]
; В этом разделе описываются используемые SQL команды
; Их можно (а некоторые и нужно) переописать в настройках соответствующей СУБД
; Если в настройках СУБД они не переописаны, то используются эти настройки

; sctAutoexecCommands
; sctGetTableNamesSQL
; sctGetFieldNamesSQL
; sctGetIndexNamesSQL
; sctGetTableIndexNamesSQL
; sctCharSetDetectSQL %0-Имя базы %1-Имя таблицы
; sctCreateView %0-Имя View %1-Имя таблицы
  sctCreateView=CREATE VIEW %0:s AS SELECT * FROM %1:s
; sctCreateTable %0-Имя таблицы %1-список полей %2-выражение Primary Key
  sctCreateTable=CREATE TABLE %0:s (%1:s, %2:s)
; sctCreateAscIndex %0-Имя индекса %1-Имя таблицы %2-список полей
  sctCreateAscIndex=CREATE INDEX %0:s ON %1:s (%2:s)
; sctCreateDscIndex %0-Имя индекса %1-Имя таблицы %2-список полей
  sctCreateDscIndex=CREATE DESC INDEX %0:s ON %1:s (%2:s)
; sctCreateUniqueIndex %0-Имя индекса %1-Имя таблицы %2-список полей
  sctCreateUniqueIndex=CREATE UNIQUE INDEX %0:s ON %1:s (%2:s)
; sctCreateFullTextIndex %0-Имя индекса %1-Имя таблицы %2-список полей %3-Имя базы данных
; sctRenameTable %0-Новое имя таблицы %1- Имя Таблицы
; sctDropView %0-Имя view
  sctDropView=DROP VIEW %0:s
; sctDropTable %0-Имя таблицы
  sctDropTable=DROP TABLE %0:s
; sctDropIndex %0-Имя таблицы %1-Имя индекса
  sctDropIndex=DROP INDEX %1:s
; sctDropFullTextIndex %0-Имя таблицы %1-Имя индекса
; sctDropStat %0-Имя таблицы %1-Имя статистики
; sctInsert %0-Имя таблицы %1-Имена полей %2-Значения полей
  sctInsert=INSERT INTO %0:s (%1:s) VALUES (%2:s)
; sctInsertSelect %0-Имя таблицы %1-Имена полей %2-Хинт перед полями %3-Имена полей и значения %4-Имя таблицы
  sctInsertSelect=INSERT INTO %0:s (%1:s) SELECT %2:s %3:s FROM %4:s
; sctDeleteWhere %0-Имя таблицы %1-Where условие
  sctDeleteWhere=DELETE FROM %0:s WHERE %1:s
; sctUpdateWhere %0-Имя таблицы %1-Значения полей %2-Where условие
  sctUpdateWhere=UPDATE %0:s SET %1:s WHERE %2:s
; sctSelectSimple %0-Хинт перед полями %1-Имя поля %2-Имя таблицы
  sctSelectSimple=SELECT %0:s %1:s FROM %2:s
; sctSelectWhere %0-Хинт перед полями %1-Имя поля %2-Имя таблицы %3-Where условие
  sctSelectWhere=SELECT %0:s %1:s FROM %2:s WHERE %3:s
; sctSelectWhereOrderBy %0-Хинт перед полями %1-Имя поля %2-Имя таблицы %3-Where условие %4-OrderBy условие
  sctSelectWhereOrderBy=SELECT %0:s %1:s FROM %2:s WHERE %3:s ORDER BY %4:s
; sctSelectOrderBy %0-Хинт перед полями %1-Имя поля %2-Имя таблицы %4-OrderBy условие
  sctSelectOrderBy=SELECT %0:s %1:s FROM %2:s ORDER BY %4:s
; sctSelectWhereOrderByPacketing %0-Хинт перед полями %1-Имя поля %2-Имя таблицы %3-Where условие %4-OrderBy условие %5-TopLimit
; sctSelectOrderByPacketing %0-Хинт перед полями %1-Имя поля %2-Имя таблицы %4-OrderBy условие %5-TopLimit
; sctSelectWhereByPacketing %0-Хинт перед полями %1-Имя поля %2-Имя таблицы %3-Where условие %5-TopLimit
; sctSelectSimpleByPacketing %0-Хинт перед полями %1-Имя поля %2-Имя таблицы %5-TopLimit
; sctOrderBy %0-Имена полей
  sctOrderBy=ORDER BY %0:s
; sctOrderByAsc
  sctOrderByAsc=ASC
; sctOrderByDesc
  sctOrderByDesc=DESC
; sctLeftJoin %0-Имя таблицы с псевдонимом %1-Имя поля осн. таблицы %2-Имя поля подчинённой таблицы
  sctLeftJoin=LEFT JOIN %0:s ON (%1:s=%2:s)
; sctInnerJoin %0-Имя таблицы с псевдонимом %1-Имя поля осн. таблицы %2-Имя поля подчинённой таблицы
  sctInnerJoin=INNER JOIN %0:s ON (%1:s=%2:s)

; sctGetCatalogNames
; sctCreateDatabase %0-Имя БД, %1-Каталог БД 
; sctCreateLoginAndGrantAccess %0-Имя БД, %1-Логин пользователя, %2-Пароль пользователя
; sctDropDatabase %0-Имя БД
; sctAttachDatabase %0-Имя БД, %1-Каталог БД 
; sctDetachDatabase %0-Имя БД
; sctDropLogin %0-Логин пользователя
; sctDetectVersion

; sctNativeBackup: %0-Имя БД, %1-Каталог бэкапа, %2-Имя временного файла, %3-Имя итогового файла
; sctNativeCompressBackup -/-/-

; sctNativeRestore: %0-Имя БД, %1-Каталог БД, %2-Имя файла бэкапа, %3-Каталог файла бэкапа, %4-BkpPos, %5-BkpDataName, %6-BkpLogName, %7-AddParts
; sctNativeCompressRestore: %0-Имя БД, %1-Каталог БД, %2-Имя файла бэкапа, %3-Каталог файла бэкапа, %4-BkpPos, %5-BkpDataName, %6-BkpLogName, %7-AddParts
; sctNativeRestoreAdd: %0-OldFileGroupName, %1-NewFileGroupName, %2-Каталог БД
; sctNativeBackupPosition: %0-Имя файла бэкапа, %1-Каталог файла бэкапа
; sctNativeBackupFileNames: %0-Имя файла бэкапа, %1-Каталог файла бэкапа, %2-BkpPos

; sctAddField %0-Имя таблицы %1-Имя поля
; sctAddFields %0-Имя таблицы %1-Имена полей
  sctAddField=ALTER TABLE %0:s ADD %1:s
  sctAddFields=ALTER TABLE %0:s ADD %1:s

; sctDropField %0-Имя таблицы %1-Имя поля
  sctDropField=ALTER TABLE %0:s DROP COLUMN %1:s

; sctDropConstraint %0-Имя таблицы %1-Имя ограничения
  sctDropConstraint=ALTER TABLE %0:s DROP CONSTRAINT %1:s
; sctGetFieldConstraintNamesSQL %0-Имя таблицы %1-Имя поля
; sctGetFieldsConstraintNamesSQL %0-Имя таблицы %1-Имена полей
; sctGetTableStatsName %0-Имя таблицы %1-Имена полей 

; sctTestConnection - запрос на проверку соединения
  sctTestConnection=SELECT 'Test connection...'

; SelectFullTableNameMask - %0-Имя базы %1-Имя таблицы %2-Алиас
; sctGroupBy %0-Имена полей
  sctGroupBy=GROUP BY %0:s

; sctHaving %0-фильтр
  sctHaving=HAVING %0:s

; sctAlterField %0-Имя таблицы %1-Имя поля %2:s-Data type %3:s-Not null
  sctAlterField=ALTER TABLE %0:s ALTER COLUMN %1:s %2:s %3:s
  
; sctAlterTable %0-Имя таблицы %1-Действия
  sctAlterTable=ALTER TABLE %0:s %1:s

; sctAddConstraint %0-Имя таблицы %1-Ограничение

; sctDefConstraint %0-Имя поля %1-значение по умолчанию %2-Имя ограничения

; sctSetNotNull %0-Имя таблицы %1-Имя поля %2-SET|DROP

; sctSetDefault %0-Имя таблицы %1-Имя поля %2-SET|DROP %3-значение по умолчанию

; sctUpdateNull %0-Имя таблицы %1-Имя поля %2-SET|DROP %3-значение по умолчанию

; sctAddPrimaryKey %0-Имя таблицы %1-Имя поля %2-Имя ограничения

; sctGetIndexesNameByFieldNames %0-Имя таблицы %1- Имена полей

; sctDetectKeyIndexName - Определение имени индекса первичного ключа таблицы %0 - Имя таблицы

; sctCast %0-Имя поля %1-Тип поля

; sctMoveDatabase %0-Имя БД, %1-Исходный каталог с файлами БД, %2-Новый каталог с файлами БД  

;.

[General.Functions]
  aggrCount=COUNT(%0:s)
  aggrMin=MIN(%0:s)
  aggrMax=MAX(%0:s)
  aggrSum=SUM(%0:s)
  aggrGroupBy=%0:s
  IS=(%0:s LIKE '%1:s%2:s.%%') OR (%3:s=%2:s)
  Count=COUNT(%0:s)
  Exists=EXISTS(%0:s)
  match=(%0:s LIKE %1:s)
  match_esc=(%0:s LIKE %1:s ESCAPE '%2:s')


;----------------------------- Paradox -----------------------------------------

[Paradox]
  AccessType=Paradox
  DriverName=STANDARD
  CharSetLevel=Table
  MaxTableNameLength=240
  MaxIndexNameLength=25
  MaxFieldNameLength=25
  ObjNamesTranslate=0
  TableNameMask=%s.db
  NewTableNameMask=%s
  NewFieldNameMask=%s
  CreateIndexNameMask=""%s""
  CreateTableNameMask=""%s""
  CreateFieldNameMask=""%0:s"."%1:s""
  SelectTableNameMask=""%0:s" %1:s"
  SelectFieldNameMask=""%0:s"."%1:s""
  SelectFieldAliasMask=""%0:s"."%1:s" %2:s"
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=dd.mm.yyyy hh:nn:ss
  IndexAscDescDif=1
  MaxStringFieldSize=255
  MaxIndexedStringFieldSize=255
  MaxUniqueStringFieldSize=255

  MultiWriteAllowed=0
  CanDetectDuplicates=1

; Нет серверных курсоров 
  DiffConnectionForSrvCursor=0
  SubTableLoadOptim=0

  SQLWhereCaseSensitive=1
;  SQLOrderCaseSensitive=1
  Ansi92NullNoSupportedValueTypes=String


[Paradox.Params]
  PATH=%path%

[Paradox.DataTypes]
  Real=Real,FLOAT
  Integer=Integer,INTEGER
  Boolean=Boolean,BOOLEAN
  String=String,VARCHAR(%0:d)
  Date=Date,TIMESTAMP
  Memo=Memo,BLOB(10,1)
  Image=Image, BLOB(0,5)
  Binary=Binary, BLOB(0,2)
  OleDocument=OleDocument, BLOB(0,4)
  Int64=Integer,INTEGER

[Paradox.Functions]
  substr=SUBSTRING(%0:s FROM %1:s FOR %2:s)
  year=EXTRACT(YEAR FROM %0:s)
  mon=EXTRACT(MONTH FROM %0:s)
  day=EXTRACT(DAY FROM %0:s)
  hour=EXTRACT(HOUR FROM %0:s)
  minute=EXTRACT(MINUTE FROM %0:s)
  second=EXTRACT(SECOND FROM %0:s)
  up=UPPER(%0:s)
  lo=LOWER(%0:s)
  int=CAST(%0:s as INTEGER)
  num=CAST(%0:s as FLOAT)

[Paradox.SQLStrings]
  sctTestConnection=
  sctDropIndex=DROP INDEX %0:s.%1:s
  sctDetectDuplicates=SELECT %0:s FROM %1:s WHERE DELETED = 0 GROUP BY %0:s HAVING COUNT(*) > 1

;----------------------------- DBase -------------------------------------------

[DBase]
  AccessType=DBase
  DriverName=STANDARD
  CanBeInternalDB=0
  CharSetLevel=Table
  DefaultStringFieldSize=100
  MaxStringFieldSize=100
  MaxIndexedStringFieldSize=100
  MaxUniqueStringFieldSize=100
  MaxTableNameLength=240
  MaxIndexNameLength=25
  MaxFieldNameLength=25
  ObjNamesTranslate=1
  TableNameMask=%s.dbf
  NewTableNameMask=%s
  NewFieldNameMask=%s
  CreateIndexNameMask=""%s""
  CreateTableNameMask=""%s.dbf""
  CreateFieldNameMask=""%0:s"."%1:s""
  SelectTableNameMask=""%0:s" %1:s"
  SelectFieldNameMask=""%0:s"."%1:s""
  SelectFieldAliasMask=""%0:s"."%1:s" %2:s"
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DeleteFieldNameMask=""%0:s.dbf"."%1:s""
  DateTimeFormat=dd.mm.yyyy hh:nn:ss
  MultiWriteAllowed=0
  IndexAscDescDif=1
  SQLWhereCaseSensitive=1
;  SQLOrderCaseSensitive=1
  Ansi92NullNoSupportedValueTypes=String
  SetByValueTypes=Real,Integer,Boolean,String

[DBase.Params]
  PATH=%path%

[DBase.DataTypes]
  Real=Real,FLOAT
  Integer=Integer,INTEGER
  Boolean=Boolean,BOOLEAN
  String=String,VARCHAR(%0:d)
  Date=Date,TIMESTAMP
  Memo=Memo,BLOB(10,1)
  Image=Image, BLOB(0,5)
  Binary=Binary, BLOB(0,2)
  OleDocument=OleDocument, BLOB(0,4)

[DBase.Functions]
  substr=SUBSTRING(%0:s FROM %1:s FOR %2:s)
  year=EXTRACT(YEAR FROM %0:s)
  mon=EXTRACT(MONTH FROM %0:s)
  day=EXTRACT(DAY FROM %0:s)
  hour=EXTRACT(HOUR FROM %0:s)
  minute=EXTRACT(MINUTE FROM %0:s)
  second=EXTRACT(SECOND FROM %0:s)
  up=UPPER(%0:s)
  lo=LOWER(%0:s)
  int=CAST(%0:s as INTEGER)
  num=CAST(%0:s as FLOAT)

[DBase.SQLStrings]
  sctDropIndex=DROP INDEX "%0:s"."%1:s"


;----------------------------- Sybase5 -----------------------------------------

[Sybase5]
  AccessType=BDE
  DriverName=Sybase SQL Anywhere 5.0
  CharSetLevel=Database
  MultiWriteAllowed=1
  MaxTableNameLength=25
  MaxIndexNameLength=25
  MaxFieldNameLength=25
  TableNameMask=%s
  NewTableNameMask=%s
  NewFieldNameMask=%s
  CreateIndexNameMask=""%s""
  CreateTableNameMask=""%s""
  CreateFieldNameMask=""%1:s""
  SelectTableNameMask=""%0:s" %1:s"
  SelectFieldNameMask=""%0:s"."%1:s""
  SelectFieldAliasMask=""%0:s"."%1:s" %2:s"
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyy-mm-dd hh:nn:ss
  SetByValueTypes=Real,Integer,Date
  BiDirectional=1

[Sybase5.Params]
  DATABASE NAME=%path%
  USER NAME=%username%
  PASSWORD=%password%
  ODBC DSN=%odbc%
  BLOB SIZE=100

[Sybase5.DataTypes]
  Real=Real,DOUBLE NOT NULL DEFAULT %1:s
  Integer=Integer,INTEGER NOT NULL DEFAULT %1:s
  Boolean=Integer,SMALLINT NOT NULL DEFAULT %1:s
  String=String,VARCHAR(%0:d) NOT NULL DEFAULT %1:s
  Date=Date,TIMESTAMP NOT NULL DEFAULT %1:s
  Memo=Memo,LONG BINARY
  Image=Image,LONG BINARY
  Binary=Binary, LONG BINARY
  OleDocument=OleDocument, LONG BINARY

[Sybase5.SQLStrings]
  sctGetIndexNamesSQL=SELECT INDEX_NAME FROM SYS.SYSINDEX
  sctCharSetDetectSQL=SELECT 'SYBASE-'+DEFAULT_COLLATION FROM SYS.SYSINFO

;----------------------------- MSSQL_General -------------------------------

[MSSQL_General]
  CharSetLevel=Database
; VARCHAR+NVARCHAR
  DatabaseCharset=3

  ObjNamesTranslate=0
  MaxTableNameLength=116
  MaxIndexNameLength=116
  MaxFieldNameLength=116

  MaxStringFieldSize=8000
  MaxIndexedStringFieldSize=850
  MaxUniqueStringFieldSize=850

  MaxNStringFieldSize=4000
  MaxIndexedNStringFieldSize=850
  MaxUniqueNStringFieldSize=850

  TableNameMask=%s
  NewTableNameMask=%s
  NewFieldNameMask=%s
  CreateIndexNameMask=[%s]
  CreateTableNameMask=[%s]
  CreateFieldNameMask=[%1:s]
  SelectTableNameMask=[%0:s] %1:s WITH (NOLOCK)
  SelectTableNameIndexMask=[%0:s] %1:s WITH (NOLOCK, INDEX(%2:s))
  SelectFieldNameMask=[%0:s].[%1:s]
  SelectFieldAliasMask=[%0:s].[%1:s] AS [%2:s]
  SelectFullTableNameMask=[%0:s]..[%1:s] %2:s WITH (NOLOCK)
  SelectFullTableNameIndexMask=[%0:s]..[%1:s] %2:s WITH (NOLOCK, INDEX([%0:s]..%3:s))
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyymmdd hh:nn:ss:x
  UniqueErrorMessage=duplicate key row;duplicate key in object;уникальным индексом;повторяющийся ключ в объект
  ReadWriteConnection=1
  MultiWriteAllowed=1
  BiDirectional=1
  TrimEndSpaces=1
  ExistDateTimeConstraint=1
  MinDateTimeValue=01.01.1753 00:00:00
  MaxDateTimeValue=31.12.9999 23:59:59
  CanDetectDuplicates=1
  DefaultAdminUserName=sa
  DefaultAdminPassword=
  InstanceDivider=\
; Отдельный конекшен для серверного курсора
  DiffConnectionForSrvCursor=1
  LikeMaskedChars=_%\[^]
  NStringValuePrefix=N

  SortSkipSymbols=-;';\x01-\x1F;\u00AD;\u01F6-\u01F9;\u0218-\u024F

  NativeBackupName=MSSQL
  
  DatabaseMoveMethod=3
  
  SetByValueTypesInsert=

[MSSQL_General.DataTypes]
  Real=Real,FLOAT(53) NOT NULL DEFAULT %1:s
  Integer=Integer,INTEGER NOT NULL DEFAULT %1:s
  Boolean=Integer,BIT NOT NULL DEFAULT %1:s
  String=String,VARCHAR(%0:d) NOT NULL DEFAULT %1:s
  Date=Date,DATETIME NOT NULL DEFAULT %1:s
  Memo=Memo,Text
  Image=Image,Image
  Binary=Binary,Image
  OleDocument=OleDocument,Image
  String_Unicode=String,NVARCHAR(%0:d) NOT NULL DEFAULT %1:s
  Memo_Unicode=Memo,NText
  Int64=Int64,bigint NOT NULL DEFAULT %1:s

[MSSQL_General.Functions]
  substr=SUBSTRING(%0:s,%1:s,%2:s)
  year=YEAR(%0:s)
  mon=MONTH(%0:s)
  day=DAY(%0:s)
  hour=DATEPART(HOUR,%0:s)
  minute=DATEPART(MINUTE,%0:s)
  second=DATEPART(SECOND,%0:s)
  up=UPPER(%0:s)
  lo=LOWER(%0:s)
  int=CAST(%0:s as INTEGER)
  num=CAST(%0:s as FLOAT)
  length=LEN(%0:s)
  pos=CHARINDEX(%0:s,%1:s)
  repstr=REPLICATE(%0:s,%1:s)
  periodsec=DATEDIFF(second,%0:s,%1:s)
  mod=%0:s %% %1:s
  log=LOG(%0:s)
  exp=EXP(%0:s)
  sqrt=SQRT(%0:s)

[MSSQL_General.SQLStrings]
  sctDetectVersion=select CONVERT(VARCHAR(4), SUBSTRING(@@version, 23, 4)) AS VERSION

; sctGetTableNamesSQL=select TABLE_NAME from INFORMATION_SCHEMA.TABLES order by TABLE_NAME
  sctGetIndexNamesSQL=SELECT name FROM sysindexes WHERE indid > 0 AND indid < 255
  sctGetTableIndexNamesSQL=SELECT aIndexNames.name AS IndexName FROM sysobjects aTableNames, sysindexes aIndexNames WHERE aTableNames.xtype='U' and aTableNames.name=N'%0:s' and aTableNames.id=aIndexNames.id and (aIndexNames.status & 64 = 0) and (aIndexNames.status & 2048 = 0) and (aIndexNames.indid <> 0) ORDER BY aIndexNames.name
  sctCharSetDetectSQL=select 'MSSQL-'+(select name from master.dbo.syscharsets a_cha WHERE a_cha.type=1001 and a_cha.id=convert(tinyint, DatabasePropertyEx('%0:s', 'sqlcharset')))+'_'+convert(varchar, (select case convert(tinyint, DatabasePropertyEx('%0:s', 'sqlsortorder')) when 0 then DatabasePropertyEx('%0:s', 'collation') ELSE (select name from master.dbo.syscharsets a_cha WHERE a_cha.type=2001 and a_cha.id=convert(tinyint, DatabasePropertyEx('%0:s', 'sqlsortorder'))) end))

  sctSelectWhereOrderByPacketing=SELECT TOP %5:d %1:s \n FROM %2:s \n WHERE %3:s \n ORDER BY %4:s
  sctSelectOrderByPacketing=SELECT TOP %5:d %1:s \n FROM %2:s \n ORDER BY %4:s
  sctSelectWhereByPacketing=SELECT TOP %5:d %1:s \n FROM %2:s \n WHERE %3:s
  sctSelectSimpleByPacketing=SELECT TOP %5:d %1:s \n FROM %2:s

  sctRenameTable=SP_RENAME %1:s, %0:s
  sctDropIndex=DROP INDEX %0:s.%1:s
  sctDropStat=DROP STATISTICS %0:s.%1:s

  sctGetCatalogNames=select name from master.dbo.sysdatabases
; sctCreateDatabase=USE master \n CREATE DATABASE [%0:s] ON (NAME='%0:s_Data',FILENAME='%1:s%0:s_Data.mdf') LOG ON (NAME='%0:s_Log',FILENAME='%1:s%0:s_Log.ldf') COLLATE Cyrillic_General_CI_AS
  sctCreateDatabase=USE master \n CREATE DATABASE [%0:s] ON (NAME='%0:s_Data',FILENAME='%1:s%0:s_Data.mdf') LOG ON (NAME='%0:s_Log',FILENAME='%1:s%0:s_Log.ldf') COLLATE Cyrillic_General_CI_AS \n ALTER DATABASE [%0:s] SET RECOVERY SIMPLE, AUTO_SHRINK ON
  sctDropDatabase=USE master \n ALTER DATABASE [%0:s] SET SINGLE_USER WITH ROLLBACK IMMEDIATE \n DROP DATABASE [%0:s]

  sctAttachDatabase=if (not exists(select name from master.dbo.sysdatabases where name=N'%0:s')) begin \n exec sp_attach_db @dbname=N'%0:s', @filename1=N'%1:s\%0:s_Data.mdf', @filename2=N'%1:s\%0:s_Log.ldf' \n end
  sctDetachDatabase=if exists(select name from master.dbo.sysdatabases where name=N'%0:s') begin \n ALTER DATABASE [%0:s] SET SINGLE_USER WITH ROLLBACK IMMEDIATE \n exec sp_detach_db N'%0:s' \n end

  sctCreateLoginAndGrantAccess=if ('%1:s'<>'sa') begin \n if (not exists(select * from master.dbo.syslogins where loginname='%1:s')) begin exec sp_addlogin '%1:s','%2:s','%0:s' end \n USE %0:s \n exec sp_adduser @loginame='%1:s',@grpname='db_owner' \n end
  sctDropLogin=exec sp_droplogin '%0:s'

; sctNativeBackup: %0-Имя БД, %1-Каталог бэкапа, %2-Имя временного файла, %3-Имя итогового файла
; sctNativeBackup=USE master \n BACKUP DATABASE [%0:s] TO DISK = N'%1:s%2:s' WITH INIT, UNLOAD, NOSKIP
  sctNativeBackup=BACKUP DATABASE [%0:s] TO DISK = N'%1:s%2:s'

; sctNativeRestore: %0-Имя БД, %1-Каталог БД, %2-Имя файла бэкапа, %3-Каталог файла бэкапа, %4-BkpPos, %5-BkpDataName, %6-BkpLogName, %7-AddParts
  sctNativeRestore=USE master \n RESTORE DATABASE [%0:s] FROM DISK = N'%3:s%2:s' WITH FILE = %4:d, MOVE '%5:s' TO '%1:s%0:s_DATA.mdf', MOVE '%6:s' TO '%1:s%0:s_LOG.ldf', %7:s REPLACE
  sctNativeRestoreAdd=MOVE '%0:s' TO '%2:s%1:s.ndf',

  sctNativeBackupPosition=RESTORE HEADERONLY FROM DISK=N'%1:s%0:s' WITH UNLOAD
  sctNativeBackupFileNames=RESTORE FILELISTONLY FROM DISK=N'%1:s%0:s' WITH UNLOAD, FILE = %2:d

  sctDetectDuplicates=SELECT %0:s FROM %1:s WHERE DELETED = 0 GROUP BY %0:s HAVING COUNT(*) > 1

  sctGetIndexesNameByFieldNames=select i.name from sys.indexes i left join sys.index_columns ic on ic.object_id = i.object_id and ic.index_id = i.index_id left join sys.columns c on c.object_id = ic.object_id and c.column_id = ic.column_id where i.object_id = object_id(N'%0:s') and c.name in (%1:s);
  sctGetTableStatsName=SELECT s.name AS statistics_name FROM sys.stats AS s INNER JOIN sys.stats_columns AS sc ON s.object_id = sc.object_id AND s.stats_id = sc.stats_id INNER JOIN sys.columns AS c ON sc.object_id = c.object_id AND c.column_id = sc.column_id WHERE s.object_id = OBJECT_ID(N'%0:s') and c.name in (%1:s) group by s.name;

;-------------------------- MSSQL_ADO_General ----------------------------------

[MSSQL_ADO_General]
  Inherited=MSSQL_General

  AccessType=MSSSQLADO
  DriverName=SQLOLEDB.1

[MSSQL_ADO_General.Params]
  Provider=SQLOLEDB.1;
  Persist Security Info=False;
  Data Source=%HostName%;
  Initial Catalog=%Database%;
  Locale Identifier=1049;
  Connect Timeout=10;
  Use Procedure for Prepare=1;
  Auto Translate=True;
  Packet Size=4096;
  Application Name=%ApplicationName%;
  Workstation ID=%ComputerName%;
;  Use Encryption for Data=False;
;.


;----------------------------- MSSQL7_ADO --------------------------------------

[MSSQL7_ADO]
  Inherited=MSSQL_ADO_General
  VersionStr=7.00
  NativeBackupName=MSSQL7_ADO

[MSSQL7_ADO.Params]
  User ID=%UserName%;
  Password=%Password%;

[MSSQL7_ADO.SQLStrings]
  sctCharSetDetectSQL=SELECT 'MSSQL7-'+(SELECT name FROM master..syscharsets WHERE type=1001 AND id=(SELECT csid FROM master..syscharsets, master..syscurconfigs WHERE id = value AND config = 1123))+'_'+(SELECT A.name FROM master..syscharsets A, master..syscurconfigs B WHERE A.id = B.value AND B.config = 1123)

; sctCreateDatabase=USE master \n CREATE DATABASE [%0:s] ON (NAME='%0:s_Data',FILENAME='%1:s%0:s_Data.mdf') LOG ON (NAME='%0:s_Log',FILENAME='%1:s%0:s_Log.ldf')
  sctCreateDatabase=USE master \n CREATE DATABASE [%0:s] ON (NAME='%0:s_Data',FILENAME='%1:s%0:s_Data.mdf') LOG ON (NAME='%0:s_Log',FILENAME='%1:s%0:s_Log.ldf') \n EXEC sp_dboption '%0:s', 'autoshrink', 'true'
  sctDropDatabase=USE master \n DROP DATABASE [%0:s]

  sctDetachDatabase=if exists(select name from master.dbo.sysdatabases where name=N'%0:s') begin \n exec sp_detach_db N'%0:s' \n end

;----------------------------- MSSQL2000_ADO -----------------------------------

[MSSQL2000_ADO]
  Inherited=MSSQL_ADO_General
  OSSecurityParam=Integrated Security=SSPI;
  DBMSSecurityParam=User ID=%UserName%;Password=%Password%;
  VersionStr=2000
  OptimWideResult=1
  OptimCheckCanSafeDelete=1
  CanAlterTable=1
  CanAlterColumn=1
  PKChangeMethod=2
  RebuildIndexesAfterInsert=1
  CanAsyncQuery=1
  NativeBackupName=MSSQL2000_ADO
  NativeRestore=MSSQL7_ADO;MSSQL
  CanOptimResize=1

[MSSQL2000_ADO.Params]
; Чтобы подключиться к SQL серверу с Instance не по умолчанию, надо раскомментировать строку ниже и указать в место <Instance> реальное имя SQL сервера
; Data Source=<Instance>;
;.

[MSSQL2000_ADO.SQLStrings]
  sctGetFieldNamesSQL=select SYSCOLUMNS.NAME AS NAME from SYSCOLUMNS inner join SYSOBJECTS ON SYSCOLUMNS.ID = SYSOBJECTS.ID where SYSOBJECTS.NAME=N'%0:s'
  sctGetFieldConstraintNamesSQL=SELECT aConstraint1.Name AS aConstraintName FROM SYSOBJECTS AS aConstraint1 INNER JOIN SYSCOLUMNS AS aColumns ON aConstraint1.ID = aColumns.CDefault INNER JOIN SYSOBJECTS AS aConstraint2 ON aColumns.ID = aConstraint2.ID WHERE aConstraint2.Name = N'%0:s' AND aColumns.Name = N'%1:s'
  sctGetFieldsConstraintNamesSQL=SELECT aConstraint1.Name AS aConstraintName, aColumns.Name AS aColumnName FROM SYSOBJECTS AS aConstraint1 INNER JOIN SYSCOLUMNS AS aColumns ON aConstraint1.ID = aColumns.CDefault INNER JOIN SYSOBJECTS AS aConstraint2 ON aColumns.ID = aConstraint2.ID WHERE aConstraint2.Name = N'%0:s' AND aColumns.Name in (%1:s)
  sctAddConstraint=ALTER TABLE %0:s ADD %1:s
  sctDefConstraint=CONSTRAINT %2:s DEFAULT %1:s FOR %0:s WITH VALUES
  sctAddPrimaryKey=ALTER TABLE %0:s ADD CONSTRAINT %2:s PRIMARY KEY CLUSTERED (%1:s);
  sctCast=CAST(%0:s AS %1:s)

;----------------------------- MSSQL2005_ADO -----------------------------------

[MSSQL2005_ADO]
  Inherited=MSSQL2000_ADO
  VersionStr=2005
  NativeBackupName=MSSQL2005_ADO
  NativeRestore=MSSQL2005_Express_ADO;MSSQL2000_ADO;MSSQL7_ADO;MSSQL
; Полнотекстовый поиск с подстановкой индекса первичного ключа в запрос
  FullTextWithPrimaryKeyIndex=0

[MSSQL2005_ADO.Params]
; Чтобы подключиться к SQL серверу с Instance не по умолчанию, надо раскоментировать строку ниже и указать в место <Instance> реальное имя SQL сервера
; Data Source=<Instance>;
;.

[MSSQL2005_ADO.Functions]
  contains=CONTAINS(%0:s, %1:s)

[MSSQL2005_ADO.SQLStrings]
  sctDetectVersion=SELECT CONVERT(VARCHAR(4), SUBSTRING(@@version, 22, 4)) AS VERSION
  sctDetectKeyIndexName=SELECT [NAME] FROM [sys].[indexes] WHERE [is_primary_key] = 1 and [object_id] = OBJECT_ID(N'[%0:s]')

  sctIsFullTextInstalled=SELECT fulltextserviceproperty('IsFulltextInstalled')
; sctCreateFullTextIndex %0-Имя индекса %1-Имя таблицы %2-список полей %3-Имя индекса первичного ключа %4-Имя базы данных
  sctCreateFullTextIndex=if not Exists(select * from [sys].[fulltext_catalogs] where [is_default] = 1) BEGIN \n exec sp_fulltext_database 'enable' \n CREATE FULLTEXT CATALOG [ft_%4:s] AS DEFAULT \n END \n CREATE FULLTEXT INDEX ON %1:s (%2:s) KEY INDEX [%3:s]
; sctDropFullTextIndex %0-Имя таблицы %1-Имя индекса
  sctDropFullTextIndex=IF EXISTS(SELECT * FROM [sys].[fulltext_indexes] where [object_id] = OBJECT_ID(N'%0:s')) DROP FULLTEXT INDEX ON %0:s
  sctGetFullTextIndexTable=SELECT * FROM [sys].[fulltext_indexes] where [object_id] = OBJECT_ID(N'%0:s')

;----------------------------- MSSQL2005_Express_ADO ---------------------------

[MSSQL2005_Express_ADO]
  Inherited=MSSQL2005_ADO

[MSSQL2005_Express_ADO.Params]
  Data Source=%HostName%\SQLEXPRESS;

;----------------------------- MSSQL2008_ADO -----------------------------------

[MSSQL2008_ADO]
  Inherited=MSSQL2005_ADO
  VersionStr=2008
  NativeBackupName=MSSQL2008_ADO
  NativeRestore=MSSQL2005_ADO;MSSQL2000_ADO;MSSQL

[MSSQL2008_ADO.SQLStrings]
; sctNativeCompressBackup: %0-Имя БД, %1-Каталог бэкапа, %2-Имя временного файла, %3-Имя итогового файла
  sctNativeCompressBackup=IF EXISTS(SELECT [NAME] FROM [sys].[configurations] WHERE [NAME] = 'backup compression default') BACKUP DATABASE [%0:s] TO DISK = N'%1:s%2:s' WITH COMPRESSION ELSE BACKUP DATABASE [%0:s] TO DISK = N'%1:s%2:s'
  sctCreateFullTextIndex=if not Exists(select * from [sys].[fulltext_catalogs] where [is_default] = 1) CREATE FULLTEXT CATALOG [ft_%4:s] AS DEFAULT \n CREATE FULLTEXT INDEX ON %1:s (%2:s) KEY INDEX [%3:s]

;----------------------------- MSSQL2012_ADO -----------------------------------

[MSSQL2012_ADO]
  Inherited=MSSQL2008_ADO
  VersionStr=2012
  NativeBackupName=MSSQL2012_ADO
  NativeRestore=MSSQL2008_ADO;MSSQL2005_ADO;MSSQL

;----------------------------- MSSQL2014_ADO -----------------------------------

[MSSQL2014_ADO]
  Inherited=MSSQL2012_ADO
  VersionStr=2014
  NativeBackupName=MSSQL2014_ADO
  NativeRestore=MSSQL2012_ADO;MSSQL2008_ADO;MSSQL2005_ADO;MSSQL

;----------------------------- MSSQL2016_ADO -----------------------------------

[MSSQL2016_ADO]
  Inherited=MSSQL2014_ADO
  VersionStr=2016
  NativeBackupName=MSSQL2016_ADO
  NativeRestore=MSSQL2014_ADO;MSSQL2012_ADO;MSSQL2008_ADO;MSSQL2005_ADO;MSSQL

;----------------------------- MSSQL2017_ADO -----------------------------------

[MSSQL2017_ADO]
  Inherited=MSSQL2016_ADO
  VersionStr=2017
  NativeBackupName=MSSQL2017_ADO
  NativeRestore=MSSQL2016_ADO;MSSQL2014_ADO;MSSQL2012_ADO;MSSQL2008_ADO;MSSQL2005_ADO;MSSQL

;----------------------------- MSSQL2019_ADO -----------------------------------

[MSSQL2019_ADO]
  Inherited=MSSQL2017_ADO
  VersionStr=2019
  NativeBackupName=MSSQL2019_ADO
  NativeRestore=MSSQL2017_ADO;MSSQL2016_ADO;MSSQL2014_ADO;MSSQL2012_ADO;MSSQL2008_ADO;MSSQL2005_ADO;MSSQL

;----------------------------- MSSQL7_BDEODBC ----------------------------------

[MSSQL7_BDEODBC]
  Inherited=MSSQL_ADO_General
  VersionStr=7.00
  AccessType=BDE
  DriverName=SQL Server
  TableNameMask=dbo.%s
  MaxStringFieldSize=250
  MaxIndexedStringFieldSize=250
  MaxUniqueStringFieldSize=250
  TrimEndSpaces=0
  ExistDateTimeConstraint=0
  MinDateTimeValue=0
  MaxDateTimeValue=0
  CanDetectDuplicates=0

[MSSQL7_BDEODBC.Params]
  DATABASE NAME=%Database%
  ODBC DSN=%odbc%
  USER NAME=%UserName%
  PASSWORD=%Password%
  BLOB SIZE=512
  BLOBS TO CACHE=128

[MSSQL7_BDEODBC.SQLStrings]
  sctGetIndexNamesSQL=SELECT CAST(NAME AS VARCHAR) AS NAME FROM SYSINDEXES WHERE INDID > 0 AND INDID < 255
  sctGetTableIndexNamesSQL=
  sctCharSetDetectSQL=SELECT CAST('MSSQL7-'+(SELECT NAME FROM MASTER..SYSCHARSETS WHERE TYPE=1001 AND ID=(SELECT CSID FROM MASTER..SYSCHARSETS, MASTER..SYSCURCONFIGS WHERE ID = VALUE AND CONFIG = 1123))+'_'+(SELECT A.NAME FROM MASTER..SYSCHARSETS A, MASTER..SYSCURCONFIGS B WHERE A.ID = B.VALUE AND B.CONFIG = 1123) AS VARCHAR)

;---

[MSSQL2000_BDEODBC]
  Inherited=MSSQL7_BDEODBC
  VersionStr=2000

[MSSQL2000_BDEODBC.SQLStrings]
  sctCharSetDetectSQL=select cast('MSSQL-'+(select name from master.dbo.syscharsets a_cha WHERE a_cha.type=1001 and a_cha.id=convert(tinyint, DatabasePropertyEx('%0:s', 'sqlcharset')))+'_'+convert(varchar, (select case convert(tinyint, DatabasePropertyEx('%0:s', 'sqlsortorder')) when 0 then DatabasePropertyEx('%0:s', 'collation') ELSE (select name from master.dbo.syscharsets a_cha WHERE a_cha.type=2001 and a_cha.id=convert(tinyint, DatabasePropertyEx('%0:s', 'sqlsortorder'))) end)) as varchar)

;---

[MSSQL2005_BDEODBC]
  Inherited=MSSQL2000_BDEODBC
  VersionStr=2005

[MSSQL2005_BDEODBC.SQLStrings]
  sctDetectVersion=select CONVERT(VARCHAR(4), SUBSTRING(@@version, 22, 4)) AS VERSION

;---

[MSSQL2008_BDEODBC]
  Inherited=MSSQL2005_BDEODBC
  VersionStr=2008

[MSSQL2012_BDEODBC]
  Inherited=MSSQL2008_BDEODBC
  VersionStr=2012

[MSSQL2014_BDEODBC]
  Inherited=MSSQL2012_BDEODBC
  VersionStr=2014


;--------------------------------- MSSQL_DBX -----------------------------------

[MSSQL_DBX]
  Inherited=MSSQL_General

  AccessType=MSSQLDBX

  DBXVersion=4
  DriverName=dbxmss.dll
  DBXVendorLib=sqlncli10.dll
  DBXFuncName=getSQLDriverMSSQL

  OSSecurityParam=True
  DefaultAdminDatabase=master

; NativeBackupName=MSSQL - Унаследовано
; Не контролируем версию - сервер сам разберется
  NativeRestore=MSSQL2019_ADO;MSSQL2017_ADO;MSSQL2016_ADO;MSSQL2014_ADO;MSSQL2012_ADO;MSSQL2008_ADO;MSSQL2005_ADO;MSSQL2000_ADO;MSSQL7_ADO

[MSSQL_DBX.Params]
  HostName=%HostName%{\\%Instance%}
  Database=%Database%
  UserName=%UserName%
  Password=%Password%
  OS Authentication=%OSSecurity%

[MSSQL_DBX.SQLStrings]
  sctGetTableNamesSQL=select TABLE_NAME from INFORMATION_SCHEMA.TABLES order by TABLE_NAME
  sctGetFieldNamesSQL=select COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, ORDINAL_POSITION from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='%0:s'

;----------------------------- MSSSQL_CE_ADO_General ---------------------------

[MSSSQL_CE_ADO_General]
  AccessType=MSSSQLADOCE

  CharSetLevel=Database
  CharSet=MSSQLCE
; Только NVARCHAR
  DatabaseCharset=2

  ObjNamesTranslate=0
  MaxTableNameLength=116
  MaxIndexNameLength=116
  MaxFieldNameLength=116

  MaxStringFieldSize=4000
  MaxIndexedStringFieldSize=850
  MaxUniqueStringFieldSize=850

  TableNameMask=%s
  NewTableNameMask=%s
  NewFieldNameMask=%s
  CreateIndexNameMask=[%s]
  CreateTableNameMask=[%s]
  CreateFieldNameMask=[%1:s]
  SelectTableNameMask=[%0:s] %1:s WITH (NOLOCK)
  SelectTableNameIndexMask=[%0:s] %1:s WITH (NOLOCK, INDEX(%2:s))
  SelectFieldNameMask=[%0:s].[%1:s]
  SelectFieldAliasMask=[%0:s].[%1:s] AS [%2:s]
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyymmdd hh:nn:ss:x
  UniqueErrorMessage=ограничения целостности

  ExistDateTimeConstraint=1
  MinDateTimeValue=01.01.1753 00:00:00
  MaxDateTimeValue=31.12.9999 23:59:59

  TrimEndSpaces=1
  CanAlterTable=1
  CanDetectDuplicates=1
  DisconnectSuspectConnection=1

;  ReadWriteConnection=1 ???
  MultiWriteAllowed=0
  ServerCursorOnly=1
  DiffConnectionForSrvCursor=1
  OptimWideResult=1
  OptimCheckCanSafeDelete=1

;  NStringValuePrefix=N

;  SortSkipSymbols=-;'
;  SortSkipSymbols=-;';\x01-\x1F;\u00AD;\u01F6-\u01F9;\u0218-\u024F

  DatabaseMoveMethod=1

[MSSSQL_CE_ADO_General.Params]
  Provider=MICROSOFT.SQLSERVER.CE.OLEDB.3.5;
  Data Source="%path%";
  Mode=ReadWrite|Share Deny None;
  Locale Identifier=1049;
  SSCE:Max Buffer Size=8192;
  SSCE:Database Password="";
  SSCE:Encrypt Database=False;
  SSCE:Default Lock Escalation=100;
  SSCE:Temp File Directory="";
  SSCE:Default Lock Timeout=5000;
  SSCE:AutoShrink Threshold=90;
  SSCE:Flush Interval=100;
  SSCE:Test Callback Pointer=0;
  SSCE:Max Database Size=4091;
  SSCE:Temp File Max Size=4091;
  SSCE:Encryption Mode=0;
  SSCE:Case Sensitive=False;

[MSSSQL_CE_ADO_General.DataTypes]
  Real=Real,FLOAT NOT NULL DEFAULT %1:s
  Integer=Integer,INTEGER NOT NULL DEFAULT %1:s
  Boolean=Integer,BIT NOT NULL DEFAULT %1:s
  String=String,NVARCHAR(%0:d) NOT NULL DEFAULT %1:s
  Date=Date,DATETIME NOT NULL DEFAULT %1:s
  Memo=Memo,NTEXT
  Image=Image,Image
  Binary=Binary,Image
  OleDocument=OleDocument,Image
  Int64=Int64,bigint NOT NULL DEFAULT %1:s
 
[MSSSQL_CE_ADO_General.Functions]
  up=UPPER(%0:s)
  lo=LOWER(%0:s)
  length=LEN(%0:s)
  pos=CHARINDEX(%0:s,%1:s)
  substr=SUBSTRING(%0:s,%1:s,%2:s)
  repstr=REPLICATE(%0:s,%1:s)
  int=CAST(%0:s as INTEGER)
  num=CAST(%0:s as FLOAT)
  mod=%0:s %% %1:s
  year=DATEPART(YEAR,%0:s)
  mon=DATEPART(MONTH,%0:s)
  day=DATEPART(DAY,%0:s)
  hour=DATEPART(HOUR,%0:s)
  minute=DATEPART(MINUTE,%0:s)
  second=DATEPART(SECOND,%0:s)
  periodsec=DATEDIFF(second,%0:s,%1:s)
; log=LOG(%0:s)
; exp=EXP(%0:s)
; sqrt=SQRT(%0:s)
  Count=

[MSSSQL_CE_ADO_General.SQLStrings]
  sctRenameTable=SP_RENAME '%1:s', '%0:s'

  sctGetTableNamesSQL=SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WITH (NOLOCK)
; sctGetIndexNamesSQL=SELECT INDEX_NAME FROM INFORMATION_SCHEMA.INDEXES WITH (NOLOCK)
; sctGetTableIndexNamesSQL=SELECT INDEX_NAME FROM INFORMATION_SCHEMA.INDEXES WITH (NOLOCK) WHERE TABLE_NAME = N'%0:s'
  sctGetIndexNamesSQL=SELECT [INDEX_NAME] FROM [TB_INFOSCHEMA_INDEXES] WITH (NOLOCK)
  sctGetTableIndexNamesSQL=SELECT [INDEX_NAME] FROM [TB_INFOSCHEMA_INDEXES] WITH (NOLOCK) WHERE [TABLE_NAME] = N'%0:s'
  sctGetFieldNamesSQL=SELECT [COLUMN_NAME], [DATA_TYPE], [CHARACTER_MAXIMUM_LENGTH], [ORDINAL_POSITION] FROM [INFORMATION_SCHEMA].[COLUMNS] WITH (NOLOCK) WHERE [TABLE_NAME] = '%0:s'
  sctGetKeyFieldNamesSQL=SELECT [TABLE_NAME], [COLUMN_NAME] FROM [INFORMATION_SCHEMA].[KEY_COLUMN_USAGE]

  sctSelectWhereOrderByPacketing=SELECT TOP (%5:d) %1:s\nFROM %2:s\nWHERE %3:s\nORDER BY %4:s
  sctSelectOrderByPacketing=SELECT TOP (%5:d) %1:s\nFROM %2:s\nORDER BY %4:s
  sctSelectWhereByPacketing=SELECT TOP (%5:d) %1:s\nFROM %2:s\nWHERE %3:s
  sctSelectSimpleByPacketing=SELECT TOP (%5:d) %1:s\nFROM %2:s

  sctDropIndex=DROP INDEX %0:s.%1:s
  sctDetectDuplicates=SELECT %0:s FROM %1:s WITH (NOLOCK) WHERE DELETED = 0 GROUP BY %0:s HAVING COUNT(*) > 1
  sctCreateView=
  sctDropView=

;----------------------------- MSSSQL_CE_35_ADO --------------------------------

[MSSSQL_CE_35_ADO]
  Inherited=MSSSQL_CE_ADO_General
  DriverName=Microsoft.SQLSERVER.CE.OLEDB.3.5
  VersionStr=3.5

[MSSSQL_CE_35_ADO.Params]
  Provider=MICROSOFT.SQLSERVER.CE.OLEDB.3.5;

[MSSSQL_CE_35_ADO.SQLStrings]
; sctCharSetDetectSQL=SELECT 'MSSQL_CE_cp1251'
;.

;----------------------------- MSSSQL_CE_40_ADO --------------------------------

[MSSSQL_CE_40_ADO]
  Inherited=MSSSQL_CE_ADO_General
  DriverName=Microsoft.SQLSERVER.CE.OLEDB.4.0
  VersionStr=4.0

[MSSSQL_CE_40_ADO.Params]
  Provider=MICROSOFT.SQLSERVER.CE.OLEDB.4.0;


;----------------------------- MSAccess ----------------------------------------

[MSAccess]
  AccessType=MSAccessADO
  DriverName=Microsoft.Jet.OLEDB.4.0
  MultiWriteAllowed=0
  MaxTableNameLength=64
  MaxIndexNameLength=64
  MaxFieldNameLength=64
  ObjNamesTranslate=0
  TableNameMask=%s
  NewTableNameMask=%s
  NewFieldNameMask=%s
  CreateIndexNameMask=[%s]
  CreateTableNameMask=[%s]
  CreateFieldNameMask=[%1:s]
  SelectTableNameMask=[%0:s] %1:s
  SelectFieldNameMask=[%0:s].[%1:s]
  SelectFieldAliasMask=[%0:s].[%1:s] AS [%2:s]
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=dd.mm.yyyy hh:nn:ss
  CharSetLevel=Database
  CharSet=MSAccess-Win1251
  BiDirectional=1
  UniqueErrorMessage=duplicate key row;duplicate key in object;уникальным индексом;повторяющихся значений в индексе
; Отключение оптимального чтения подтаблиц, т.к. на конекшен с открытым и невыфетченым запросом нельзя открыть ещё запрос
  SubTableLoadOptim=0
; Отдельный конекшен для серверного курсора по той же причине
  DiffConnectionForSrvCursor=1


[MSAccess.Params]
  Provider=Microsoft.Jet.OLEDB.4.0;
  Data Source=%Path%;
  Persist Security Info=False;
  User ID=%username%;
  password=%password%;
; Чтобы подключить внешнюю запароленую базу, нужно закомментировать строчку выше и раскомментировать строчку ниже
; Jet OLEDB:Database Password=%password%;
;.

[MSAccess.DataTypes]
  Real=Real,DECIMAL NOT NULL DEFAULT %1:s
  Integer=Integer,INTEGER NOT NULL DEFAULT %1:s
  Boolean=Boolean,BIT DEFAULT %1:s
  String=String,VARCHAR(%0:d) NOT NULL DEFAULT %1:s
  Date=Date,DATETIME NOT NULL DEFAULT %1:s
  Memo=Memo,LONGTEXT
  Image=Image,IMAGE
  Binary=Binary,LONGBINARY
  OleDocument=OleDocument,LONGBINARY

[MSAccess.Functions]
  substr=MID(%0:s,%1:s,%2:s)
  year=YEAR(%0:s)
  mon=MONTH(%0:s)
  day=DAY(%0:s)
  hour=HOUR(%0:s)
  minute=MINUTE(%0:s)
  second=SECOND(%0:s)
  up=UCase(%0:s)
  lo=LCase(%0:s)
; int=CONVERT(%0:s as INTEGER)
; num=CAST(%0:s as FLOAT)
  length=LEN(%0:s)
; pos=CHARINDEX(%0:s,%1:s)
  repstr=STRING(%0:s,ASC(%1:s))
  periodsec=DATEDIFF("s", %1:s, %0:s)
  mod=%0:s MOD %1:s
  log=LOG(%0:s)
  exp=EXP(%0:s)
  sqrt=SQR(%0:s)

[MSAccess.SQLStrings]
  sctSelectWhereOrderByPacketing=SELECT TOP %5:d %1:s\nFROM %2:s\nWHERE %3:s\nORDER BY %4:s
  sctSelectOrderByPacketing=SELECT TOP %5:d %1:s\nFROM %2:s\nORDER BY %4:s
  sctSelectWhereByPacketing=SELECT TOP %5:d %1:s\nFROM %2:s\nWHERE %3:s
  sctSelectSimpleByPacketing=SELECT TOP %5:d %1:s\nFROM %2:s
  sctDropIndex=DROP INDEX %1:s ON %0:s

;----------------------------- MSAccess2007 ----------------------------------------

[MSAccess2007]
  Inherited=MSAccess
  DriverName=Microsoft.ACE.OLEDB.12.0
; Обрамление строкового представления даты слева и справа
  DateTimeFrame=##
  DateTimeFormat=mm/dd/yyyy hh:nn:ss
  MaxStringFieldSize=8000
  MaxIndexedStringFieldSize=850
  MaxUniqueStringFieldSize=850

[MSAccess2007.Params]
  Provider=Microsoft.ACE.OLEDB.12.0;

[MSAccess2007.DataTypes]
  Real=Real,FLOAT NOT NULL DEFAULT %1:s
  String=String,TEXT NOT NULL DEFAULT %1:s
  Date=Date,DATETIME NOT NULL DEFAULT '30.12.1899 00:00:00'
  Memo=Memo,TEXT WITH COMPRESSION

;----------------------------- Oracle_DBX ---------------------------------

[Oracle_DBX]
  VersionStr=Oracle Database
  AccessType=OracleDBX
  DBXVersion=4

  DriverName=dbxora.dll
  DBXVendorLib=oci.dll
  DBXFuncName=getSQLDriverORACLE
    
  MaxTableNameLength=30
  MaxIndexNameLength=30
  MaxFieldNameLength=30
;начиная с версии 12.2 длина имён увеличена с 30 до 128, если использовать кирилицу, то лимит сокращается вдвое
;  MaxTableNameLength=128
;  MaxIndexNameLength=128
;  MaxFieldNameLength=128
  MaxStringFieldSize=4000
  MaxNStringFieldSize=2000

  TableNameMask=%s

  NewFieldNameMask=%s
  CreateFieldNameMask=""%1:s""
  SelectFieldNameMask=""%0:s"."%1:s""
  SelectFieldAliasMask=""%0:s"."%1:s" "%2:s""
  NewTableNameMask=%s
  CreateTableNameMask=""%s""
  SelectTableNameMask=""%0:s" %1:s"
  SelectFullTableNameMask=""%0:s"."%1:s" %2:s"
  CreateIndexNameMask=""%s""
  SelectTableNameIndexMask=""%0:s" %1:s"
  SelectFullTableNameIndexMask=""%0:s"."%1:s" %2:s"

  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyy-mm-dd hh:nn:ss
  CharSetLevel=Database
  DatabaseCharset=3

  DoubleSymbol='
  DateTimeFrame=TO_DATE('%s','YYYY-MM-DD HH24:MI:SS')
  NullSortRule=0
  MultiWriteAllowed=1
  Ansi92NullNoSupportedValueTypes=String

  NullOrSkipEmptyLOB=1
  MemoUnicodeIsUTF16=1

  InstanceDivider=\
  LikeMaskedChars=_%
  ReadWriteConnection=1
  UniqueErrorMessage=duplicate;уникальности;unique constraint 
  CanAlterTable=1
  CanAlterColumn=1
;  CanOptimResize
  ObjNamesTranslate=1
  SetByValueTypes=Real,Integer,Boolean,Int64
  DatabaseMoveMethod=3  

[Oracle_DBX.DataTypes]
;  Real=Real,NUMBER DEFAULT 0 NOT NULL
;  Real=Real,BINARY_FLOAT DEFAULT 0 NOT NULL
  Real=Real,BINARY_DOUBLE DEFAULT 0 NOT NULL
  Integer=Integer,NUMBER(11) DEFAULT 0 NOT NULL
  Boolean=Integer,NUMBER(1) DEFAULT 0 NOT NULL
  String=String,VARCHAR2(%0:d)
  String_Unicode=String,NVARCHAR2(%0:d)
  Date=Date,DATE DEFAULT %1:s NOT NULL
  Memo=Memo,CLOB
  Memo_Unicode=Memo,NCLOB
  Image=Image,BLOB
  Binary=Binary,BLOB
  OleDocument=OleDocument,BLOB
  Int64=Int64,NUMBER(20) DEFAULT 0 NOT NULL

[Oracle_DBX.Functions]
  SubStr=SUBSTR(%0:s,%1:s,%2:s)
  Year=EXTRACT(YEAR FROM %0:s)
  Mon=EXTRACT(MONTH FROM %0:s)
  Day=EXTRACT(DAY FROM %0:s)
  Hour=EXTRACT(HOUR FROM CAST(%0:s AS TIMESTAMP))
  Minute=EXTRACT(MINUTE FROM CAST(%0:s AS TIMESTAMP))
  Second=EXTRACT(SECOND FROM CAST(%0:s AS TIMESTAMP))
  Up=UPPER(%0:s)
  Lo=LOWER(%0:s)
  Int=CAST(%0:s AS NUMBER(11))
  Num=CAST(%0:s AS NUMBER)
  Length=NVL2(%0:s, LENGTH(%0:s), 0)
  Pos=INSTR(%1:s,%0:s)
  Repstr=RPAD(%0:s, %1:s * LENGTH(%0:s), %0:s)
  Mod=MOD(%0:s,%1:s)
  Log=LN(%0:s)
  Exp=EXP(%0:s)
  Sqrt=SQRT(%0:s)
  aggrMin=DECODE(SUM(NVL2(%0:s,0,1)), 0, MIN(%0:s), NULL)
  PeriodSec=(%0:s - %1:s)*86400
  ;contains=CONTAINS(%0:s, %1:s)
  StrIndexConvert=NLSSORT(%0:s,'NLS_SORT = ''BINARY_CI''')

[Oracle_DBX.SQLStrings]

;  sctAutoexecCommands=ALTER SESSION SET recyclebin = OFF NLS_TERRITORY = 'RUSSIA' NLS_NUMERIC_CHARACTERS= '. ' NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS' NLS_COMP=LINGUISTIC NLS_SORT=BINARY_CI NLS_LENGTH_SEMANTICS=CHAR cursor_sharing=SIMILAR QUERY_REWRITE_ENABLED = TRUE QUERY_REWRITE_INTEGRITY = TRUSTED
  sctAutoexecCommands=ALTER SESSION SET recyclebin = OFF NLS_TERRITORY = 'RUSSIA' NLS_NUMERIC_CHARACTERS= '. ' NLS_COMP=LINGUISTIC NLS_SORT=BINARY_CI NLS_LENGTH_SEMANTICS=CHAR cursor_sharing=SIMILAR QUERY_REWRITE_ENABLED = TRUE QUERY_REWRITE_INTEGRITY = TRUSTED

; ==================== Информация ===================
;  sctDetectVersion=SELECT * FROM (SELECT SUBSTR(BANNER, 1, 15) FROM V$VERSION) WHERE RowNum = 1
  sctCharSetDetectSQL=SELECT 'ORACLE-' || Value FROM NLS_DATABASE_PARAMETERS WHERE Parameter = 'NLS_CHARACTERSET'
  sctDetectDuplicates=SELECT %0:s FROM %1:s WHERE DELETED = 0 GROUP BY %0:s HAVING COUNT(*) > 1
  sctTestConnection=SELECT 'Test connection...' FROM Dual

; ================ Администрирование ================

  sctCreateDatabase=CREATE TABLESPACE TB_%0:s DATAFILE '%1:s%0:s.dbf' SIZE 2 M AUTOEXTEND ON NEXT 1 M\rCREATE TEMPORARY TABLESPACE TB_%0:s_TMP TEMPFILE '%1:s%0:s_tmp.dbf' SIZE 2 M AUTOEXTEND ON NEXT 1 M
  sctCreateLoginAndGrantAccess=CREATE USER %1:s IDENTIFIED BY "%2:s" DEFAULT TABLESPACE TB_%0:s TEMPORARY TABLESPACE TB_%0:s_TMP\rGRANT CREATE SESSION TO %1:s\rGRANT CREATE table to %1:s\rGRANT CREATE view to %1:s\rGRANT CREATE ANY DIRECTORY TO %1:s\rGRANT DROP ANY DIRECTORY TO %1:s\rALTER USER %1:s quota unlimited on TB_%0:s
  sctDropDatabase=DROP TABLESPACE TB_%0:s INCLUDING CONTENTS\rDROP TABLESPACE TB_%0:s_TMP INCLUDING CONTENTS
  sctDropLogin=DROP USER %0:s CASCADE
  sctGetCatalogNames=select tablespace_name from USER_TABLESPACES

  sctAttachDatabase=ALTER TABLESPACE TB_%0:s ONLINE\rALTER TABLESPACE TB_%0:s_TMP TEMPFILE ONLINE
;  sctDetachDatabase=ALTER TABLESPACE TB_%0:s_TMP TEMPFILE OFFLINE\rALTER TABLESPACE TB_%0:s OFFLINE NORMAL\rSELECT name, status from v$datafile\rSELECT name, status from v$tempfile 
  sctDetachDatabase=ALTER TABLESPACE TB_%0:s_TMP TEMPFILE OFFLINE\rALTER TABLESPACE TB_%0:s OFFLINE NORMAL

  sctMoveDatabase=ALTER TABLESPACE TB_%0:s RENAME DATAFILE '%1:s%0:s.dbf' TO '%2:s%0:s.dbf'\rALTER DATABASE RENAME FILE '%1:s%0:s_tmp.dbf' TO '%2:s%0:s_tmp.dbf'

  sctNativeBackup=sql:CREATE OR REPLACE DIRECTORY TB_Export_%UserName% AS '%BackupDir%'\rrun:%DBMS_Home%\\Bin\\expdp.exe %UserName%/%Password%@%HostName%:%Port%/%Database% schemas=%UserName% DIRECTORY=TB_Export_%UserName% DUMPFILE='%BackupFile%' NOLOGFILE=YES\rsql:DROP DIRECTORY TB_Export_%UserName%
  sctNativeCompressBackup=sql:CREATE OR REPLACE DIRECTORY TB_Export_%UserName% AS '%BackupDir%'\rrun:%DBMS_Home%\\Bin\\expdp.exe %UserName%/%Password%@%HostName%:%Port%/%Database% schemas=%UserName% DIRECTORY=TB_Export_%UserName% DUMPFILE='%BackupFile%' NOLOGFILE=YES compression=all\rsql:DROP DIRECTORY TB_Export_%UserName%
  sctNativeRestore=sql:CREATE OR REPLACE DIRECTORY TB_Import_%UserName% AS '%BackupDir%'\rrun:%DBMS_Home%\\Bin\\impdp.exe %UserName%/%Password%@%HostName%:%Port%/%Database% directory=TB_Import_%UserName% dumpfile='%BackupFile%' remap_schema=%BackupUserName%:%UserName% remap_tablespace=TB_%BkpDBName%:TB_%DBName% TABLE_EXISTS_ACTION=replace\rsql:DROP DIRECTORY TB_Import_%UserName%

; ===================== Таблицы =====================
;  sctGetTableNamesSQL=SELECT Table_Name FROM User_Tables order by Table_Name
  sctGetTableNamesSQL=SELECT Table_Name as object_name FROM User_Tables union select view_name as object_name from user_views order by object_name
  sctGetFieldNamesSQL=SELECT Column_Name, Data_Type, Char_Length, NVL(Data_Precision,0), NVL(Data_Scale,0) FROM User_Tab_Columns WHERE Table_Name = '%0:s'
  sctGetKeyFieldNamesSQL=SELECT CC.Column_Name FROM User_Cons_Columns CC, User_Constraints C WHERE(C.Table_Name = '%0:s')AND(CC.Constraint_Name = C.Constraint_Name)AND(C.Constraint_Type = 'P')
  sctGetFieldConstraintNamesSQL=SELECT CC.Constraint_Name FROM User_Cons_Columns CC, User_Constraints C WHERE(C.Table_Name = '%0:s')AND(CC.Constraint_Name = C.Constraint_Name)AND(CC.Column_Name = '%1:s')

  sctCreateTable=CREATE TABLE %0:s (%1:s)\rALTER TABLE %0:s ADD %2:s
  sctAddField=ALTER TABLE %0:s ADD %1:s
  sctAddFields=ALTER TABLE %0:s ADD (%1:s)
  sctRenameTable=ALTER TABLE %1:s RENAME TO %0:s
  sctDropConstraint=
  sctDropField=ALTER TABLE %0:s DROP COLUMN %1:s
  sctDropTable=DROP TABLE %0:s

  sctAlterTable=ALTER TABLE %0:s MODIFY (%1:s)
  sctAlterField=%0:s %1:s

; ===================== Индексы =====================
  sctGetIndexNamesSQL=SELECT Index_Name FROM User_Indexes
  sctDetectKeyIndexName=SELECT Index_Name FROM User_Constraints WHERE (Table_Name = '%0:s') AND (Constraint_Type = 'P')
;  sctGetTableIndexNamesSQL=SELECT * FROM User_Indexes WHERE (Table_Name = '%0:s')
  sctGetIndexesNameByFieldNames=SELECT a.index_name, a.column_name, b.column_expression FROM user_ind_columns a LEFT JOIN user_ind_expressions b on a.index_name = b.index_name WHERE (a.table_name = '%0:s')

; обычные индексы с мониторингом статистики
;  sctCreateAscIndex=CREATE INDEX %0:s ON %1:s (%2:s)\rALTER INDEX %0:s MONITORING USAGE
;  sctCreateDscIndex=CREATE INDEX %0:s ON %1:s (%2:s DESC)\rALTER INDEX %0:s MONITORING USAGE
;  sctCreateUniqueIndex=CREATE UNIQUE INDEX %0:s ON %1:s (%2:s)\rALTER INDEX %0:s MONITORING USAGE

  sctDropIndex=DROP INDEX %1:s

; ======================= VIEW ======================
  sctCreateView=CREATE OR REPLACE VIEW %0:s AS SELECT * FROM %1:s 
  sctDropView=DROP VIEW %0:s

; ======================= DML =======================
  sctInsert=INSERT INTO %0:s (%1:s) VALUES (%2:s)
  sctInsertSelect=INSERT INTO %0:s (%1:s) (SELECT %2:s %3:s FROM %4:s)
  sctUpdateWhere=UPDATE %0:s SET %1:s WHERE %2:s
  sctDeleteWhere=DELETE FROM %0:s WHERE %1:s

; ===================== SELECT ======================
  sctSelectSimple=SELECT %0:s %1:s FROM %2:s
  sctSelectOrderBy=SELECT %0:s %1:s FROM %2:s ORDER BY %4:s
  sctSelectWhere=SELECT %0:s %1:s FROM %2:s WHERE %3:s
  sctSelectWhereOrderBy=SELECT %0:s %1:s FROM %2:s WHERE %3:s ORDER BY %4:s

  sctSelectWhereOrderByPacketing=SELECT * FROM (SELECT /*+ FIRST_ROWS(%5:d) %0:s */ %1:s FROM %2:s WHERE %3:s ORDER BY %4:s) Where RowNum <= %5:d
  sctSelectOrderByPacketing=SELECT * FROM (SELECT /*+ FIRST_ROWS(%5:d) %0:s */ %1:s FROM %2:s ORDER BY %4:s) Where RowNum <= %5:d
  sctSelectWhereByPacketing=SELECT * FROM (SELECT /*+ FIRST_ROWS(%5:d) %0:s */ %1:s FROM %2:s WHERE %3:s) Where RowNum <= %5:d
  sctSelectSimpleByPacketing=SELECT * FROM (SELECT /*+ FIRST_ROWS(%5:d) %0:s */ %1:s FROM %2:s) Where RowNum <= %5:d  

;  для Oracle 12+
;  sctSelectSimpleByPacketing=SELECT /*+ FIRST_ROWS(%5:d) %0:s */ %1:s FROM %2:s FETCH FIRST %5:d ROWS ONLY
;  sctSelectOrderByPacketing=SELECT /*+ FIRST_ROWS(%5:d) %0:s */ %1:s FROM %2:s ORDER BY %4:s FETCH FIRST %5:d ROWS ONLY
;  sctSelectWhereByPacketing=SELECT /*+ FIRST_ROWS(%5:d) %0:s */ %1:s FROM %2:s WHERE %3:s FETCH FIRST %5:d ROWS ONLY
;  sctSelectWhereOrderByPacketing=SELECT /*+ FIRST_ROWS(%5:d) %0:s */ %1:s FROM %2:s WHERE %3:s ORDER BY %4:s FETCH FIRST %5:d ROWS ONLY

; ==================== Выражения ====================
;  sctOrderByAsc=ASC NULLS FIRST
;  sctOrderByDesc=DESC NULLS LAST

;.


[Oracle_DBX.Params]

  Database=//%HostName%:%Port%/%Database%
  UserName=%UserName%
  Password=%Password%  
  
;----------------------------- Informix_ADO ------------------------------------

[Informix_ADO]
  AccessType=ADO
  DriverName=Ifxoledbc.2
  MultiWriteAllowed=1
  MaxTableNameLength=18
  MaxIndexNameLength=18
  MaxFieldNameLength=18
  ObjNamesTranslate=0
  TableNameMask=%s
  NewTableNameMask=TB_%s
  NewFieldNameMask=TB_%s
  CreateIndexNameMask=%s
  CreateTableNameMask=%s
  CreateFieldNameMask=%1:s
  SelectTableNameMask=%0:s %1:s
  SelectFieldNameMask=%0:s.%1:s
  SelectFieldAliasMask=%0:s.%1:s %2:s
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyy-mm-dd hh:nn:ss.xxx
  CharSetLevel=Database
  CharSet=Informix-ru_ru.1251
  BiDirectional=1
  MaxStringFieldSize=255
  MaxIndexedStringFieldSize=255
  MaxUniqueStringFieldSize=255
  DateTimeFieldProcess=EXTEND(%0:s,YEAR TO FRACTION(3))
  UniqueErrorMessage=duplicate key row;duplicate key in object;уникальным индексом

[Informix_ADO.Params]
  Provider=Ifxoledbc.2;
  User ID=%UserName%;
  Password=%Password%;
  Persist Security Info=True;
  Data Source=%Database%;
  Extended Properties=""

[Informix_ADO.DataTypes]
  Real=Real,DOUBLE PRECISION DEFAULT 0 NOT NULL
  Integer=Integer,INTEGER DEFAULT 0 NOT NULL
  Boolean=String,Char(1) DEFAULT 'f' NOT NULL
  String=String,VARCHAR(%0:d) DEFAULT '' NOT NULL
  Date=Date,DATETIME YEAR TO FRACTION DEFAULT DATETIME (1899-12-30 00:00:00.000) YEAR TO FRACTION NOT NULL
  ;Date=Date,DATETIME DEFAULT DATETIME (1899-12-30 00::00::00.000) NOT NULL
  Memo=Memo,TEXT
  Image=Image,BYTE
  Binary=Binary,BYTE
  OleDocument=OleDocument,BYTE

[Informix_ADO.Functions]
  substr=SUBSTR(%0:s,%1:s,%2:s)
  year=YEAR(%0:s)
  mon=MONTH(%0:s)
  day=DAY(%0:s)
; hour=DATEPART(HOUR,%0:s)
; minute=DATEPART(MINUTE,%0:s)
; second=DATEPART(SECOND,%0:s)
  up=UPPER(%0:s)
  lo=LOWER(%0:s)
; int=CAST(%0:s as INTEGER)
; num=CAST(%0:s as FLOAT)
  length=LENGTH(%0:s)
; pos=CHARINDEX(%0:s,%1:s)
; repstr=REPLICATE(%0:s,%1:s)
; periodsec=DATEDIFF(second,%0:s,%1:s)
  mod=MOD(%0:s, %1:s)
  log=LOGN(%0:s)
  exp=EXP(%0:s)
  sqrt=SQRT(%0:s)

[Informix_ADO.SQLStrings]
  sctCreateTable=CREATE TABLE %0:s (%1:s, %2:s) LOCK MODE ROW
  sctGetTableNamesSQL=SELECT TRIM(tabname) FROM SYSTABLES WHERE tabname<>''
  sctRenameTable=RENAME TABLE %1:s TO %0:s
  sctSelectWhereOrderByPacketing=SELECT FIRST %5:d %1:s\nFROM %2:s\nWHERE %3:s\nORDER BY %4:s
  sctSelectOrderByPacketing=SELECT FIRST %5:d %1:s\nFROM %2:s\nORDER BY %4:s
  sctSelectWhereByPacketing=SELECT FIRST %5:d %1:s\nFROM %2:s\nWHERE %3:s
  sctSelectSimpleByPacketing=SELECT FIRST %5:d %1:s\nFROM %2:s
  sctGetIndexNamesSQL=SELECT TRIM(idxname) FROM SYSINDEXES

;----------------------------- Informix_BDEODBC --------------------------------

[Informix_BDEODBC]
  AccessType=InformixBDEODBC
  DriverName=INFORMIX 3.80 32 BIT
  MultiWriteAllowed=0
  MaxTableNameLength=18
  MaxIndexNameLength=18
  MaxFieldNameLength=18
  ObjNamesTranslate=1
  TableNameMask=%s
  NewTableNameMask=TB_%s
  NewFieldNameMask=TB_%s
  CreateIndexNameMask=%s
  CreateTableNameMask=%s
  CreateFieldNameMask=%1:s
  SelectTableNameMask=%0:s %1:s
  SelectFieldNameMask=%0:s.%1:s
  SelectFieldAliasMask=%0:s.%1:s %2:s
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyy-mm-dd hh:nn:ss.xxx
  CharSetLevel=Database
  CharSet=Informix-ru_ru.1251
  BiDirectional=1
; SelectHintBeforeFields={+AVOID_FULL(%tablename%)}
  MaxStringFieldSize=255
  MaxIndexedStringFieldSize=255
  MaxUniqueStringFieldSize=255

[Informix_BDEODBC.Params]
  DATABASE NAME=%Database%
  ODBC DSN=%odbc%
  USER NAME=%UserName%
  PASSWORD=%Password%
  BLOB SIZE=512
  BLOBS TO CACHE=128

[Informix_BDEODBC.DataTypes]
  Real=Real,DOUBLE PRECISION DEFAULT 0 NOT NULL
  Integer=Integer,INTEGER DEFAULT 0 NOT NULL
  Boolean=String,Char(1) DEFAULT 'f' NOT NULL
  String=String,VARCHAR(%0:d) DEFAULT '' NOT NULL
  Date=Date,DATETIME YEAR TO FRACTION DEFAULT DATETIME (1899-12-30 00:00:00.000) YEAR TO FRACTION NOT NULL
  Memo=Memo,TEXT
  Image=Image,BYTE
  Binary=Binary,BYTE
  OleDocument=OleDocument,BYTE

[Informix_BDEODBC.Functions]
  substr=SUBSTR(%0:s,%1:s,%2:s)
  year=YEAR(%0:s)
  mon=MONTH(%0:s)
  day=DAY(%0:s)
; hour=DATEPART(HOUR,%0:s)
; minute=DATEPART(MINUTE,%0:s)
; second=DATEPART(SECOND,%0:s)
  up=UPPER(%0:s)
  lo=LOWER(%0:s)
; int=CAST(%0:s as INTEGER)
; num=CAST(%0:s as FLOAT)
  length=LENGTH(%0:s)
; pos=CHARINDEX(%0:s,%1:s)
; repstr=REPLICATE(%0:s,%1:s)
; periodsec=DATEDIFF(second,%0:s,%1:s)
  mod=MOD(%0:s, %1:s)
  log=LOGN(%0:s)
  exp=EXP(%0:s)
  sqrt=SQRT(%0:s)

[Informix_BDEODBC.SQLStrings]
  sctCreateTable=CREATE TABLE %0:s (%1:s, %2:s) LOCK MODE ROW
  sctGetTableNamesSQL=SELECT TRIM(tabname) FROM SYSTABLES WHERE TRIM(tabname)<>''
  sctRenameTable=RENAME TABLE %1:s TO %0:s
  sctSelectWhereOrderByPacketing=SELECT FIRST %5:d %1:s\nFROM %2:s\nWHERE %3:s\nORDER BY %4:s
  sctSelectOrderByPacketing=SELECT FIRST %5:d %1:s\nFROM %2:s\nORDER BY %4:s
  sctSelectWhereByPacketing=SELECT FIRST %5:d %1:s\nFROM %2:s\nWHERE %3:s
  sctSelectSimpleByPacketing=SELECT FIRST %5:d %1:s\nFROM %2:s
  sctGetIndexNamesSQL=SELECT TRIM(idxname) FROM SYSINDEXES

;----------------------------- Informix_ADOODBC --------------------------------

[Informix_ADOODBC]
  AccessType=InformixADOODBC
  DriverName=MSDASQL.1
  MultiWriteAllowed=0
  MaxTableNameLength=18
  MaxIndexNameLength=18
  MaxFieldNameLength=18
  ObjNamesTranslate=1
  TableNameMask=%s
  NewTableNameMask=TB_%s
  NewFieldNameMask=TB_%s
  CreateIndexNameMask=%s
  CreateTableNameMask=%s
  CreateFieldNameMask=%1:s
  SelectTableNameMask=%0:s %1:s
  SelectFieldNameMask=%0:s.%1:s
  SelectFieldAliasMask=%0:s.%1:s %2:s
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyy-mm-dd hh:nn:ss.xxx
  CharSetLevel=Database
  CharSet=Informix-ru_ru.1251
  BiDirectional=1
; SelectHintBeforeFields={+AVOID_FULL(%tablename%)}
  MaxStringFieldSize=255
  MaxIndexedStringFieldSize=120
  MaxUniqueStringFieldSize=120
  DateTimeFieldProcess=EXTEND(%0:s,YEAR TO FRACTION(3))
  UniqueErrorMessage=Could not insert new row - duplicate value;-239:Integrity constraint violation
  ServerCursorOnly=1

[Informix_ADOODBC.Params]
  Provider=MSDASQL.1;
  User ID=%UserName%;
  Password=%Password%;
  Persist Security Info=True;
  Data Source=%odbc%;
  Initial Catalog=%Database%;
  BLOB SIZE=512
  BLOBS TO CACHE=128

[Informix_ADOODBC.DataTypes]
  Real=Real,DOUBLE PRECISION DEFAULT 0 NOT NULL
  Integer=Integer,INTEGER DEFAULT 0 NOT NULL
  Boolean=String,Char(1) DEFAULT 'f' NOT NULL
  String=String,VARCHAR(%0:d) DEFAULT '' NOT NULL
  Date=Date,DATETIME YEAR TO FRACTION DEFAULT DATETIME (1899-12-30 00:00:00.000) YEAR TO FRACTION NOT NULL
  Memo=Memo,TEXT
  Image=Image,BYTE
  Binary=Binary,BYTE
  OleDocument=OleDocument,BYTE

[Informix_ADOODBC.Functions]
  substr=SUBSTR(%0:s,%1:s,%2:s)
  year=YEAR(%0:s)
  mon=MONTH(%0:s)
  day=DAY(%0:s)
; hour=DATEPART(HOUR,%0:s)
; minute=DATEPART(MINUTE,%0:s)
; second=DATEPART(SECOND,%0:s)
  up=UPPER(%0:s)
  lo=LOWER(%0:s)
; int=CAST(%0:s as INTEGER)
; num=CAST(%0:s as FLOAT)
  length=LENGTH(%0:s)
; pos=CHARINDEX(%0:s,%1:s)
; repstr=REPLICATE(%0:s,%1:s)
; periodsec=DATEDIFF(second,%0:s,%1:s)
  mod=MOD(%0:s, %1:s)
  log=LOGN(%0:s)
  exp=EXP(%0:s)
  sqrt=SQRT(%0:s)

[Informix_ADOODBC.SQLStrings]
  sctCreateTable=CREATE TABLE %0:s (%1:s, %2:s) LOCK MODE ROW
  sctGetTableNamesSQL=SELECT TRIM(tabname) FROM SYSTABLES WHERE TRIM(tabname)<>''
  sctRenameTable=RENAME TABLE %1:s TO %0:s
  sctSelectWhereOrderByPacketing=SELECT FIRST %5:d %1:s\nFROM %2:s\nWHERE %3:s\nORDER BY %4:s
  sctSelectOrderByPacketing=SELECT FIRST %5:d %1:s\nFROM %2:s\nORDER BY %4:s
  sctSelectWhereByPacketing=SELECT FIRST %5:d %1:s\nFROM %2:s\nWHERE %3:s
  sctSelectSimpleByPacketing=SELECT FIRST %5:d %1:s\nFROM %2:s
  sctGetIndexNamesSQL=SELECT TRIM(idxname) FROM SYSINDEXES

;----------------------------- Cache4_ADOODBC --------------------------------

[Cache4_ADOODBC]
  AccessType=ADO
  DriverName=MSDASQL.1
  MultiWriteAllowed=1
  MaxTableNameLength=40
  MaxIndexNameLength=40
  MaxFieldNameLength=40
  ObjNamesTranslate=0
  TableNameMask=%s
  NewTableNameMask=TB_%s
  NewFieldNameMask=TB_%s
  CreateIndexNameMask=%s
  CreateTableNameMask=%s
  CreateFieldNameMask=%1:s
  SelectTableNameMask=%0:s %1:s
  SelectFieldNameMask=%0:s.%1:s
  SelectFieldAliasMask=%0:s.%1:s %2:s
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyy-mm-dd hh:nn:ss
  CharSetLevel=Database
  CharSet=Cache4-Win1251
  BiDirectional=1
  UniqueErrorMessage=duplicate key row;duplicate key in object;уникальным индексом

[Cache4_ADOODBC.Params]
  Provider=MSDASQL.1;
  Persist Security Info=True;
  User ID=%UserName%;
  Password=%Password%;
  Initial Catalog=%Database%;
  Locale Identifier=1049;
  Connect Timeout=10;
  Data Source=%odbc%;
  Extended Properties="DSN=%odbc%;SERVER=127.0.0.1;DATABASE=%Database%;UID=%UserName%;PWD=%Password%";

[Cache4_ADOODBC.DataTypes]
  Real=Real,DOUBLE PRECISION NOT NULL DEFAULT %1:s
  Integer=Integer,INTEGER NOT NULL DEFAULT %1:s
  Boolean=Integer,BIT DEFAULT %1:s
  String=String,VARCHAR(%0:d) NOT NULL DEFAULT %1:s
  Date=Date,TIMESTAMP NOT NULL DEFAULT %1:s
  Memo=Memo,TEXT
  Image=Image,LONGVARBINARY
  Binary=Binary,LONGVARBINARY
  OleDocument=OleDocument,LONGVARBINARY

[Cache4_ADOODBC.Functions]
  substr=SUBSTRING(%0:s,%1:s,%2:s)
  year={fn YEAR(%0:s)}
  mon={fn MONTH(%0:s)}
  day={fn DAYOFMONTH(%0:s)}
  hour={fn HOUR(%0:s)}
  minute={fn MINUTE(%0:s)}
  second={fn SECOND(%0:s)}
  up=UPPER(%0:s)
  lo=LOWER(%0:s)
  int={fn CONVERT(%0:s, SQL_INTEGER)}
  num=TO_NUMBER({fn CONVERT(%0:s, SQL_VARCHAR)})
  length={fn LENGTH(%0:s)}
  pos=POSITION(%0:s IN %1:s)
  periodsec=TIMESTAMPDIFF(SQL_TSI_SECOND,%0:s,%1:s)
  mod={fn MOD(%0:s,%1:s)}
  log={fn LOG(%0:s)}
  exp={fn EXP(%0:s)}
  sqrt={fn SQRT(%0:s)}

[Cache4_ADOODBC.SQLStrings]
  sctGetIndexNamesSQL=None
  sctSelectWhereOrderByPacketing=SELECT TOP %5:d %0:s FROM %2:s WHERE %3:s ORDER BY %4:s
  sctSelectOrderByPacketing=SELECT TOP %5:d %0:s FROM %2:s ORDER BY %4:s
  sctSelectWhereByPacketing=SELECT TOP %5:d %0:s FROM %2:s WHERE %3:s
  sctSelectSimpleByPacketing=SELECT TOP %5:d %0:s FROM %2:s

;----------------------------- Cache4_BDEODBC ----------------------------------

[Cache4_BDEODBC]
  AccessType=BDE
  DriverName=InterSystems ODBC
  MultiWriteAllowed=1
  MaxTableNameLength=40
  MaxIndexNameLength=40
  MaxFieldNameLength=40
  ObjNamesTranslate=0
  TableNameMask=%s
  NewTableNameMask=TB_%s
  NewFieldNameMask=TB_%s
  CreateIndexNameMask=%s
  CreateTableNameMask=%s
  CreateFieldNameMask=%1:s
  SelectTableNameMask=%0:s %1:s
  SelectFieldNameMask=%0:s.%1:s
  SelectFieldAliasMask=%0:s.%1:s %2:s
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyy-mm-dd hh:nn:ss
  CharSetLevel=Database
  CharSet=Cache4-Win1251
  BiDirectional=1

[Cache4_BDEODBC.Params]
  DATABASE NAME=%Database%
  USER NAME=%UserName%
  ODBC DSN=%odbc%
  ENABLE SCHEMA CACHE=FALSE
  BLOB SIZE=100
  PASSWORD=%Password%

[Cache4_BDEODBC.DataTypes]
  Real=Real,DOUBLE PRECISION NOT NULL DEFAULT %1:s
  Integer=Integer,INTEGER NOT NULL DEFAULT %1:s
  Boolean=Integer,BIT DEFAULT %1:s
  String=String,VARCHAR(%0:d) NOT NULL DEFAULT %1:s
  Date=Date,TIMESTAMP NOT NULL DEFAULT %1:s
  Memo=Memo,TEXT
  Image=Image,LONGVARBINARY
  Binary=Binary,LONGVARBINARY
  OleDocument=OleDocument,LONGVARBINARY

[Cache4_BDEODBC.Functions]
  substr=SUBSTRING(%0:s,%1:s,%2:s)
  year={fn YEAR(%0:s)}
  mon={fn MONTH(%0:s)}
  day={fn DAYOFMONTH(%0:s)}
  hour={fn HOUR(%0:s)}
  minute={fn MINUTE(%0:s)}
  second={fn SECOND(%0:s)}
  up=UPPER(%0:s)
  lo=LOWER(%0:s)
  int={fn CONVERT(%0:s, SQL_INTEGER)}
  num=TO_NUMBER({fn CONVERT(%0:s, SQL_VARCHAR)})
  length={fn LENGTH(%0:s)}
  pos=POSITION(%0:s IN %1:s)
  periodsec=TIMESTAMPDIFF(SQL_TSI_SECOND,%0:s,%1:s)
  mod={fn MOD(%0:s,%1:s)}
  log={fn LOG(%0:s)}
  exp={fn EXP(%0:s)}
  sqrt={fn SQRT(%0:s)}

[Cache4_BDEODBC.SQLStrings]
  sctGetIndexNamesSQL=None
  sctSelectWhereOrderByPacketing=SELECT TOP %5:d %0:s FROM %2:s WHERE %3:s ORDER BY %4:s
  sctSelectOrderByPacketing=SELECT TOP %5:d %0:s FROM %2:s ORDER BY %4:s
  sctSelectWhereByPacketing=SELECT TOP %5:d %0:s FROM %2:s WHERE %3:s
  sctSelectSimpleByPacketing=SELECT TOP %5:d %0:s FROM %2:s

;----------------------------- Progress9c --------------------------------------

[Progress9c]
  AccessType=BDE
  ;AccessType=ADO
  ;DriverName=MSDASQL.1
  DriverName=MERANT 3.60 32-BIT Progress SQL92 v9.1C
  MultiWriteAllowed=0
  MaxTableNameLength=30
  MaxIndexNameLength=30
  MaxFieldNameLength=30
  ObjNamesTranslate=1
  TableNameMask=%s
  NewTableNameMask=TB_%s
  NewFieldNameMask=TB_%s
  CreateIndexNameMask=""%s""
  CreateTableNameMask=""%s""
  CreateFieldNameMask=""%1:s""
  SelectTableNameMask="%0:s %1:s"
  SelectFieldNameMask=""%0:s"."%1:s""
  SelectFieldAliasMask=""%0:s"."%1:s" %2:s"
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyy-mm-dd hh:nn:ss
  CharSetLevel=Database
  CharSet=Progress-1251
  BiDirectional=0
; !!!
  SQLWhereCaseSensitive=1
  Ansi92NullNoSupportedValueTypes=String

[Progress9c.Params]
  ;Provider=MSDASQL.1
  Persist Security Info=False
  ;DATABASE NAME=%Database%
  USER NAME=%UserName%
  ODBC DSN=%odbc%
  ENABLE SCHEMA CACHE=FALSE
  OPEN MODE=READ/WRITE
  BLOB SIZE=32
  PASSWORD=%Password%
  SQLPASSTHRU MODE=SHARED AUTOCOMMIT
  ;Data Source=%odbc%;
  ;Extended Properties="ODBC DSN=%odbc%;USER NAME=%UserName%;PASSWORD=%Password%;"
  ;Extended Properties="%odbc%;HOST=localhost;PORT=2500;DB=%Database%;UID=%UserName%;PWD=%Password%"
  ;Locale Identifier=1049;
  ;Initial Catalog=%Database%;
  ;Data Source=%odbc%;
  ;.

[Progress9c.DataTypes]
  Real=Real,REAL DEFAULT 0 NOT NULL
  Integer=Integer,INTEGER DEFAULT 0 NOT NULL
  Boolean=Integer,BIT DEFAULT %1:s NOT NULL
  String=String,VARCHAR(%0:d)
  Date=Date,DATE DEFAULT %1:s NOT NULL
  Memo=Memo,LVARBINARY
  Image=Image,LVARBINARY
  Binary=Binary,LVARBINARY
  OleDocument=OleDocument,LVARBINARY

[Progress9c.Functions]
  up=UPPER(%0:s)
  lo=LOWER(%0:s)

[Progress9c.SQLStrings]
  sctCreateTable=CREATE TABLE %0:s (%1:s, %2:s)
  sctGetIndexNamesSQL=SELECT IDXNAME FROM SYSPROGRESS.SYSINDEXES
  sctCreateDscIndex=none

;-------------------------------- MySQL_General -------------------------------

[MySQL_General]
  CharSetLevel=Database

  MaxStringFieldSize=8000
  MaxIndexedStringFieldSize=750
  MaxUniqueStringFieldSize=750

  ObjNamesTranslate=1
  MaxTableNameLength=60
  MaxIndexNameLength=60
  MaxFieldNameLength=30

  TableNameMask=%s
  NewTableNameMask=TB_%s
  NewFieldNameMask=TB_%s
  CreateIndexNameMask=%s
; %s - имя поля и %d - размер для создаваемого индекса
  CreateIndexFieldNameSizeMask=%s(%d)
  CreateTableNameMask=%s
  CreateFieldNameMask=%1:s
  SelectTableNameMask=%0:s %1:s
  SelectFieldNameMask=%0:s.%1:s
  SelectFieldAliasMask=%0:s.%1:s AS %2:s
  SelectFullTableNameMask=%0:s.%1:s %2:s
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyy-mm-dd hh:nn:ss
  ExistDateTimeConstraint=1
  MinDateTimeValue=01.01.1753 00:00:00
  MaxDateTimeValue=31.12.9999 23:59:59
  UniqueErrorMessage=Duplicate entry
  InstanceDivider=\
  DoubleSymbol=\
; ExceptSymbols=#136;#152

  DefaultAdminUserName=root
  DefaultAdminPassword=
  DefaultAdminDatabase=mysql

  CanAlterTable=1
  CanAlterColumn=1
  CanDetectDuplicates=1
  ReadWriteConnection=1
  MultiWriteAllowed=1
  BiDirectional=1
; Отдельный конекшен для серверного курсора
  DiffConnectionForSrvCursor=1
; Отключение оптимального чтения подтаблиц
  SubTableLoadOptim=0

; Записывать пустые строковые значения для новых записей, 
; Из за того, что String - Text и не имеет Default...
  StoreStringEmptyValues=1
; ???
  TrimEndSpaces=1

  SortLigatures=
  
  DatabaseMoveMethod=2

[MySQL_General.DataTypes]
  Real=Real,FLOAT(53) NOT NULL DEFAULT %1:s
  Integer=Integer,INTEGER NOT NULL DEFAULT %1:s
  Boolean=Integer,SMALLINT NOT NULL DEFAULT %1:s
;  Boolean=boolean,BIT NOT NULL DEFAULT %1:s
  String=String,TEXT(%0:d) NOT NULL
  Date=Date,DATETIME NOT NULL DEFAULT %1:s
  Memo=Memo,LONGTEXT
  Image=Image,LONGBLOB
  Binary=Binary,LONGBLOB
  OleDocument=OleDocument,LONGBLOB
  Int64=Int64,bigint NOT NULL DEFAULT %1:s

[MySQL_General.Functions]
  substr=SUBSTRING(%0:s,%1:s,%2:s)
  year=YEAR(%0:s)
  mon=MONTH(%0:s)
  day=DAY(%0:s)
  hour=HOUR(%0:s)
  minute=MINUTE(%0:s)
  second=SECOND(%0:s)
  up=UPPER(%0:s)
  lo=LOWER(%0:s)
  int=CAST(%0:s AS SIGNED)
;  num=CAST(%0:s AS FLOAT)
  length=CHAR_LENGTH(%0:s)
  pos=LOCATE(%0:s,%1:s)
  repstr=REPEAT(%0:s,%1:s)
  periodsec=TIME_TO_SEC(TIMEDIFF(%0:s,%1:s))
  mod=%0:s %% %1:s
  log=LN(%0:s)
  exp=EXP(%0:s)
  sqrt=SQRT(%0:s)
  match_esc=

[MySQL_General.SQLStrings]
; sctDetectVersion=SELECT SUBSTRING(VERSION(), 1, 3)
  sctCharSetDetectSQL=SELECT CONCAT('MySQL-', @@collation_database)

  sctCreateTable=CREATE TABLE %0:s (%1:s, %2:s)
  sctRenameTable=RENAME TABLE %1:s TO %0:s
  sctGetTableNamesSQL=SHOW TABLES
  sctGetTableIndexNamesSQL=SHOW INDEX FROM %0:s
  sctGetFieldNamesSQL=SHOW COLUMNS FROM %0:s
  sctDropIndex=DROP INDEX %1:s ON %0:s

  sctSelectWhereOrderByPacketing=SELECT %1:s \n FROM %2:s \n WHERE %3:s \n ORDER BY %4:s \n LIMIT %5:d
  sctSelectOrderByPacketing=SELECT %1:s \n FROM %2:s \n ORDER BY %4:s \n LIMIT %5:d
  sctSelectWhereByPacketing=SELECT %1:s \n FROM %2:s \n WHERE %3:s \n LIMIT %5:d
  sctSelectSimpleByPacketing=SELECT %1:s \n FROM %2:s \n LIMIT %5:d
  sctDetectDuplicates=SELECT %0:s FROM %1:s WHERE DELETED = 0 GROUP BY %0:s HAVING COUNT(*) > 1

  sctGetCatalogNames=SHOW DATABASES
  sctCreateDatabase=USE mysql \r CREATE DATABASE `%0:s` DEFAULT CHARACTER SET=cp1251 DEFAULT COLLATE=cp1251_general_ci
  sctDropDatabase=USE mysql \r DROP DATABASE `%0:s`

; sctCreateLoginAndGrantAccess %0-Имя БД %1-Логин пользователя %2-Пароль пользователя
; sctCreateLoginAndGrantAccess=CREATE USER `%1:s` IDENTIFIED BY '%2:s' \r GRANT ALL ON *.* TO `%1:s`
  sctCreateLoginAndGrantAccess=GRANT ALL ON `%0:s`.* TO `%1:s`@localhost IDENTIFIED BY '%2:s'
  sctDropLogin=DROP USER `%0:s`@localhost
  sctAlterField=ALTER TABLE %0:s MODIFY COLUMN %1:s %2:s %3:s
  sctSetDefault=ALTER TABLE %0:s ALTER COLUMN %1:s %2:s DEFAULT %3:s
  sctGetIndexesNameByFieldNames=SELECT INDEX_NAME FROM information_schema.STATISTICS WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME = '%0:s' AND INDEX_NAME <> 'PRIMARY' AND COLUMN_NAME in (%1:s);

;------------------------------ MySQL_ADOODBC_General -------------------------

[MySQL_ADOODBC_General]
  Inherited=MySQL_General
  AccessType=MySQLADOODBC
  DriverName=MSDASQL.1

[MySQL_ADOODBC_General.Params]
  Provider=MSDASQL.1;
  User ID=%UserName%;
  Password=%Password%;
  Persist Security Info=True;
; ODBC драйвер с именем "MySQL Server" должен быть заранее настроен
; Data Source=MySQL Server;
; Для произвольного ODBC драйвера закоментировать строчку сверху и раскоментировать снизу
  Data Source=%odbc%;
  Initial Catalog=%Database%;

;------------------------------ MySQL_DBX_General -----------------------------

[MySQL_DBX_General]
  Inherited=MySQL_General
  AccessType=MySQLDBX
  DBXVersion=1
  DriverName=dbxmysql5x.dll
  DBXFuncName=getSQLDriverMYSQL
  DBXVendorLib=libMySQL.dll
  DBXResFile=errmsg.sys
  DBXStrLenExact=1

[MySQL_DBX_General:Linux]
  DriverName=libDBXMySQL5x.so
  DBXVendorLib=libmysqlclient.so.20

[MySQL_DBX_General.Params]
  HostName=%HostName%
  Database=%Database%
  UserName=%UserName%
  Password=%Password%
  Port=%Port%

[MySQL_DBX_General.SQLStrings]
  sctAutoexecCommands=SET SESSION character_set_client=cp1251 \r SET SESSION character_set_results=cp1251 \r SET SESSION character_set_connection=cp1251 \r SET SESSION collation_connection=cp1251_general_ci


[MySQL50_DBX]
  Inherited=MySQL_DBX_General
  VersionStr=5.0


[MySQL51_DBX]
  Inherited=MySQL_DBX_General
  VersionStr=5.1


[MySQL55_DBX]
  Inherited=MySQL_DBX_General
  VersionStr=5.5


[MySQL5X_DBX_Ansi]
  Inherited=MySQL_DBX_General


[MySQL5X_DBX_Unicode]
  Inherited=MySQL_DBX_General

  DBXVersion=3
  DBXFuncName=getSQLDriverMYSQLW

  MaxIndexedStringFieldSize=250
  MaxUniqueStringFieldSize=250

  DefaultStringFieldCharset=2

[MySQL5X_DBX_Unicode.SQLStrings]
  sctCreateDatabase=USE mysql \r CREATE DATABASE `%0:s` DEFAULT CHARACTER SET=utf8 DEFAULT COLLATE=utf8_general_ci
  sctAutoexecCommands=SET SESSION character_set_client=utf8 \r SET SESSION character_set_results=utf8 \r SET SESSION character_set_connection=utf8 \r SET SESSION collation_connection=utf8_general_ci

;[MySQL5X_DBX_Unicode.DataTypes]
;  String=String,VARCHAR(%0:d) NOT NULL
;  Boolean=boolean,BIT NOT NULL DEFAULT %1:s


;------------------------------ Pervasive_SQL_ADO_General ---------------------

[Pervasive_SQL_ADO_General]
  AccessType=PervasiveSQLADO
  CharSet=PervasiveSQL-Win1251
  MultiWriteAllowed=0
  MaxTableNameLength=20
  MaxIndexNameLength=20
  MaxFieldNameLength=20
  ObjNamesTranslate=0
  TableNameMask=%s
  NewTableNameMask=%s
  NewFieldNameMask=%s
  CreateIndexNameMask=""%s""
  CreateTableNameMask=""%s""
  CreateFieldNameMask=""%1:s""
  SelectTableNameMask=""%0:s" %1:s"
  SelectFieldNameMask=""%0:s"."%1:s""
  SelectFieldAliasMask=""%0:s"."%1:s" AS "%2:s""
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyy-mm-dd hh:nn:ss.x
  CharSetLevel=Database
; !!!
  SQLWhereCaseSensitive=1
  MaxStringFieldSize=250
  MaxIndexedStringFieldSize=200
  MaxUniqueStringFieldSize=200
  TrimEndSpaces=1
  ExistDateTimeConstraint=1
  MinDateTimeValue=01.01.1753 00:00:00
  MaxDateTimeValue=31.12.9999 23:59:59
  CanDetectDuplicates=1
  DefaultAdminUserName=
  DefaultAdminPassword=
  UniqueErrorMessage=duplicate value
; Отдельный конекшен для серверного курсора
  DiffConnectionForSrvCursor=1
; Отключение оптимального чтения подтаблиц
  SubTableLoadOptim=0

[Pervasive_SQL_ADO_General.DataTypes]
  Real=Real,DOUBLE DEFAULT %1:s NOT NULL
  Integer=Integer,INTEGER DEFAULT %1:s NOT NULL
  Boolean=Integer,TINYINT DEFAULT %1:s NOT NULL
  String=String,VARCHAR(%0:d) DEFAULT %1:s NOT NULL CASE
  Date=Date,TIMESTAMP DEFAULT %1:s NOT NULL
  Memo=Memo,LONGVARCHAR
  Image=Image,LONGVARBINARY
  Binary=Binary,LONGVARBINARY
  OleDocument=OleDocument,LONGVARBINARY

[Pervasive_SQL_ADO_General.Functions]
  substr=SUBSTRING(%0:s,%1:s,%2:s)
  year=EXTRACT(YEAR,%0:s)
  mon=EXTRACT(MONTH,%0:s)
  day=EXTRACT(DAY,%0:s)
  hour=EXTRACT(HOUR,%0:s)
  minute=EXTRACT(MINUTE,%0:s)
  second=EXTRACT(SECOND,%0:s)
  up=UPPER(%0:s)
  lo=LOWER(%0:s)
  int=CONVERT(%0:s, SQL_INTEGER)
  num=CONVERT(%0:s, SQL_DOUBLE)
  length=LENGTH(%0:s)
  pos=POSITION(%0:s,%1:s)
  repstr=REPLICATE(%0:s,%1:s)
  periodsec=TIMESTAMPDIFF(SQL_TSI_SECOND,%0:s,%1:s)
  mod=MOD(%0:s, %1:s)
  log=LOG(%0:s)
  exp=EXP(%0:s)
  sqrt=SQRT(%0:s)

[Pervasive_SQL_ADO_General.SQLStrings]
  sctGetIndexNamesSQL=SELECT "X$Field"."Xe$Name" FROM "X$File", "X$Field" WHERE "X$File"."Xf$Id" = "X$Field"."Xe$File" AND ("X$Field"."Xe$DataType" = 255)
  sctGetTableIndexNamesSQL=SELECT "X$Field"."Xe$Name" FROM "X$File", "X$Field" WHERE "X$File"."Xf$Id" = "X$Field"."Xe$File" AND ("X$Field"."Xe$DataType" = 255) AND ("X$File"."Xf$Name" = '%0:s')
  sctGetTableNamesSQL=SELECT "Xf$Name" FROM "x$File"
  sctGetFieldNamesSQL=SELECT "X$Field"."Xe$Name", "X$Field"."Xe$DataType", "X$Field"."Xe$Size", "X$Field"."Xe$Offset" FROM "X$File", "X$Field" WHERE "X$File"."Xf$Id"="X$Field"."Xe$File" AND "X$File"."Xf$Name" = '%0:s' AND "X$Field"."Xe$DataType" <> 255 AND "X$Field"."Xe$DataType" <> 227 ORDER BY "X$Field"."Xe$Offset"

  sctSelectWhereOrderByPacketing=SELECT TOP %5:d %1:s\nFROM %2:s\nWHERE %3:s\nORDER BY %4:s
  sctSelectOrderByPacketing=SELECT TOP %5:d %1:s\nFROM %2:s\nORDER BY %4:s
  sctSelectWhereByPacketing=SELECT TOP %5:d %1:s\nFROM %2:s\nWHERE %3:s
  sctSelectSimpleByPacketing=SELECT TOP %5:d %1:s\nFROM %2:s

  sctDropIndex=DROP INDEX %0:s.%1:s
  sctDetectDuplicates=SELECT %0:s FROM %1:s WHERE "DELETED" = 0 GROUP BY %0:s HAVING COUNT(*) > 1

;-------------------------------- Pervasive_SQL_87_ADOODBC_Engine --------------------

[Pervasive_SQL_87_ADOODBC_Engine]
  Inherited=Pervasive_SQL_ADO_General
  DriverName=PervasiveOLEDB.8.70
  VersionStr=8.7

[Pervasive_SQL_87_ADOODBC_Engine.Params]
  Provider=PervasiveOLEDB.8.70;
  Persist Encrypted=False;
  Persist Security Info=False;
  Location=%HostName%;
  Data Source=%odbc%;
  Port=1583;
  User ID=%UserName%;
  Password=%Password%;
  LocalTCP=False;
  Auto Translate=False;
  Cache Authentication=False;
  Encrypt Password=False;
  Mask Password=False;
  Impersonation Level=Anonymous;
  Mode=ReadWrite;
  Protection Level=None;
  Pessimistic Read Lock=False;
  CommandOnly=False;
  DirectOnly=False;

;-------------------------------- Pervasive_SQL_87_ADOODBC_Client --------------------

[Pervasive_SQL_87_ADOODBC_Client]
  Inherited=Pervasive_SQL_ADO_General
  DriverName=MSDASQL.1
  VersionStr=8.7

[Pervasive_SQL_87_ADOODBC_Client.Params]
  Provider=MSDASQL.1;
  Persist Security Info=False;
  Data Source=%odbc%;

;-------------------------------- Linter_General ---------------------------------------

[Linter_General]
  CharSetLevel=Database
; VARCHAR+NVARCHAR
  DatabaseCharset=3

  ObjNamesTranslate=0

  MaxStringFieldSize=4000
  MaxIndexedStringFieldSize=1000
  MaxUniqueStringFieldSize=1000

  MaxNStringFieldSize=2000
  MaxIndexedNStringFieldSize=500
  MaxUniqueNStringFieldSize=500

  TableNameMask=%s
  NewTableNameMask=%s
  NewFieldNameMask=%s
  CreateIndexNameMask=""%s""
  CreateTableNameMask=""%s""
  CreateFieldNameMask=""%1:s""
  SelectTableNameMask=""%0:s" %1:s"
  SelectFieldNameMask=""%0:s"."%1:s""
  SelectFieldAliasMask=""%0:s"."%1:s" AS "%2:s""
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=dd.mm.yyyy:hh:nn:ss

  ExistDateTimeConstraint=1
  MinDateTimeValue=01.01.1753 00:00:00
  MaxDateTimeValue=31.12.9999 23:59:59

  MultiWriteAllowed=0
  TrimEndSpaces=1
  CanDetectDuplicates=1
  UniqueErrorMessage=duplicate value;повторное значение

  DefaultAdminUserName=SYSTEM
; DefaultAdminPassword=
; AuthorizationMode=Prompt

; Отдельный конекшен для серверного курсора
  DiffConnectionForSrvCursor=1
; Отключение оптимального чтения подтаблиц
  SubTableLoadOptim=0

; Нельзя объявить значение поумолчанию, если поле явл. первичным ключем
  DefaultForPrimaryKey=0

  NullSortRule=1

  SQLWhereCaseSensitive=1
  SQLOrderCaseSensitive=1
;  SQLIndexCaseSensitive=1

  NStringValuePrefix=N

  SortLigatures=

[Linter_General.DataTypes]
  Real=Real,DOUBLE NOT NULL DEFAULT %1:s
  Integer=Integer,INTEGER NOT NULL DEFAULT %1:s
  Boolean=Integer,SMALLINT NOT NULL DEFAULT %1:s
  String=String,VARCHAR(%0:d) NOT NULL DEFAULT %1:s
  Date=Date,DATE NOT NULL DEFAULT %1:s
  Memo=Memo,BLOB
  Image=Image,BLOB
  Binary=Binary,BLOB
  OleDocument=OleDocument,BLOB
  String_Unicode=String,NCHAR VARYING(%0:d) NOT NULL DEFAULT N%1:s
  Memo_Unicode=Memo,BLOB
  Int64=Int64,bigint NOT NULL DEFAULT %1:s

[Linter_General.Functions]
  up=UPPER(%0:s)
  lo=LOWER(%0:s)
  length=CHAR_LENGTH(%0:s)
  substr=SUBSTR(%0:s,%1:s,%2:s)
; pos=POSITION(%0:s (VARCHAR) IN %1:s)
  pos=INSTR(%1:s,%0:s)
  repstr=REPEAT_STRING(%0:s,%1:s)
  int=CAST(%0:s as INTEGER)
  num=CAST(%0:s as FLOAT)
  year=EXTRACT(YEAR FROM %0:s)
  mon=EXTRACT(MONTH FROM %0:s)
  day=EXTRACT(DAY FROM %0:s)
  hour=EXTRACT(HOUR FROM %0:s)
  minute=EXTRACT(MINUTE FROM %0:s)
  second=EXTRACT(SECOND FROM %0:s)
  periodsec=DIVTIME(2,%0:s,%1:s)
  mod=mod(%0:s,%1:s)
  log=LN(%0:s)
  exp=EXP(%0:s)
  sqrt=SQRT(%0:s)

[Linter_General.SQLStrings]
  sctDetectVersion=SELECT SUBSTR(UPPER( LINTER_VERSION() ), POSITION(' V. ' IN UPPER( LINTER_VERSION() ) ) + 4, 3) AS VERSION

; sctCharSetDetectSQL=SELECT 'Linter-' + "NAME" AS CHARSET_NAME FROM "SYSTEM"."$$$CHARSET" WHERE "IDENT" IN (SELECT GETWORD("$$$S14", 116) AS CHARSET_OF_SYSTEM_DICTIONARY FROM "SYSTEM"."$$$SYSRL" WHERE ROWID = 1)
  sctCharSetDetectSQL=SELECT 'Linter-' + CAST("NAME" AS VARCHAR(66)) FROM "SYSTEM"."$$$CHARSET" WHERE "IDENT" IN (SELECT GETWORD("$$$S14", 134) AS DEFAULT_USER_CHARSET FROM "SYSTEM"."$$$SYSRL" WHERE ROWID = 1)

  sctCreateTable=CREATE TABLE %0:s (%1:s, %2:s) INDEXFILES 1(2) DATAFILES 1(2)
  sctRenameTable=ALTER TABLE %1:s RENAME TO %0:s
  sctGetIndexNamesSQL=SELECT CAST("KEYNAME" AS VARCHAR(66)) AS INDEX_NAME FROM "SYSTEM"."COMPOSITE_INDEXES"
  sctGetTableIndexNamesSQL=SELECT CAST("KEYNAME" AS VARCHAR(66)) AS INDEX_NAME, "TABLENAME" AS TABLE_NAME FROM "SYSTEM"."COMPOSITE_INDEXES" WHERE "TABLENAME" = '%0:s'
  sctGetFieldNamesSQL=SELECT "COLUMN_NAME", "DATA_TYPE", "COLUMN_SIZE", "ORDINAL_POSITION" FROM "SYSTEM"."COLUMNS" WHERE "TABLE_NAME" = '%0:s' ORDER BY "ORDINAL_POSITION"
  sctGetKeyFieldNamesSQL=SELECT "TABLE_NAME", "COLUMN_NAME" FROM "SYSTEM"."PRIMARY_KEYS"

  sctSelectWhereOrderByPacketing=SELECT %1:s \n FROM %2:s \n WHERE %3:s \n ORDER BY %4:s LIMIT %5:d
  sctSelectOrderByPacketing=SELECT %1:s \n FROM %2:s \n ORDER BY %4:s LIMIT %5:d
  sctSelectWhereByPacketing=SELECT %1:s \n FROM %2:s \n WHERE %3:s LIMIT %5:d
  sctSelectSimpleByPacketing=SELECT %1:s \n FROM %2:s LIMIT %5:d

  sctDropIndex=DROP INDEX %1:s ON %0:s
  sctDetectDuplicates=SELECT %0:s FROM %1:s WHERE DELETED = 0 GROUP BY %0:s HAVING COUNT(*) > 1
  
  sctCreateLoginAndGrantAccess=CREATE OR REPLACE USER %1:s IDENTIFIED BY '%2:s' \r GRANT DBA TO %1:s
  sctDropLogin=DROP USER %0:s CASCADE

; sctNativeBackup: %0-Имя устройства, %1-Каталог бэкапа, %2-Имя временного файла, %3-Имя итогового файла
  sctNativeBackup=SELECT COUNT("$$$ID") FROM "SYSTEM"."$$$DEVICE" WHERE "$$$LNAME" LIKE 'BK%' \n CREATE DEVICE BK%0:s DIRECTORY '%1:s' COMMENT 'Резервные копии Турбо9' \n BACKUP DATABASE DEVICE 'BK%0:s' FILE '%2:s' REWRITE \n DROP DEVICE BK%0:s

;-------------------------------- Linter60_ADO ---------------------------------------

[Linter60_ADO]
  Inherited=Linter_General
  AccessType=LinterADO
  DriverName=LinOleDB
  VersionStr=6.0
  NativeBackupName=Linter60

  MaxTableNameLength=30
  MaxIndexNameLength=30
  MaxFieldNameLength=30

[Linter60_ADO.Params]
  Provider=LinOleDB;Persist Security Info=True;
  Data Source=%Database%;
  User ID=%UserName%;
  Password=%Password%;
; Charset="CP1251";
;.

;-------------------------------- Linter61_ADO ---------------------------------------

[Linter61_ADO]
  Inherited=Linter60_ADO
  VersionStr=6.1
  NativeBackupName=Linter61
; Форматы баз не совместимы
; NativeRestore=Linter60
;.

;-------------------------------- Linter60_DBX ---------------------------------------

[Linter60_DBX]
  Inherited=Linter_General
  AccessType=LinterDBX
; Стандартный dbExpress драйвер Linter не поддерживает Unicode?...
  DatabaseCharset=1
  DBXVersion=1
; DBXVersion=3
  DriverName=%DBMS_Home%\Bin\lindbex.dll
  DBXFuncName=getSQLDriverLinterDbx
; DBXFuncName=getSQLDriverLinterDbxW

  VersionStr=6.0
  NativeBackupName=Linter60

  MaxTableNameLength=65
  MaxIndexNameLength=65
  MaxFieldNameLength=65

  ExceptSymbols=#152;

[Linter60_DBX.Params]
  HostName=%HostName%
  Database=%Database%
  UserName=%UserName%
  Password=%Password%
; ServerCharset=CP1251
;.

[Linter60_DBX.SQLStrings]
  sctCharSetDetectSQL=SELECT 'Linter-' + CAST("NAME" AS VARCHAR(66)) + '-A' FROM "SYSTEM"."$$$CHARSET" WHERE "IDENT" IN (SELECT GETWORD("$$$S14", 134) AS DEFAULT_USER_CHARSET FROM "SYSTEM"."$$$SYSRL" WHERE ROWID = 1)

  sctGetTableNamesSQL=SELECT "TABLE_NAME", "TABLE_TYPE" FROM "SYSTEM"."TABLES" ORDER BY "TABLE_TYPE", "TABLE_NAME"
; sctGetIndexNamesSQL=SELECT "KEYNAME" AS INDEX_NAME FROM "SYSTEM"."COMPOSITE_INDEXES"
; sctGetTableIndexNamesSQL=SELECT "KEYNAME" AS INDEX_NAME, "TABLENAME" AS TABLE_NAME FROM "SYSTEM"."COMPOSITE_INDEXES" WHERE "TABLENAME" = '%0:s'
;.

;-------------------------------- Linter61_DBX ---------------------------------------

[Linter61_DBX]
  Inherited=Linter60_DBX
  VersionStr=6.1
  NativeBackupName=Linter61
; Форматы баз не совместимы
; NativeRestore=Linter60
;.

;---------------------------------- PostgreSQL_General -------------------------------

[PostgreSQL_General]
  CharSetLevel=Database

;  DefaultStringFieldCharset=2

; Транслитерируем имена, чтобы не зависить от кодировки базы
; ObjNamesTranslate=0
  ObjNamesTranslate=1

  MaxTableNameLength=63
  MaxIndexNameLength=63
  MaxFieldNameLength=63

  MaxStringFieldSize=8000
  MaxIndexedStringFieldSize=8000
  MaxUniqueStringFieldSize=8000

  TableNameMask=%s
  NewTableNameMask=%s
  NewFieldNameMask=%s
  CreateIndexNameMask=""%s""
  CreateTableNameMask=""%s""
  CreateFieldNameMask=""%1:s""
  SelectTableNameMask=""%0:s" %1:s"
  SelectFieldNameMask="%0:s."%1:s""
  SelectFieldAliasMask="%0:s."%1:s" "%2:s""
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyy-mm-dd hh:nn:ss

  DefaultAdminUsername=postgres
  DefaultAdminDatabase=postgres
; AuthorizationMode=Windows

  CanAlterTable=1
;  CanAlterColumn=1
;  CanOptimResize=1

;  Для регистро-нечувствительного сравнения, должен быть установлен модуль CITEXT
  SQLWhereCaseSensitive=1
  SQLOrderCaseSensitive=1
  SQLIndexCaseSensitive=1

  NullSortRule=1

  ReadWriteConnection=1
  MultiWriteAllowed=1

; Отдельный конекшен для серверного курсора не нужен
  DiffConnectionForSrvCursor=0

;  OptimCheckCanSafeDelete=1

;  TrimEndSpaces=0
;  ExistDateTimeConstraint=0
;  CanDetectDuplicates=0

  UniqueErrorMessage=duplicate;уникальности;unique constraint  

  ExceptSymbols=#152
  SortSkipSymbols=\u00AD
  SortLigatures=\u00DF=ss;\u00FF=ss;\u00C6=AE;\u00E6=ae;\u0132=IJ;\u0133=ij;\u0152=OE;\u0153=oe;\u00DE=TH;\u00FE=th;\u01C4=DZ;\u01C5=Dz;\u01C6=dz;\u01F1=DZ;\u01F2=Dz;\u01F3=dz;\u01C7=LJ;\u01C8=Lj;\u01C9=lj;\u01CA=NJ;\u01CB=Nj;\u01CC=nj;\u01E2=AE;\u01E3=ae;\u01FC=AE;\u01FD=ae;\u0238=db;\u0239=qp

  DatabaseMoveMethod=2
  
  SetByValueTypesInsert=

[PostgreSQL_General.DataTypes]
  Real=Real,double precision NOT NULL DEFAULT %1:s
  Integer=Integer,integer NOT NULL DEFAULT %1:s
  Boolean=boolean,boolean NOT NULL DEFAULT %1:s
  String=String,character varying(%0:d) NOT NULL DEFAULT %1:s
  Date=Date,timestamp without time zone NOT NULL DEFAULT %1:s
  Memo=Memo,text
  Image=Image,bytea
  Binary=Binary,bytea
  OleDocument=OleDocument,bytea
  Int64=Int64,bigint NOT NULL DEFAULT %1:s

[PostgreSQL_General.Functions]
; StrConvert=upper(%0:s)
  up=upper(%0:s)
  lo=lower(%0:s)
  substr=substring(%0:s from %1:s for %2:s)
  pos=position(%0:s in %1:s)
  length=char_length(%0:s)
;  repstr
  year=date_part('year', %0:s)
  mon=date_part('month', %0:s)
  day=date_part('day', %0:s)
  hour=date_part('hour', %0:s)
  minute=date_part('minute', %0:s)
  second=date_part('second', %0:s)
;  periodsec=
  int=cast(%0:s as integer)
  num=cast(%0:s as double precision)
  mod=%0:s %% %1:s
  log=ln(%0:s)
  exp=exp(%0:s)
  sqrt=sqrt(%0:s)

[PostgreSQL_General.SQLStrings]
  sctGetTableNamesSQL=SELECT table_name FROM information_schema.tables WHERE table_schema='%0:s' ORDER BY table_name
  sctGetFieldNamesSQL=SELECT column_name,data_type,character_maximum_length FROM information_schema.columns WHERE table_name='%0:s' and table_schema='%1:s'

  sctGetIndexNamesSQL=SELECT indexname FROM pg_indexes
; sctGetTableIndexNamesSQL=SELECT indexname FROM pg_indexes

  sctCharSetDetectSQL=SELECT 'PostgreSQL-'||datcollate||'-'||pg_encoding_to_char(encoding) FROM pg_database WHERE datname='%0:s'

  sctSelectWhereOrderByPacketing=SELECT %1:s \n FROM %2:s \n WHERE %3:s \n ORDER BY %4:s LIMIT %5:d
  sctSelectOrderByPacketing=SELECT %1:s \n FROM %2:s \n ORDER BY %4:s LIMIT %5:d
  sctSelectWhereByPacketing=SELECT %1:s \n FROM %2:s \n WHERE %3:s LIMIT %5:d
  sctSelectSimpleByPacketing=SELECT %1:s \n FROM %2:s LIMIT %5:d

  sctAddFields=ALTER TABLE %0:s %1:s|ADD %s
  sctRenameTable=ALTER TABLE %1:s RENAME TO %0:s

; sctDetectDuplicates=SELECT %0:s FROM %1:s WHERE DELETED = 0 GROUP BY %0:s HAVING COUNT(*) > 1

  sctGetCatalogNames=SELECT datname FROM pg_database WHERE datistemplate=false

; sctCreateDatabase=CREATE DATABASE "%0:s" WITH ENCODING='WIN1251' LOCATION='%1:s' TEMPLATE=template0
  sctCreateDatabase=CREATE DATABASE "%0:s" WITH ENCODING='UTF8' TEMPLATE=template0

  sctDropDatabase=DROP DATABASE "%0:s"

  sctCreateLoginAndGrantAccess=CREATE ROLE "%1:s" LOGIN PASSWORD '%2:s'; \r GRANT ALL ON DATABASE "%0:s" TO "%1:s"
  sctDropLogin=DROP USER "%0:s"

  sctNativeBackup={set:PGPassword=%Password%\r}run:"{%DBMS_Home%\\Bin\\}pg_dump.exe" {-h "%Hostname%"} {-p %Port%} -d "%Database%" {-U "%UserName%"} --use-set-session-authorization --no-password --file="%BackupFile%"
  sctNativeCompressBackup={set:PGPassword=%Password%\r}run:"{%DBMS_Home%\\Bin\\}pg_dump.exe" {-h "%Hostname%"} {-p %Port%} -d "%Database%" {-U "%UserName%"} --use-set-session-authorization --no-password --format=c --compress=6 --file="%BackupFile%"

  sctNativeRestore={set:PGPassword=%Password%\r}run:"{%DBMS_Home%\\Bin\\}psql.exe" {-h "%Hostname%"} {-p %Port%} -d "%Database%" {-U "%UserName%"} --no-password {% --set ON_ERROR_STOP=on %} --file="%BackupFile%"
  sctNativeCompressRestore={set:PGPassword=%Password%\r}run:"{%DBMS_Home%\\Bin\\}pg_restore.exe" {-h "%Hostname%"} {-p %Port%} -d "%Database%" {-U "%UserName%"} --no-password {% --set ON_ERROR_STOP=on %} "%BackupFile%"

  sctAlterField=ALTER TABLE %0:s ALTER COLUMN %1:s TYPE %2:s
  sctSetNotNull=ALTER TABLE %0:s ALTER COLUMN %1:s %2:s NOT NULL
  sctSetDefault=ALTER TABLE %0:s ALTER COLUMN %1:s %2:s DEFAULT %3:s
  sctAddPrimaryKey=ALTER TABLE %0:s ADD CONSTRAINT %2:s PRIMARY KEY (%1:s);
  sctGetIndexesNameByFieldNames=select i.relname from pg_class t, pg_class i, pg_index ix, pg_attribute a where t.oid = ix.indrelid and i.oid = ix.indexrelid and a.attrelid = t.oid and a.attnum = ANY(ix.indkey) and t.relkind = 'r' and t.relname = '%0:s' and a.attname in (%1:s);
  sctDetectKeyIndexName=select i.relname from pg_class t, pg_class i, pg_index ix where t.oid = ix.indrelid and i.oid = ix.indexrelid and t.relkind = 'r' and t.relname = '%0:s' and ix.indisprimary = true;
  sctCast=CAST(%0:s AS %1:s)

[PostgreSQL_General.SQLStrings:Linux]
  sctNativeBackup={set:PGPASSWORD=%Password%\r}cmd:/usr/bin/pg_dump -h "%Hostname%"{ -p %Port%} -d "%Database%"{ -U "%UserName%"} --use-set-session-authorization --no-password --file="%BackupFile%"
  sctNativeCompressBackup={set:PGPASSWORD=%Password%\r}cmd:/usr/bin/pg_dump -h "%Hostname%"{ -p %Port%} -d "%Database%"{ -U "%UserName%"} --use-set-session-authorization --no-password --format=c --compress=6 --file="%BackupFile%"

  sctNativeRestore={set:PGPASSWORD=%Password%\r}cmd:/usr/bin/psql -h "%Hostname%"{ -p %Port%} -d "%Database%"{ -U "%UserName%"} --no-password --file="%BackupFile%"
  sctNativeCompressRestore={set:PGPASSWORD=%Password%\r}cmd:/usr/bin/pg_restore -h "%Hostname%"{ -p %Port%} -d "%Database%"{ -U "%UserName%"} --no-password "%BackupFile%"

;---------------------------------- PostgreSQL_ODBC --------------------------------

[PostgreSQL_ODBC]
  Inherited=PostgreSQL_General
  AccessType=PostgreSQLODBC
  DriverName=PostgreSQL ODBC Driver(ANSI)
; DriverName=PostgreSQL ODBC Driver(UNICODE)
;.

[PostgreSQL_ODBC.Params]
  DATABASE NAME=%Database%
  ODBC DSN=%odbc%
  USER NAME=%UserName%
  PASSWORD=%Password%
  BLOB SIZE=999
;  BLOBS TO CACHE=128
;.

;---------------------------------- PostgreSQL_ADO ---------------------------------

[PostgreSQL_ADO]
  Inherited=PostgreSQL_General
  AccessType=PostgreSQLADO
  DBMSSecurityParam=User=%UserName%;Password=%Password%;
;  OSSecurityParam=Integrated Security=SSPI;

; В 2 раза меньше, на случай, если база в UTF8 - не важно, т.к. транлитерируем
; MaxTableNameLength=31
; MaxIndexNameLength=31
; MaxFieldNameLength=31

  ServerCursorOnly=1

[PostgreSQL_ADO.Params]
  Provider=PMDAPGS;
  Server=%HostName%;
  Database=%Database%;
;  Application Name=%ApplicationName%
;  Workstation ID=%ComputerName%
;.

[PostgreSQL_ADO.Functions]
  aggrCount=cast(count(%0:s) as integer)
  aggrSum=cast(sum(%0:s) as double precision)


;---------------------------------- PostgreSQL_DBX ---------------------------------

[PostgreSQL_DBX]
  Inherited=PostgreSQL_General
  AccessType=PostgreSQLDBX
  DBXVersion=3
  DriverName=dbxPostgreSQL.dll
  DBXVendorLib=libpq.dll
; DBXFuncName=getSQLDriverPostgreSQL
  DBXFuncName=getSQLDriverPostgreSQLW
  DBXStrLenExact=1

; В 2 раза меньше, на случай, если база в UTF8 - не важно, т.к. транлитерируем
; MaxTableNameLength=31
; MaxIndexNameLength=31
; MaxFieldNameLength=31

  ParamPlaceholder=$%d

  InstanceDivider=\
  SchemaDivider=\

  OSSecurityParam=True

;  SetByValueTypes=Real,Integer,Date,Boolean
;.

[PostgreSQL_DBX:Linux]
  DriverName=libDBXPostgreSQL.so
  DBXVendorLib=libpq.so.5

[PostgreSQL_DBX.Params]
  HostName=%HostName%
  Database=%Database%
  SchemaName=%SchemaName%
  UserName=%UserName%
  Password=%Password%
  Port=%Port%

[PostgreSQL_DBX.SQLStrings]
;  sctAutoexecCommands=SET SESSION client_encoding=WIN1251
  sctAutoexecCommands=SET SESSION client_encoding=UTF8


;----------------------------- Interbase_General -------------------------------

[Interbase_General]
  CharSetLevel=Table

  MaxTableNameLength=31
  MaxIndexNameLength=31
  MaxFieldNameLength=31

  ;!!!
  MaxStringFieldSize=8000
  MaxNStringFieldSize=4000

  ;!!!
  MaxIndexedStringFieldSize=60
  MaxUniqueStringFieldSize=60
  MaxIndexedNumStringFieldSize=252
  MaxUniqueNumStringFieldSize=252

  TableNameMask=%s
  NewTableNameMask=TB_%s
  NewFieldNameMask=TB_%s
  CreateIndexNameMask=%s
  CreateTableNameMask=%s
  CreateFieldNameMask=%1:s
  SelectTableNameMask=%0:s %1:s
  SelectFieldNameMask=%0:s.%1:s
  SelectFieldAliasMask=%0:s.%1:s %2:s
  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)

; SetByValueTypes=
; DateTimeFormat=d-mmm-yyyy hh:nn:ss.x
  DateTimeFormat=yyyy-mm-dd hh:nn:ss.x

  SQLWhereCaseSensitive=1
;  SQLOrderCaseSensitive=1
;  SQLIndexCaseSensitive=1
  IndexAscDescDif=1
  NullSortRule=3

; StringValuePrefix="_win1251 "
; NStringValuePrefix="_win1251 "
  NumStringType=VARCHAR(%0:d) DEFAULT %1:s NOT NULL
 
  ReadWriteConnection=1
  MultiWriteAllowed=1
  OptimWideResult=1

; По умолчанию - не требуется
; DiffConnectionForSrvCursor= 
; По умолчанию - разрешено
; SubTableLoadOptim= 

  DefaultAdminUserName=SYSDBA
; DefaultAdminPassword=masterkey
; DefaultAdminDatabase=localhost:admin

; ExceptSymbols=

  CanAlterTable=1
  InstanceDivider=\

  UniqueErrorMessage=duplicate value

[Interbase_General.DataTypes]
  Real=Real,DOUBLE PRECISION DEFAULT %1:s NOT NULL
  Integer=Integer,INTEGER DEFAULT %1:s NOT NULL
  Boolean=Integer,SMALLINT DEFAULT %1:s NOT NULL
;  String=String,VARCHAR(%0:d) DEFAULT %1:s NOT NULL
  String=String,VARCHAR(%0:d) CHARACTER SET WIN1251 DEFAULT %1:s NOT NULL COLLATE PXW_CYRL
; String_Unicode=String,VARCHAR(%0:d) CHARACTER SET UTF_8 DEFAULT %1:s NOT NULL
; String_Unicode=String,VARCHAR(%0:d) CHARACTER SET UTF_8 DEFAULT %1:s NOT NULL COLLATE UNICODE_CI
; String_Unicode=String,VARCHAR(%0:d) CHARACTER SET UNICODE_FSS DEFAULT %1:s NOT NULL COLLATE UNICODE_FSS

;  Date=Date,DATE DEFAULT %1:s NOT NULL
  Date=Date,TIMESTAMP DEFAULT %1:s NOT NULL
  Memo=Memo, BLOB SUB_TYPE 1
; Memo_Unicode=Memo,NText
  Image=Image, BLOB SUB_TYPE 5
  Binary=Binary, BLOB SUB_TYPE 2
  OleDocument=OleDocument, BLOB SUB_TYPE 4
  Int64=Int64,bigint DEFAULT %1:s NOT NULL

[Interbase_General.Functions]
  up=UPPER(%0:s)
  int=CAST(%0:s as INTEGER)
  num=CAST(%0:s as FLOAT)

[Interbase_General.SQLStrings]
  sctGetTableNamesSQL=select RDB$RELATION_NAME from RDB$RELATIONS where RDB$SYSTEM_FLAG = 0 order by RDB$RELATION_NAME
  sctGetFieldNamesSQL=select F.RDB$FIELD_NAME, T.RDB$FIELD_TYPE, T.RDB$FIELD_LENGTH from RDB$RELATION_FIELDS F left join RDB$FIELDS T on F.RDB$FIELD_SOURCE = T.RDB$FIELD_NAME where UPPER(F.RDB$RELATION_NAME)=UPPER('%0:s') order by F.RDB$FIELD_POSITION
; sctGetFieldNamesSQL=select F.RDB$FIELD_SOURCE, T.RDB$FIELD_TYPE, T.RDB$FIELD_LENGTH from RDB$RELATION_FIELDS F left join RDB$FIELDS T on F.RDB$FIELD_SOURCE = T.RDB$FIELD_NAME where UPPER(F.RDB$RELATION_NAME)=UPPER('%0:s') order by F.RDB$FIELD_POSITION

  sctGetIndexNamesSQL=select RDB$INDEX_NAME from RDB$INDICES
  sctCharSetDetectSQL=select 'Interbase-'||c.RDB$CHARACTER_SET_NAME||'_'||d.RDB$COLLATION_NAME from rdb$relation_fields a, RDB$FIELDS b, RDB$CHARACTER_SETS c, RDB$COLLATIONS d where  a.RDB$RELATION_NAME=UPPER('%1:s') and b.RDB$FIELD_NAME=a.RDB$FIELD_SOURCE and b.RDB$FIELD_TYPE IN (14,37) and b.RDB$CHARACTER_SET_ID=c.RDB$CHARACTER_SET_ID and d.RDB$COLLATION_ID=a.RDB$COLLATION_ID and d.RDB$CHARACTER_SET_ID=b.RDB$CHARACTER_SET_ID

  sctSelectWhereOrderByPacketing=select %1:s \n from %2:s \n where %3:s \n order by %4:s \n rows %5:d
  sctSelectOrderByPacketing=select %1:s \n from %2:s \n order by %4:s \n rows %5:d
  sctSelectWhereByPacketing=select %1:s \n from %2:s \n where %3:s \n rows %5:d
  sctSelectSimpleByPacketing=select %1:s \n from %2:s \n rows %5:d

  sctAddFields=
; sctDropField=ALTER TABLE %0:s DROP COLUMN %1:s
  sctDropField=ALTER TABLE %0:s DROP %1:s

; sctCreateDatabase %0-Имя БД, %1-Каталог БД, %2-Username, %3-Password
; sctCreateDatabase=CREATE DATABASE '%1:s%0:s' USER '%2:s' PASSWORD '%3:s' \n PAGE_SIZE 4096 \n WITH ADMIN OPTION \n DEFAULT CHARACTER SET WIN1251
; sctCreateDatabase=CREATE DATABASE '%1:s%0:s' USER '%2:s' PASSWORD '%3:s' \n PAGE_SIZE 4096 \n WITH ADMIN OPTION

  sctCreateDatabase=CREATE DATABASE '{%HostName%:}%Path%%Database%' USER '%UserName%' PASSWORD '%Password%' \n PAGE_SIZE 4096 \n WITH ADMIN OPTION
  sctDropDatabase= {%HostName%:}%Path%%Database%

  sctCreateLoginAndGrantAccess=CREATE USER "%1:s" SET PASSWORD '%2:s'
  sctDropLogin=DROP USER "%0:s"

  sctTestConnection=select 'Test connection...' from RDB$RELATIONS where RDB$RELATION_NAME = 'RDB$RELATIONS'

;---------------------------------- Interbase_DBX ---------------------------------

[Interbase_DBX]
  Inherited=Interbase_General
  AccessType=InterbaseDBX
  DBXVersion=4
  DriverName=dbxint.dll
  DBXVendorLib=GDS32.DLL
  DBXVendorLib64=ibclient64.dll
  DBXFuncName=getSQLDriverINTERBASE

[Interbase_DBX.Params]
  Database={%HostName%:}%Path%%Database%
  UserName=%UserName%
  Password=%Password%
  SQLDialect=3
  Trim Char=True
  ServerCharSet=WIN1251

[Interbase_DBX.SQLStrings]
; sctAutoexecCommands=
;.

;---------------------------------- Firebird_General -------------------------------

[Firebird_General]
  Inherited=Interbase_General

  MaxStringFieldSize=8000
  MaxNStringFieldSize=4000

  ;398
  MaxIndexedStringFieldSize=350
  MaxUniqueStringFieldSize=350
  MaxIndexedNumStringFieldSize=1000
  MaxUniqueNumStringFieldSize=1000

  NullSortRule=0

  ;!!!
  ReadWriteConnection=0

; VARCHAR+NVARCHAR
; DatabaseCharset=3

; IndexAscDescDif=0

;  SetByValueTypes=Integer,Date,String,Boolean
  SetByValueTypes=Real,Integer,Date,String,Boolean,Int64

  NumStringType=VARCHAR(%0:d) CHARACTER SET ASCII DEFAULT %1:s NOT NULL

[Firebird_General.DataTypes]
  String=String,VARCHAR(%0:d) CHARACTER SET WIN1251 DEFAULT %1:s NOT NULL COLLATE PXW_CYRL

  Memo=Memo, BLOB SUB_TYPE TEXT
  Image=Image, BLOB
  Binary=Binary, BLOB
  OleDocument=OleDocument, BLOB

[Firebird_General.Functions]
;; StrConvert=upper(%0:s)
;  up=upper(%0:s)
;  lo=lower(%0:s)
  substr=SUBSTRING(%0:s from %1:s for %2:s)
  pos=POSITION(%0:s in %1:s)
  length=CHAR_LENGTH(%0:s)
;;  repstr
  year=EXTRACT(YEAR FROM %0:s)
  mon=EXTRACT(MONTH FROM %0:s)
  day=EXTRACT(DAY FROM %0:s)
  hour=EXTRACT(HOUR FROM %0:s)
  minute=EXTRACT(MINUTE FROM %0:s)
  second=EXTRACT(SECOND FROM %0:s)
;;  periodsec=
  int=CAST(%0:s as INTEGER)
  num=CAST(%0:s as DOUBLE PRECISION)
  mod=MOD(%0:s, %1:s)
  log=LN(%0:s)
  exp=EXP(%0:s)
  sqrt=SQRT(%0:s)

[Firebird_General.SQLStrings]
  sctGetIndexNamesSQL=select RDB$INDEX_NAME from RDB$INDICES where not (RDB$INDEX_NAME starting with 'RDB$')
; sctGetTableIndexNamesSQL=

  sctCharSetDetectSQL=select 'FireBird-'||c.RDB$CHARACTER_SET_NAME||'_'||d.RDB$COLLATION_NAME from RDB$RELATION_FIELDS a, RDB$FIELDS b, RDB$CHARACTER_SETS c, RDB$COLLATIONS d where a.RDB$RELATION_NAME=UPPER('%1:s') and b.RDB$FIELD_NAME=a.RDB$FIELD_SOURCE and b.RDB$FIELD_TYPE IN (14,37) and b.RDB$CHARACTER_SET_ID=c.RDB$CHARACTER_SET_ID and d.RDB$COLLATION_ID=a.RDB$COLLATION_ID and d.RDB$CHARACTER_SET_ID=b.RDB$CHARACTER_SET_ID

  sctSelectWhereOrderByPacketing=select first(%5:d) %1:s \n from %2:s \n where %3:s \n order by %4:s
  sctSelectOrderByPacketing=select first(%5:d) %1:s \n from %2:s \n order by %4:s
  sctSelectWhereByPacketing=select first(%5:d) %1:s \n from %2:s \n where %3:s
  sctSelectSimpleByPacketing=select first(%5:d) %1:s \n from %2:s

; sctCreateLoginAndGrantAccess=create user %1:s password '%2:s' grant admin role \r commit
; sctCreateLoginAndGrantAccess=create user %1:s password '%2:s' \r alter user %1:s grant admin role
  sctCreateLoginAndGrantAccess=create user %1:s password '%2:s' \r grant RDB$ADMIN to %1:s \r commit
  sctDropLogin=drop user %0:s \r commit
; sctDropLogin=
;.

;---------------------------------- Firebird_DBX ---------------------------------

[Firebird_DBX]
  Inherited=Firebird_General
  AccessType=FirebirdDBX

  DBXVersion=4
  DriverName=dbxfb.dll
  DBXVendorLib=fbclient.dll
  DBXFuncName=getSQLDriverINTERBASE

[Firebird_DBX.DataTypes]
  String=String,VARCHAR(%0:d) CHARACTER SET WIN1251 DEFAULT %1:s NOT NULL COLLATE PXW_CYRL

[Firebird_DBX.SQLStrings]
  sctCreateDatabase=CREATE DATABASE '{%HostName%:}%Path%%Database%' USER '%UserName%' PASSWORD '%Password%' \n PAGE_SIZE 8192 \n DEFAULT CHARACTER SET WIN1251

[Firebird_DBX.Params]
  Database={%HostName%:}%Path%%Database%
  UserName=%UserName%
  Password=%Password%

  SQLDialect=3
  WaitOnLocks=True
  CommitRetain=False
  Trim Char=True
  Role=RDB$ADMIN

;----------------------------- Firebird_DBX_Unicode ------------------------------

[Firebird_DBX_Unicode]
  Inherited=Firebird_DBX

;  MaxIndexedStringFieldSize=350
;  MaxUniqueStringFieldSize=350
  MaxIndexedStringFieldSize=132
  MaxUniqueStringFieldSize=132

  DefaultStringFieldCharset=2
  DatabaseCharset=2

  ;???
 SQLWhereCaseSensitive=0
; SQLOrderCaseSensitive=1
;.

[Firebird_DBX_Unicode.DataTypes]
  String=String,VARCHAR(%0:d) CHARACTER SET UTF8 DEFAULT %1:s NOT NULL COLLATE UNICODE_CI
  Memo=Memo, BLOB SUB_TYPE TEXT CHARACTER SET UTF8

[Firebird_DBX_Unicode.SQLStrings]
  sctCreateDatabase=CREATE DATABASE '{%HostName%:}%Path%%Database%' USER '%UserName%' PASSWORD '%Password%' \n PAGE_SIZE 8192 \n DEFAULT CHARACTER SET UTF8

[Firebird_DBX_Unicode.Params]
  ServerCharSet=UTF8

;--------------------------------- Firebird_Embedded -----------------------------

[Firebird_Embedded]
  Inherited=Firebird_DBX
  DriverName=%T9Bin%\FBE\dbxfbe.dll
  DBXVendorLib=%T9Bin%\FBE\fbembed.dll
  AuthorizationMode=Server
  
  DatabaseMoveMethod=1

[Firebird_Embedded_Unicode]
  Inherited=Firebird_DBX_Unicode
  DriverName=%T9Bin%\FBE\dbxfbe.dll
  DBXVendorLib=%T9Bin%\FBE\fbembed.dll
  AuthorizationMode=Server
  
  DatabaseMoveMethod=1

;;---------------------------------- Firebird_ADO ---------------------------------
;
;[Firebird_ADO]
;  Inherited=Firebird_General
;  AccessType=FirebirdADO
;
;[Firebird_DBX.DataTypes]
;  String=String,VARCHAR(%0:d) CHARACTER SET WIN1251 DEFAULT %1:s NOT NULL COLLATE PXW_CYRL
;
;[Firebird_DBX.Params]
;;  Provider=MSDASQL.1;

;----------------------------- SQLite_DBX ---------------------------------

[SQLite_DBX]
;  VersionStr=Oracle Database
  AccessType=SQLiteDBX
  DBXVersion=3

  DriverName=DBXSQLiteDrv.dll
  DBXFuncName=getSQLiteDriver
    
  MaxTableNameLength=30
  MaxIndexNameLength=30
  MaxFieldNameLength=30
  MaxStringFieldSize=4000
  MaxNStringFieldSize=2000

  TableNameMask=%s

  NewFieldNameMask=%s
  CreateFieldNameMask=""%1:s""
  SelectFieldNameMask=""%0:s"."%1:s""
  SelectFieldAliasMask=""%0:s"."%1:s" "%2:s""
  NewTableNameMask=%s
  CreateTableNameMask=""%s""
  SelectTableNameMask=""%0:s" %1:s"
  SelectFullTableNameMask=""%0:s"."%1:s" %2:s"
  CreateIndexNameMask=""%s""
  SelectTableNameIndexMask=""%0:s" %1:s"
  SelectFullTableNameIndexMask=""%0:s"."%1:s" %2:s"

  CreatePrimaryKeyMask=PRIMARY KEY(%1:s)
  DateTimeFormat=yyyy-mm-dd hh:nn:ss
  CharSetLevel=Database
  DatabaseCharset=2

  DoubleSymbol='
  NullSortRule=0
;  Ansi92NullNoSupportedValueTypes=String

  ReadWriteConnection=1
  MultiWriteAllowed=0

  MemoUnicodeIsUTF16=0

  InstanceDivider=\
  LikeMaskedChars=_%
  UniqueErrorMessage=UNIQUE constraint 
  
  ObjNamesTranslate=0
  SetByValueTypes=Integer, Boolean, Int64, String
  SetByValueTypesInsert=
  
  SQLWhereCaseSensitive=1
  SQLOrderCaseSensitive=0
  SQLIndexCaseSensitive=0  

; Нет серверных курсоров 
  DiffConnectionForSrvCursor=0
  SubTableLoadOptim=1
  
  DisconnectSuspectConnection=0
;  sctTestConnection=SELECT name FROM sqlite_master WHERE type='table' or type='view' order by name

  CanAlterTable=1
  CanAlterColumn=0
  CanOptimResize=0
  
  DatabaseMoveMethod=1

  RebuildIndexesAfterInsert=1

[SQLite_DBX:Linux]
  DriverName=libDBXSQLiteDrv.so  

[SQLite_DBX.DataTypes]
  Real=Real,Real DEFAULT %1:s NOT NULL
  Integer=Integer,INTEGER DEFAULT %1:s NOT NULL
  Boolean=Integer,INTEGER DEFAULT %1:s NOT NULL
  String=String,TEXT DEFAULT %1:s NOT NULL COLLATE NOCASEUNICODE
  String_Unicode=String,TEXT DEFAULT %1:s NOT NULL COLLATE NOCASEUNICODE
;  String=String,TEXT DEFAULT %1:s NOT NULL
;  String_Unicode=String,TEXT DEFAULT %1:s NOT NULL
;  Date=String,TEXT DEFAULT '1899-12-30 00:00:00' NOT NULL
  Date=Real,Real DEFAULT 0 NOT NULL
  Memo=Memo,BLOB
  Memo_Unicode=Memo,BLOB
  Image=Image,BLOB
  Binary=Binary,BLOB
  OleDocument=OleDocument,BLOB
  Int64=Int64,INTEGER DEFAULT %1:s NOT NULL

[SQLite_DBX.Functions]
  SubStr=SUBSTR(%0:s,%1:s,%2:s)
  Year=Year(%0:s)
  Mon=Month(%0:s)
  Day=Day(%0:s)
  Hour=Hour(%0:s)
  Minute=Minute(%0:s)
  Second=Second(%0:s)
  Up=UPPER(%0:s)
  Lo=LOWER(%0:s)
  Int=CAST(%0:s AS INTEGER)
  Num=CAST(%0:s AS REAL)
  Length=LENGTH(%0:s)
  Pos=INSTR(%1:s,%0:s)
  aggrCount=COUNT(%0:s)
  aggrMin=MIN(%0:s)
  aggrMax=MAX(%0:s)
  aggrSum=Sum(%0:s)
  aggrGroupBy=%0:s
  IS=(%0:s LIKE '%1:s%2:s.%%') OR (%3:s=%2:s)
  Count=COUNT(%0:s)
  Exists=EXISTS(%0:s)
  match=(%0:s LIKE %1:s)
  match_esc=(%0:s LIKE %1:s ESCAPE '%2:s')
  PeriodSec=CAST((%0:s - %1:s)*86400 AS INTEGER)

;  Repstr=RPAD(%0:s, %1:s * LENGTH(%0:s), %0:s)
;  Mod=MOD(%0:s,%1:s)
;  Log=LN(%0:s)
;  Exp=EXP(%0:s)
;  Sqrt=SQRT(%0:s)
;  contains=CONTAINS(%0:s, %1:s)

;  'ClassType'
;.

[SQLite_DBX.SQLStrings]

;  sctAutoexecCommands=PRAGMA synchronous=Normal \r PRAGMA journal_mode=DELETE \r PRAGMA cache_size=10000 \r PRAGMA locking_mode=Normal\r PRAGMA busy_timeout=30000
  sctAutoexecCommands=PRAGMA synchronous=Normal\r PRAGMA journal_mode=WAL\r PRAGMA locking_mode=Normal\r PRAGMA busy_timeout=30000\r PRAGMA cache_size=10000

; ==================== Информация ===================
;  sctDetectVersion=SELECT * FROM (SELECT SUBSTR(BANNER, 1, 15) FROM V$VERSION) WHERE RowNum = 1
  sctCharSetDetectSQL=PRAGMA encoding
;  sctDetectDuplicates=SELECT %0:s FROM %1:s WHERE DELETED = 0 GROUP BY %0:s HAVING COUNT(*) > 1
;  sctTestConnection=SELECT 'Test connection...' FROM Dual

; ================ Администрирование ================

  sctNativeBackup=-
  sctNativeCompressBackup=-
  sctNativeRestore=-

; ===================== Таблицы =====================
  sctGetTableNamesSQL=SELECT name FROM sqlite_master WHERE type='table' or type='view' order by name
  sctGetFieldNamesSQL=pragma table_info('%0:s')
  sctGetKeyFieldNamesSQL=SELECT CC.Column_Name FROM User_Cons_Columns CC, User_Constraints C WHERE(C.Table_Name = '%0:s')AND(CC.Constraint_Name = C.Constraint_Name)AND(C.Constraint_Type = 'P')
  sctGetFieldConstraintNamesSQL=SELECT CC.Constraint_Name FROM User_Cons_Columns CC, User_Constraints C WHERE(C.Table_Name = '%0:s')AND(CC.Constraint_Name = C.Constraint_Name)AND(CC.Column_Name = '%1:s')

  sctCreateTable=CREATE TABLE %0:s (%1:s, %2:s) WITHOUT ROWID
  sctAddField=ALTER TABLE %0:s ADD %1:s
  sctAddFields=
  sctRenameTable=ALTER TABLE %1:s RENAME TO %0:s
  sctDropConstraint=
  sctDropField=ALTER TABLE %0:s DROP COLUMN %1:s
  sctDropTable=DROP TABLE %0:s

; ===================== Индексы =====================
  sctGetIndexNamesSQL=SELECT name FROM sqlite_master WHERE type = 'index'
;  sctDetectKeyIndexName=SELECT Index_Name FROM User_Constraints WHERE (Table_Name = '%0:s') AND (Constraint_Type = 'P')
;  sctGetTableIndexNamesSQL=SELECT * FROM User_Indexes WHERE (Table_Name = '%0:s')
;  sctGetIndexesNameByFieldNames=SELECT a.index_name, a.column_name, b.column_expression FROM user_ind_columns a LEFT JOIN user_ind_expressions b on a.index_name = b.index_name WHERE (a.table_name = '%0:s')

  sctDropIndex=DROP INDEX %1:s

; ======================= VIEW ======================
  sctCreateView=CREATE VIEW %0:s AS SELECT * FROM %1:s 
  sctDropView=DROP VIEW IF EXISTS %0:s

; ======================= DML =======================
  sctInsert=INSERT INTO %0:s (%1:s) VALUES (%2:s)
  sctInsertSelect=INSERT INTO %0:s (%1:s) SELECT %2:s %3:s FROM %4:s
  sctUpdateWhere=UPDATE %0:s SET %1:s WHERE %2:s
  sctDeleteWhere=DELETE FROM %0:s WHERE %1:s

; ===================== SELECT ======================
  sctSelectSimple=SELECT %0:s %1:s FROM %2:s
  sctSelectOrderBy=SELECT %0:s %1:s FROM %2:s ORDER BY %4:s
  sctSelectWhere=SELECT %0:s %1:s FROM %2:s WHERE %3:s
  sctSelectWhereOrderBy=SELECT %0:s %1:s FROM %2:s WHERE %3:s ORDER BY %4:s

  sctSelectWhereOrderByPacketing=SELECT %1:s FROM %2:s WHERE %3:s ORDER BY %4:s LIMIT %5:d
  sctSelectOrderByPacketing=SELECT %1:s FROM %2:s ORDER BY %4:s LIMIT %5:d
  sctSelectWhereByPacketing=SELECT %1:s FROM %2:s WHERE %3:s LIMIT %5:d
  sctSelectSimpleByPacketing=SELECT %1:s FROM %2:s LIMIT %5:d

[SQLite_DBX.Params]

  Database=%Path%%Database%