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

From Wiki_dbSQWare
Jump to: navigation, search
m (Updated by BatchUser)
m (Updated by BatchUser)
 
Line 1: Line 1:
 
<pre>
 
<pre>
Sourcing sqwsyb_Global.lib v2024.02 SQWareProduction for Sybase (dbSQWare) ...  
+
Sourcing sqwsyb_Global.lib v2024.03 SQWareProduction for Sybase (dbSQWare) ...  
  
 
#Standard help for script sqwsyb_LoadDatabase.ksh:
 
#Standard help for script sqwsyb_LoadDatabase.ksh:
Line 20: Line 20:
 
#Load the dump for only one database
 
#Load the dump for only one database
  
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -RD <chemin> -O <Type> -Exec
+
$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)
 
#Specifies the dump path, and the type of target database (on/off/ostb. By default, on)
  
Line 27: Line 27:
  
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -DD <Date> -After <script> -Exec
 
$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.  
 
Specifies the date of the dump to be loaded (by default, the lastest), then executes a script after loading.  
  
Line 36: Line 35:
 
#Lock all logins during dump's loading
 
#Lock all logins during dump's loading
  
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh --I $DSQUERY -DT <DbName> -Shut -Exec
+
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Shut -Exec
 
#Execute \"dbcc dbreboot('shutdown_load',dbname)\" before loading
 
#Execute \"dbcc dbreboot('shutdown_load',dbname)\" before loading
  
Line 43: Line 42:
  
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -AddFlagName -Exec
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -AddFlagName -Exec
#Load dump's file whose name finish by '.mflag'
+
#Load dump file whose name end by '.mflag'
  
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Upgrade -Exec
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Upgrade -Exec
Line 49: Line 48:
  
 
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -I $DSQUERY -DT <DbName> -Type <TypedeDump> -F <File> -Exec
 
$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)
+
#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
 
$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 -AddMail 'mymail1@mydomaine.com,mymail2@mydomaine.com'
+
$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
 
#Add the mail list to the default address managed by the variable gvsqw_GlobalMail
  
$gvsqw_SybBin/sqwsyb_LoadDatabase.ksh -SendReport
+
$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
 
#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
+
$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)
 
#Disables sending an email on error to $gvsqw_GlobalMail (by default, send on error)
  

Latest revision as of 16:14, 26 April 2024

Sourcing sqwsyb_Global.lib v2024.03 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