Template:SQWareProduction sqwsyb LoadDatabase.ksh example: Difference between revisions

From Wiki_dbSQWare
Jump to navigation Jump to search
m Updated by BatchUser
No edit summary
 
(60 intermediate revisions by the same user not shown)
Line 1: Line 1:
<pre>
<pre>
Sourcing sqwsyb_Global.lib v3.1.01 SQWareProduction for Sybase (dbSQWare GPL v3) ...  
Sourcing sqwsyb_Global.lib v2025.06 SQWareProduction for Sybase (dbSQWare) ...  


#Standard help for script sqwsyb_LoadDatabase.ksh:
#Standard help for script sqwsyb_LoadDatabase.ksh:
Line 8: Line 8:
#Display online help for this script
#Display online help for this script


$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -S $DSQUERY -DT <DbName> -NoMail
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -Locale en -h
#Desactivate sendmail on error to $gvsqw_GlobalMail (by default, send on error)
#Display online help for this script with forcing of the 'en' locale (by default locale managed by $gvsqw_Locale)


$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -S $DSQUERY -DT <DbName> -Exec
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -s
#Execute generated commands
#Display usage examples for this script


$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -S $DSQUERY -DT <DbName> -Kill -Rsync -Exec
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName>
#Generate commands but don't execute them !
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Exec
#Load the dump for only one database
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -RD <DirName> -O <Type> -Exec
#Specifies the dump path, and the type of target database (on/off/ostb. By default, on)
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -DS <DataserverSource> -Exec
#Spedifies dataserver source of dump
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -DD <Date> -After <script> -Exec
Specifies the date of the dump to be loaded (by default, the lastest), then executes a script after loading.
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Chk -Before <script> -Exec
#Check the database size, and executes a script before loading the dump
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Lock -Exec
#Lock all logins during dump's loading
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Shut -Exec
#Execute \"dbcc dbreboot('shutdown_load',dbname)\" before loading
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -CrossPlatform -Exec
#Execute sp_post_xpload after loading
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -AddFlagName -Exec
#Load dump file whose name end by '.mflag'
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Upgrade -Exec
Execute sp_checkreswords,sp_checksource,dbcc upgrade_object after loading
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Type <TypedeDump> -F <File> -Exec
#Execute a load database of type <TypedeDump> of the target database with the specified file <File>.
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Kill -Rsync -Exec
#Kill users connection before Load and made synchronisation of syslogins/sysusers
#Kill users connection before Load and made synchronisation of syslogins/sysusers


$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -S $DSQUERY -DT <DbName>
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -AddMail 'mymail1@mydomaine.com,mymail2@mydomaine.com' -Exec
#Generate commands but don't execute them !
#Add the mail list to the default address managed by the variable gvsqw_GlobalMail
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -SendReport -Exec
#Send the log by email at the end of the treatment even if there is no error
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -NoMail -Exec
#Disables sending an email on error to $gvsqw_GlobalMail (by default, send on error)


$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -S $DSQUERY -DT <DbName> -FRT <NumericValue> -Exec
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -FRT <NumericValue> -Exec
#Force return code to '<NumericValue>' on error (if no error, exit 0!)
#Force return code to '<NumericValue>' on error (if no error, "exit 0!")
#You can also force return code of this script on all your
#You can also force return code of this script on all your
#environnement if you set the variable: $gvsqw_ForcedReturnCodeScript_sqwsyb_LoadDatabase=<NumericValue>
#environnement if you set the variable: $gvsqw_ForcedReturnCodeScript_sqwsyb_LoadDatabase=<NumericValue>

Latest revision as of 18:52, 1 July 2025

Sourcing sqwsyb_Global.lib v2025.06 SQWareProduction for Sybase (dbSQWare) ... 

#Standard help for script sqwsyb_LoadDatabase.ksh:


$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -h
#Display online help for this script

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -Locale en -h
#Display online help for this script with forcing of the 'en' locale (by default locale managed by $gvsqw_Locale)

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -s
#Display usage examples for this script

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName>
#Generate commands but don't execute them !

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Exec
#Load the dump for only one database

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -RD <DirName> -O <Type> -Exec
#Specifies the dump path, and the type of target database (on/off/ostb. By default, on)

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -DS <DataserverSource> -Exec
#Spedifies dataserver source of dump

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -DD <Date> -After <script> -Exec
Specifies the date of the dump to be loaded (by default, the lastest), then executes a script after loading. 

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Chk -Before <script> -Exec
#Check the database size, and executes a script before loading the dump

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Lock -Exec
#Lock all logins during dump's loading

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Shut -Exec
#Execute \"dbcc dbreboot('shutdown_load',dbname)\" before loading

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -CrossPlatform -Exec
#Execute sp_post_xpload after loading

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -AddFlagName -Exec
#Load dump file whose name end by '.mflag'

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Upgrade -Exec
Execute sp_checkreswords,sp_checksource,dbcc upgrade_object after loading

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Type <TypedeDump> -F <File> -Exec
#Execute a load database of type <TypedeDump> of the target database with the specified file <File>.

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Kill -Rsync -Exec
#Kill users connection before Load and made synchronisation of syslogins/sysusers

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -AddMail 'mymail1@mydomaine.com,mymail2@mydomaine.com' -Exec
#Add the mail list to the default address managed by the variable gvsqw_GlobalMail

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -SendReport -Exec
#Send the log by email at the end of the treatment even if there is no error

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -NoMail -Exec
#Disables sending an email on error to $gvsqw_GlobalMail (by default, send on error)

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -FRT <NumericValue> -Exec
#Force return code to '<NumericValue>' on error (if no error, "exit 0!")
#You can also force return code of this script on all your
#environnement if you set the variable: $gvsqw_ForcedReturnCodeScript_sqwsyb_LoadDatabase=<NumericValue>
#in configuration file $gvsqw_SybBin/../etc_cust/sqwsyb_GlobalVar.cfg