FAQ:NewInstanceMsSql Windows: Difference between revisions
| (15 intermediate revisions by the same user not shown) | |||
| Line 72: | Line 72: | ||
[[File:AjoutInstance.png||admin|Ajout d'une instance]] | [[File:AjoutInstance.png||admin|Ajout d'une instance]] | ||
[[File:DuplicateInstance.png||admin|Ajout par duplication d'une instance]]<br/> | [[File:DuplicateInstance.png||admin|Ajout par duplication d'une instance]]<br/> | ||
[[File: | [[File:DeclarationInstanceMsSql.png|admin|Add a new instance by duplicate an other one.]]<br/> | ||
Explanation of the fields :<br/> | Explanation of the fields :<br/> | ||
{| align="center" {{Prettytable}} | {| align="center" {{Prettytable}} | ||
| Line 156: | Line 156: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====Creating a connection with a specific dbSQWare service account==== | |||
Example of creation order : | Example of creation order : | ||
<syntaxhighlight lang="sql" line> | <syntaxhighlight lang="sql" line> | ||
| Line 168: | Line 168: | ||
<br/> | <br/> | ||
The 'sysadmin' account is mandatory, particularly due to the "DBCC" commands.<br/> | The 'sysadmin' account is mandatory, particularly due to the "DBCC" commands.<br/> | ||
This account must be registered under the Unix account mssql@sqwarebox... If a specific entry is found, it is used; otherwise, the "DEFAULT" entry is used | <br/> | ||
This account must be registered under the Unix account mssql@sqwarebox... <br/> | |||
If a specific entry is found, it is used; otherwise, the "DEFAULT" entry is used.<br/> | |||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
mssql@sqwarebox:/home/mssql (NoSID) $ cat .passwd_mssql | mssql@sqwarebox:/home/mssql (NoSID) $ cat .passwd_mssql | ||
DEFAULT; | DEFAULT;domain\svc-dbsqware;DoNotSetThisPassword! | ||
SPECIFIC_MSSQL;sa;sapass | SPECIFIC_MSSQL;sa;sapass | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== | ====Check the entry in freetds.conf==== | ||
We verify that the dbalias, host, and port information has been correctly entered in the file!<br/> | |||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
# | # with mssql@sqwarebox /applis/mssql/freetds/etc/freetds.conf | ||
# | #Example | ||
[WINMSQ_INST1] | [WINMSQ_INST1] | ||
host = WINMSQ | host = WINMSQ | ||
| Line 227: | Line 187: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====Test sendmail ( | ====Test sendmail (not mandatory)==== | ||
/!\ | /!\ Useful the first time, pointless afterwards because it's always the same machine ! | ||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
# From : dbsqware@sqwarebox | # From : dbsqware@sqwarebox | ||
| Line 234: | Line 194: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Tests | ===Manual Connection Tests to the SQL Server Instance=== | ||
The goal is to test the automatic connection to the SQL Server instance. | |||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
# From : dbsqware@sqwarebox | # From : dbsqware@sqwarebox | ||
| Line 241: | Line 201: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Verify that you are connected to the correct instance (FullName field).<br/> | |||
Example: | |||
############################################################################ | ############################################################################ | ||
TestType;InstanceParam;DbAlias;FullName;VersionMajInt;VersionPatch;ProductEdition;BackupPath | TestType;InstanceParam;DbAlias;FullName;VersionMajInt;VersionPatch;ProductEdition;BackupPath | ||
| Line 248: | Line 208: | ||
############################################################################ | ############################################################################ | ||
If your Windows Server version is Windows Server 2012 or earlier, you must add "tds version = 7.0" to the Custom 2 column of the repository. This forces the use of a FreeTDS version compatible with the server. | |||
== | ==Instance deployment== | ||
=== | ===Generating the default SQLwareProduction configuration=== | ||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
# From : dbsqware@sqwarebox | # From : dbsqware@sqwarebox | ||
| Line 257: | Line 217: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | ===Updating SQWareRepository=== | ||
In the dbSQWare repository via the administration console, update the status of the new SQL Server instance (currently NEW) to '''ON'''. | |||
=== | ===Testing the "recovery" of indicators=== | ||
At this point, you can test the recovery of missing indicators (generally, only the instances you just integrated!). | |||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
# From : dbsqware@sqwarebox | # From : dbsqware@sqwarebox | ||
| Line 268: | Line 228: | ||
===Exploitation (stats, backups, …)=== | ===Exploitation (stats, backups, …)=== | ||
==== | ====Generating SQLite Production Configurations==== | ||
If you followed the instance insertion procedure, this part is already done by the step "menu_msq GenDefConf_SQWareProduction GenLstInstanceNew".<br/> | |||
You can verify this in the following chapter.<br/> | |||
<br/> | <br/> Connect to the central point's Unix machine with the "mssql" account and type the following commands:<br/> | ||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
# From mssql@vmsqwarebox | # From mssql@vmsqwarebox | ||
# | #Enter the instance name | ||
too | too | ||
./sqwmsq_GenerateCreateInstance.ksh -I WINMSQ_INST1 | ./sqwmsq_GenerateCreateInstance.ksh -I WINMSQ_INST1 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Verify that the proposed option is correct and type "y" if it is.<br/> | |||
At this point, you have generated the default configuration files for SQWareProduction. | |||
==== | ====Explanations==== | ||
The previous steps created some default files. ($HOME/admin/WINMSQ_INST1/sqwConfig) | |||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
# | #Enter the instance name | ||
e WINMSQ_INST1 | e WINMSQ_INST1 | ||
cfg | cfg | ||
| Line 318: | Line 277: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
This is a configuration file used by the sqwmsq_RunJob.ksh script to execute actions.<br/> | |||
<br/> | <br/> | ||
File for a default cron job: $HOME/CrontabRef_WINMSQ_INST1 : | |||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
## mm(0-59) hh(0-23) dd(1-31) MM(0-12) DAY(0-sunday, 1-monday, ...) command | ## mm(0-59) hh(0-23) dd(1-31) MM(0-12) DAY(0-sunday, 1-monday, ...) command | ||
| Line 332: | Line 291: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== | ====Setting the backup path==== | ||
On the instance to be managed, see the backup path in the registry key : | |||
<syntaxhighlight lang="sql" line> | <syntaxhighlight lang="sql" line> | ||
DECLARE @v_regvalue varchar(256) | DECLARE @v_regvalue varchar(256) | ||
| Line 341: | Line 300: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
To modify the path, the scripts rely on the registry key : | |||
<syntaxhighlight lang="sql" line> | <syntaxhighlight lang="sql" line> | ||
EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'BackupDirectory', REG_SZ, N'E:\Backups_db' | EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'BackupDirectory', REG_SZ, N'E:\Backups_db' | ||
| Line 347: | Line 306: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Backup test with master : | |||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
#From mssql@vmsqwarebox | #From mssql@vmsqwarebox | ||
| Line 353: | Line 312: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
/!\ | /!\ Be careful with this part; if you're not sure, don't do anything : | ||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
#From mssql@vmsqwarebox pour passer toutes les databases en 'RECOVERY SIMPLE' | #From mssql@vmsqwarebox pour passer toutes les databases en 'RECOVERY SIMPLE' | ||
| Line 365: | Line 324: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== | ====Deployment==== | ||
Setting up the cron : | |||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
crontab -l > $HOME/CrontabRef | crontab -l > $HOME/CrontabRef | ||
| Line 376: | Line 335: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Updating the CrontabRef file : | |||
<syntaxhighlight lang="sh" line> | <syntaxhighlight lang="sh" line> | ||
crontab -l > $HOME/CrontabRef | crontab -l > $HOME/CrontabRef | ||
| Line 382: | Line 341: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== | ====Useful commands==== | ||
Interesting aliases : | |||
e DBALIAS => | e DBALIAS => Load the environment for the instance | ||
bin, etc, too ... => | bin, etc, too ... => To navigate to the standard SQWareProduction directory | ||
cbin, cetc, ctoo ... => | cbin, cetc, ctoo ... => To navigate to the custom SQWareProduction directory | ||
log => logs SQWareProduction | log => logs SQWareProduction | ||
Some script options : | |||
-h => aide en ligne | -h => aide en ligne | ||
-s => exemples en ligne | -s => exemples en ligne | ||
-Exec => lorsque elle est présente, si non settée ne sort que les commandes sans les exécuter | -Exec => lorsque elle est présente, si non settée ne sort que les commandes sans les exécuter | ||
Examples : | |||
mssql@HOSTCENTRAL:$HOME/admin/WINMSQ_INST1/logs/StatisticsDatabase (WINMSQ_INST1) $ bin | mssql@HOSTCENTRAL:$HOME/admin/WINMSQ_INST1/logs/StatisticsDatabase (WINMSQ_INST1) $ bin | ||
total 112 | total 112 | ||
Latest revision as of 16:23, 5 December 2025
Generalties
In this chapter, we will consider that SQWareCentral has been installed on dbsqware@sqwarebox.
Limits of this section
This chapter only deals with adding a new instance to a base that is already configured and functional.
Use the portions that apply to your environment, and choose either the automatic or manual method as desired
General operating procedure for integrating a new Sql-Server instance
There is only the case of remote connection to handle. We make an SQL connection from mssql@sqwarebox via FreeTds (OpenSource TDS connection client).
Classic steps:
- Setting up the environment
- Manual tests
- Deployment of the instance
You will see that these steps can be handled one by one or in batches!
Integration of an SQL-server instance
Setting up the environment
General
Explanation of "DbAlias" (the unique dbSQWare key)
The dbSQWare key must be unique and must match the entry configured in the freetds.conf file to connect to the instance.
Generally, when there is no named instance, we use the name of the Windows host that holds the instance. When there is a named instance, we concatenate the name of the Windows host and the instance name, separated by an underscore (do not use a backslash, we are on Linux!)."
Examples :
- WINMSQ => WINMSQ (status ON)
- WINMSQ\INST1 => WINMSQ_INST1 (status ON)
Explanation of statuses
Classically, for SQL Server, the status is 'ON'
The 'OFF' status makes the instance disappear from the web view.
The 'NEW' status is used as an intermediate status between the beginning and the end of setting up a new instance.
All other statuses allow the instance to be displayed in the repository (especially 'KEEP'), but they will not be taken into account by the automatic processes."
Resume of statuses :
| Status | Description |
| ON | locale under Unix (the most common) |
| KEEP | temporary status, during maintenance for example or before complete deletion |
| NEW | temporary status, during configuration |
| OFF | visual removal of the instance (without deleting its configuration) |
| XXX | not supported... |
Instance declaration in SQWareRepository with SQWareWeb
We will declare the new instance from the SQWareWeb administration interface.
Declare the new instance with the status "NEW" (Add or Duplicate).


Explanation of the fields :
| Fields | Description |
| Db Alias | Unique key that identifies the instance in dbSQWare (no value for MySQL/MariaDB). |
| Dbms Name | Type of SGBD |
| Virtual Host | Virtual Host (same as Host if not clustered)
. |
| Host Name | Hostname of the instance |
| User Name | User associated with the instance |
| Port | Listening port of the instance. |
| Comments | A brief description of what the instance hosts |
| Status | Instance status (see above for explanations). |
| Contact | A contact if needed |
| Environnement | Instance environment (PRD, PPR, REC, DEV, TST, ...) |
| Client | Used only for filtering (enter a client name and/or department and/or service...) |
| GlobalHost | Free field in which the hypervisor host is often entered, for example. |
| Custom1 | Free field 1 |
| Custom2 | Free field 2 |
Regenerate the reference files of SQWareCentral.
Type the following command which will generate the reference files:
# From : dbsqware@sqwarebox
gen_all
Creating the Connection to the SQL Instance
You have two options for connecting dbSQWare to your SQL Server instances:
- Creating an SQL account within the instance requires that mixed login be enabled.
- Using a service account (declared in Active Directory).
Creating a Specific dbSQWare SQL Server Account
/!\ SQL access must be authorized on the instances if it is not already enabled!
Example creation order :
USE [master]
GO
CREATE LOGIN [msq_dba] WITH PASSWORD=N'NePasMettreCePassword!', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
EXEC master..sp_addsrvrolemember @loginame = N'msq_dba', @rolename = N'sysadmin'
GO
'sysadmin' is mandatory, particularly because of the commands "DBCC".
You can use any username and password you like!
This account must be registered under the Unix account mssql@sqwarebox...
If a specific entry is found, it will be used; otherwise, the "DEFAULT" entry will be used.
mssql@sqwarebox:/home/mssql (NoSID) $ cat .passwd_mssql
DEFAULT;msq_dba;NePasMettreCePassword!
SPECIFIC_MSSQL;sa;sapass
Creating a connection with a specific dbSQWare service account
Example of creation order :
USE [master]
GO
CREATE LOGIN [domain\svc-dbsqware] FROM WINDOWS;
GO
EXEC master..sp_addsrvrolemember @loginame = N'domain\svc-dbsqware', @rolename = N'sysadmin'
GO
The 'sysadmin' account is mandatory, particularly due to the "DBCC" commands.
This account must be registered under the Unix account mssql@sqwarebox...
If a specific entry is found, it is used; otherwise, the "DEFAULT" entry is used.
mssql@sqwarebox:/home/mssql (NoSID) $ cat .passwd_mssql
DEFAULT;domain\svc-dbsqware;DoNotSetThisPassword!
SPECIFIC_MSSQL;sa;sapass
Check the entry in freetds.conf
We verify that the dbalias, host, and port information has been correctly entered in the file!
# with mssql@sqwarebox /applis/mssql/freetds/etc/freetds.conf
#Example
[WINMSQ_INST1]
host = WINMSQ
port = 1433
Test sendmail (not mandatory)
/!\ Useful the first time, pointless afterwards because it's always the same machine !
# From : dbsqware@sqwarebox
menu_msq TestSendmail GenLstInstanceNew
Manual Connection Tests to the SQL Server Instance
The goal is to test the automatic connection to the SQL Server instance.
# From : dbsqware@sqwarebox
menu_msq TestInstConnectionOnNoMail GenLstInstanceNew
Verify that you are connected to the correct instance (FullName field).
Example:
############################################################################ TestType;InstanceParam;DbAlias;FullName;VersionMajInt;VersionPatch;ProductEdition;BackupPath TestConnection;MSSQL_INST1;MSSQL_INST1;MSSQL\INST1;2008;10.50.1600.1;Developer;E:/BackupsMssql ############################################################################
If your Windows Server version is Windows Server 2012 or earlier, you must add "tds version = 7.0" to the Custom 2 column of the repository. This forces the use of a FreeTDS version compatible with the server.
Instance deployment
Generating the default SQLwareProduction configuration
# From : dbsqware@sqwarebox
menu_msq GenDefConf_SQWareProduction GenLstInstanceNew
Updating SQWareRepository
In the dbSQWare repository via the administration console, update the status of the new SQL Server instance (currently NEW) to ON.
Testing the "recovery" of indicators
At this point, you can test the recovery of missing indicators (generally, only the instances you just integrated!).
# From : dbsqware@sqwarebox
repind_msq
Exploitation (stats, backups, …)
Generating SQLite Production Configurations
If you followed the instance insertion procedure, this part is already done by the step "menu_msq GenDefConf_SQWareProduction GenLstInstanceNew".
You can verify this in the following chapter.
Connect to the central point's Unix machine with the "mssql" account and type the following commands:
# From mssql@vmsqwarebox
#Enter the instance name
too
./sqwmsq_GenerateCreateInstance.ksh -I WINMSQ_INST1
Verify that the proposed option is correct and type "y" if it is.
At this point, you have generated the default configuration files for SQWareProduction.
Explanations
The previous steps created some default files. ($HOME/admin/WINMSQ_INST1/sqwConfig)
#Enter the instance name
e WINMSQ_INST1
cfg
cat sqwmsq_Jobs.cfg
#############################################
#IndicDba: Gather DBAs indicators
IndicDba:$gvsqw_MsqBin/sqwmsq_GatherIndicators.ksh -I WINMSQ_INST1
#RotateErrorLog: Rotate error log
RotateErrorLog:$gvsqw_MsqBin/sqwmsq_RotateErrorLog.ksh -I WINMSQ_INST1 -Exec
#BackupAll: backup all databases
BackupAll:$gvsqw_MsqBin/sqwmsq_BackupAllDatabases.ksh -I WINMSQ_INST1 -Exec
#BackupAllRep: run failed backups from BackupAll
BackupAllRep:$gvsqw_MsqBin/sqwmsq_BackupAllDatabases.ksh -I WINMSQ_INST1 -REP -Exec
#StatisticsAll : update statistics tables for all databases
StatisticsAll:$gvsqw_MsqBin/sqwmsq_StatisticsAllDatabases.ksh -I WINMSQ_INST1 -Exec
#RebuildAll : Rebuild indexes tables for all databases
RebuildAll:$gvsqw_MsqBin/sqwmsq_RebuildIndexAllDatabases.ksh -I WINMSQ_INST1 -Exec
#RestoreParfile : restore list of databases content in parfile
RestoreParfile:$gvsqw_MsqBin/sqwmsq_RestoreAllDatabases.ksh -I WINMSQ_INST1 -PAR $Parfile -Exec
#CheckdbAll : DBCC CheckDB for all databases
CheckdbAll:$gvsqw_MsqBin/sqwmsq_CheckdbAllDatabases.ksh -I WINMSQ_INST1 -Exec
This is a configuration file used by the sqwmsq_RunJob.ksh script to execute actions.
File for a default cron job: $HOME/CrontabRef_WINMSQ_INST1 :
## mm(0-59) hh(0-23) dd(1-31) MM(0-12) DAY(0-sunday, 1-monday, ...) command
## WINMSQ_INST1
# Backup all databases
00 22 * * 1-6 bash -c '. $HOME/.profile ;$gvsqw_MsqBin/sqwmsq_RunJob.ksh -I WINMSQ_INST1 -A BackupAll > $HOME/tmp/BackupAll_WINMSQ_INST1.log 2>&1'
# Rebuild all databases
30 07 * * 6 bash -c '. $HOME/.profile ;$gvsqw_MsqBin/sqwmsq_RunJob.ksh -I WINMSQ_INST1 -A RebuildAll > $HOME/tmp/RebuildAll_WINMSQ_INST1.log 2>&1'
# Stats all databases
00 07 * * 0 bash -c '. $HOME/.profile ;$gvsqw_MsqBin/sqwmsq_RunJob.ksh -I WINMSQ_INST1 -A StatisticsAll > $HOME/tmp/StatisticsAll_WINMSQ_INST1.log 2>&1'
Setting the backup path
On the instance to be managed, see the backup path in the registry key :
DECLARE @v_regvalue varchar(256)
EXEC xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'BackupDirectory', @v_regvalue OUTPUT
select 'lvsqw_BackupPath='+rtrim(@v_regvalue)+'='
go
To modify the path, the scripts rely on the registry key :
EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'BackupDirectory', REG_SZ, N'E:\Backups_db'
go
Backup test with master :
#From mssql@vmsqwarebox
$gvsqw_MsqBin/sqwmsq_BackupDatabase.ksh -I WINMSQ_INST1 -D master -Type full -Exec
/!\ Be careful with this part; if you're not sure, don't do anything :
#From mssql@vmsqwarebox pour passer toutes les databases en 'RECOVERY SIMPLE'
$gvsqw_MsqBin/../tools/sqwmsq_AlterDatabaseRecoverySimple.ksh -I WINMSQ_INST1 -Exec
#From mssql@vmsqwarebox pour modifier l'autogrowth toutes les logs de % en Mo
$gvsqw_MsqBin/../tools/sqwmsq_AlterDatabaseModifyLogGrowth.ksh -I WINMSQ_INST1 -Exec
#From mssql@vmsqwarebox faire un SHRINK de toutes les logs
$gvsqw_MsqBin/../tools/sqwmsq_AlterDatabaseShrinkLogs.ksh -I WINMSQ_INST1 -Exec
Deployment
Setting up the cron :
crontab -l > $HOME/CrontabRef
vi $HOME/CrontabRef_WINMSQ_INST1
cat $HOME/CrontabRef_WINMSQ_INST1 >> $HOME/CrontabRef
vi $HOME/CrontabRef
crontab $HOME/CrontabRef
crontab -l
Updating the CrontabRef file :
crontab -l > $HOME/CrontabRef
cat $HOME/CrontabRef
Useful commands
Interesting aliases :
e DBALIAS => Load the environment for the instance bin, etc, too ... => To navigate to the standard SQWareProduction directory cbin, cetc, ctoo ... => To navigate to the custom SQWareProduction directory log => logs SQWareProduction
Some script options :
-h => aide en ligne -s => exemples en ligne -Exec => lorsque elle est présente, si non settée ne sort que les commandes sans les exécuter
Examples :
mssql@HOSTCENTRAL:$HOME/admin/WINMSQ_INST1/logs/StatisticsDatabase (WINMSQ_INST1) $ bin total 112 drwxr-x--- 2 dbsqware dba 4096 Sep 25 21:22 . drwxr-x--- 15 dbsqware dba 4096 Sep 25 21:22 .. -rwxr-x--- 1 dbsqware dba 10858 Sep 25 21:22 sqwmsq_BackupAllDatabases.ksh -rwxr-x--- 1 dbsqware dba 6013 Sep 25 21:22 sqwmsq_BackupDatabase.ksh -rwxr-x--- 1 dbsqware dba 7663 Sep 25 21:22 sqwmsq_CheckdbAllDatabases.ksh -rwxr-x--- 1 dbsqware dba 4809 Sep 25 21:22 sqwmsq_CheckdbDatabase.ksh ...
mssql@HOSTCENTRAL:$HOME/SQWareProduction/mssql/bin (WINMSQ_INST1) $
./sqwmsq_StatisticsAllDatabases.ksh -h
Sourcing sqwmsq_Global.lib v2021.02 SQWareProduction for MsSql ...
Usage: sqwmsq_StatisticsAllDatabases.ksh [-h] -S|-I <FreeTdsAlias> [+ options]
DESCRIPTION
sqwmsq_StatisticsAllDatabases.ksh update Statistics databases in //
SUPPORT
MsSql supported versions: 2000 <= v <= 2019
PARAMETERS
-S|-I Instance : Target instance (freeTds alias).
OPTIONS
-h help : Display the full usage.
-s : Display samples of usage.
-P Nb_threads : Number of threads in parallel (by default 4).
-ID listdb : Databases list to include.
-ED listdb : Databases list to exclude.
-IL likeclause : Like clause to generate databases list (example: 'db%').
-EL likeclause : Like clause to exclude databases (example: 'nodb%').
-WCD whereclause : Where clause to generate databases list.
-FRT return_code : Force return code value on error.
-AddMail email : Email Address to add at 'xxx'.
-SendReport : Send execution log report.
-PAR parfile : Parfile file for databases list.
-AGR Nb_sec : Nb of seconds between two run (by default 5s).
-AGE Nb_sec : Nb of seconds between two check of end (by default 5s).
-NoMail : Desactivate sendmail on error xxx (by default, send on error).
-Exec : Execute commands (default, display generated commands)
Enjoy !
