Template:SQWareProduction sqwsyb LoadDatabase.ksh example

From Wiki_dbSQWare
Revision as of 16:10, 7 April 2024 by BatchUser (talk | contribs) (Updated by BatchUser)
Jump to: navigation, search
Sourcing sqwsyb_Global.lib v2024.02 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 <chemin> -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
#Precise la date du dump a charger(par defaut, le plus ancien), puis execute un script apres le chargement
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's file whose name finish 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 generated commands and change dmp type (full,inc,stb,fstb)

$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 -AddMail 'mymail1@mydomaine.com,mymail2@mydomaine.com'
#Add the mail list to the default address managed by the variable gvsqw_GlobalMail

$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -SendReport
#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
#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