TOP をテンプレートにして作成
ホーム
バックアップ
一覧
検索
最終更新
ヘルプ
ログイン
開始行
Command-line Utilities
Table of Contents
Backup Tools
ISQL Query Utility
gsec Authentication Manager
gfix Server Utility
Backup Tools
Backup Tools
New On-line Incremental Backup
gbak Backup/Porting/Restore Utility
Firebird 2 brings plenty of enhancements to backing up da...
New On-line Incremental Backup
N. Samofatov
Fast, on-line, page-level incremental backup facilities h...
The backup engine comprises two parts:
NBak, the engine support module
NBackup, the tool that does the actual backups
Nbak
The functional responsibilities of NBAK are:
to redirect writes to difference files when asked (ALTER ...
to produce a GUID for the database snapshot and write it ...
to merge differences into the database when asked (ALTER ...
to mark pages written by the engine with the current SCN ...
to increment SCN on each change of backup state
The backup state cycle is:
nbak_state_normal -> nbak_state_stalled -> nbak_state_mer...
In normal state writes go directly to the main database f...
In stalled state writes go to the difference file only an...
In merge state new pages are not allocated from differenc...
Note
This merge state logic has one quirky part. Both Microsof...
This is why we don't read mapped pages beyond the origina...
NBackup
The functional responsibilities of NBackup are
to provide a convenient way to issue ALTER DATABASE BEGIN...
to fix up the database after filesystem copy (physically ...
to create and restore incremental backups.
Incremental backups are multi-level. That means if you do...
Backing Up
Creating incremental backups has the following algorithm:
Issue ALTER DATABASE BEGIN BACKUP to redirect writes to t...
Look up the SCN and GUID of the most recent backup at the...
Stream database pages having SCN larger than was found at...
Write the GUID of the previous-level backup to the header...
Issue ALTER DATABASE END BACKUP
Add a record of this backup operation to RDB$BACKUP_HISTO...
Restoring
Restore is simple: we reconstruct the physical database i...
Usage
nbackup <options>
Valid Options
-L <database> Lock database for filesystem copy
-N <database> Unlock previously locked database
-F <database> Fixup database after filesy...
-B <level> <database> [<filename>] Create incremental...
-R <database> [<file0> [<file1>...]] Restore increme...
-U <user> User name
-P <password> Password
Note
<database> may specify a database alias
incremental backups of multi-file databases are not suppo...
"stdout" may be used as a value of <filename> for the -B ...
Improvements
(V.2.0.6) An improvement has been done for POSIX versions...
Note
The “cost” may be a 10 to 15 percent increase in the time...
Tracker reference CORE-2316.
User Manual
P. Vinkenoog
A user manual for NBak/NBackup has been prepared. It can ...
gbak Backup/Porting/Restore Utility
Content
Changed Behaviours, New Switches
V. Horsun
The new gbak switch
-RECREATE_DATABASE [OVERWRITE]
is a separate switch designed to make harder for the unsu...
-R[EPLACE_DATABASE]
In summary:
gbak -R (or gbak -r) now applies to the new -R[ECREATE_DA...
The short form of the old gbak -R[EPLACE_DATABASE] is now...
The -REP[LACE_DATABASE] switch should be considered as de...
This change means that, if you have any legacy batch or c...
If you want to retain the ability of your script to overw...
gbak -V and the “Counter” Parameter
During Firebird 1 development, an optional numeric <count...
ISQL Query Utility
New Switches
New Commands
ISQL Bugs Fixed
Work on ISQL has involved a lot of bug-fixing and the int...
One trick to note is that CHAR and VARCHAR types defined ...
New Switches
The following command-line switches were added:
-b[ail] "Bail out"
D. Ivanov, C. Valderrama
Command line switch -b to instruct isql to bail out on er...
When using scripts as input in the command line, it may b...
Most cases have been covered, but if you find some error ...
Currently there is no differentiation by error code---any...
Some Features
Even if isql is executing nested scripts, it will cease a...
DML errors will be caught when being prepared or executed...
In many cases, isql will return the line number of a DML ...
DDL errors will be caught when being prepared or executed...
The feature can be enabled/disabled interactively or from...
SET BAIL [ON | OFF]
As is the case with other SET commands, simply using SET ...
Even if BAIL is activated, it doesn't mean it will change...
Example
isql -b -i my_fb.sql -o results.log -m -m2
Tip
However, if the user loads isql interactively and later e...
Example
isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> set bail;
SQL> input my_fb.sql;
SQL> ^Z
Whatever contents the script has, it will be executed com...
-m2 to Output Stats and Plans
C. Valderrama
This is a command-line option -M2 to send the statistics ...
When the user specifies that the output should be sent to...
at the command line, the switch -o followed by a file nam...
the command OUTput followed by a file name is used, eithe...
The -m command line switch was added, to meld (mix) the e...
This left still another case: statistics about operations...
What the -m2 command line switch does is to ensure that s...
Note
Neither -m nor -m2 has an interactive counterpart through...
-r2 to Pass a Case-Sensitive Role Name
C. Valderrama
The sole objective of this parameter is to specify a case...
The default switch for this parameter is -r. Roles provid...
With -r2, the role is passed to the engine exactly as typ...
New Commands
The following commands have been added or enhanced.
SET HEAD[ing] toggle
C. Valderrama
Some people consider it useful to be able to do a SELECT ...
Therefore, printing the column headers -- previously a fi...
SET HEADing [ON | OFF]
command in the isql shell. As is the case with other SET ...
Note
There is no command line option to toggle headings off.
Using SET will display the state of SET HEAD, along with ...
SHOW SYSTEM now shows predefined UDFs
The SHOW <object_type> command is meant to show user obje...
It may be enhanced to list system views if we create some...
SET SQLDA_DISPLAY ON/OFF
A. dos Santos Fernandes
This SQLDA_DISPLAY command shows the input SQLDA paramete...
Note
The state of this option is not included in the output wh...
SET TRANSACTION Enhanced
C. Valderrama
The SET TRANSACTION statement has been enhanced so that, ...
NO AUTO UNDO
IGNORE LIMBO
LOCK TIMEOUT <number>
Example
SET TRANSACTION WAIT SNAPSHOT NO AUTO UNDO LOCK TIMEOUT 10
See also the document doc/sql.extensions/README.set_trans...
SHOW DATABASE now Returns ODS Version Number
C. Valderrama
ODS (On-Disk Structure) version is now returned in the SH...
Ability to show the line number where an error happened i...
C. Valderrama
In previous versions, the only reasonable way to know whe...
With the addition of -b for bail as described in (1), the...
Now, the ability to signal the script-related line number...
This feature works even if there are nested scripts, name...
Lines are counted according to what the underlying IO lay...
Enhanced Command-line Help
M. Kubecek
When unknown parameters are used, isql now shows all of t...
opt/firebird/bin] isql -?
Unknown switch: ?
usage: isql [options] [<database>]
-a(all) extract metadata incl. le...
-b(ail) bail on errors (set bail on)
-c(ache) <num> number of cache buffers
-ch(arset) <charset> connection charset (set n...
-d(atabase) <database> database name to put in s...
-e(cho) echo commands (set echo on)
-ex(tract) extract metadata
-i(nput) <file> input file (set input)
-m(erge) merge standard error
-m2 merge diagnostic
-n(oautocommit) no autocommit DDL (set au...
-now(arnings) do not show warnings
-o(utput) <file> output file (set output)
-pag(elength) <size> page length
-p(assword) <password> connection password
-q(uiet) do not show the message "...
-r(ole) <role> role name
-r2 <role> role (uses quoted identif...
-sqldialect <dialect> SQL dialect (set sql dial...
-t(erminator) <term> command terminator (set t...
-u(ser) <user> user name
-x extract metadata
-z show program and server v...
ISQL Bugs Fixed
SF #910430 ISQL and database dialect
fixed by C. Valderrama, B. Rodriguez Somoza
What was fixed When ISQL disconnected from a database,...
~ ~ ~
SF #223126 Misplaced collation when extracting metada...
fixed by B. Rodriguez Somoza
~ ~ ~
SF #223513 Ambiguity between tables and views
fixed by B. Rodriguez Somoza
~ ~ ~
SF #518349 ISQL SHOW mangles relationship
fixed by B. Rodriguez Somoza
~ ~ ~
Unregistered bug Possible crashes with long terminators
fixed by C. Valderrama
~ ~ ~
Unregistered bug Avoided several SQL> prompts when us...
implemented by C. Valderrama
~ ~ ~
Unregistered bugs Some memory leaks
fixed by C. Valderrama
~ ~ ~
gsec Authentication Manager
gsec return code
Changes to the gsec utility include:
gsec return code
C. Valderrama
gsec now returns an error code when used as a non-interac...
gfix Server Utility
New Shutdown States (Modes)
Changes to the gfix utility include:
New Shutdown States (Modes)
N. Samofatov, D. Yemanov
The options for gfix -shut[down] have been extended to in...
New Syntax Pattern
gfix <command> [<state>] [<options>]
<command> ::= {-shut | -online}
<state> ::= {normal | multi | single | full}
<options> ::= {[-force | -tran | -attach] <timeout>}
- “normal” state = online database
- “multi” state = multi-user shutdown mode (the legacy on...
- “single” state = single-user shutdown (only one attachm...
- “full” state = full/exclusive shutdown (no attachments ...
Note
“Multi” is the default state for -shut, “normal” is the d...
The modes can be switched sequentially:
normal <-> multi <-> single <-> full
Examples
gfix -shut single -force 0
gfix -shut full -force 0
gfix -online single
gfix -online
You cannot use -shut to bring a database one level “more ...
For example, these sequence-pairs are prohibited:
gfix -shut single -force 0
gfix -shut multi -force 0
::
gfix -online
gfix -online full
::
gfix -shut -force 0
gfix -online single
Timeout
As before, the timeout is in seconds. In the case of the ...
However, there is a known issue with the implementation o...
最終行:
Command-line Utilities
Table of Contents
Backup Tools
ISQL Query Utility
gsec Authentication Manager
gfix Server Utility
Backup Tools
Backup Tools
New On-line Incremental Backup
gbak Backup/Porting/Restore Utility
Firebird 2 brings plenty of enhancements to backing up da...
New On-line Incremental Backup
N. Samofatov
Fast, on-line, page-level incremental backup facilities h...
The backup engine comprises two parts:
NBak, the engine support module
NBackup, the tool that does the actual backups
Nbak
The functional responsibilities of NBAK are:
to redirect writes to difference files when asked (ALTER ...
to produce a GUID for the database snapshot and write it ...
to merge differences into the database when asked (ALTER ...
to mark pages written by the engine with the current SCN ...
to increment SCN on each change of backup state
The backup state cycle is:
nbak_state_normal -> nbak_state_stalled -> nbak_state_mer...
In normal state writes go directly to the main database f...
In stalled state writes go to the difference file only an...
In merge state new pages are not allocated from differenc...
Note
This merge state logic has one quirky part. Both Microsof...
This is why we don't read mapped pages beyond the origina...
NBackup
The functional responsibilities of NBackup are
to provide a convenient way to issue ALTER DATABASE BEGIN...
to fix up the database after filesystem copy (physically ...
to create and restore incremental backups.
Incremental backups are multi-level. That means if you do...
Backing Up
Creating incremental backups has the following algorithm:
Issue ALTER DATABASE BEGIN BACKUP to redirect writes to t...
Look up the SCN and GUID of the most recent backup at the...
Stream database pages having SCN larger than was found at...
Write the GUID of the previous-level backup to the header...
Issue ALTER DATABASE END BACKUP
Add a record of this backup operation to RDB$BACKUP_HISTO...
Restoring
Restore is simple: we reconstruct the physical database i...
Usage
nbackup <options>
Valid Options
-L <database> Lock database for filesystem copy
-N <database> Unlock previously locked database
-F <database> Fixup database after filesy...
-B <level> <database> [<filename>] Create incremental...
-R <database> [<file0> [<file1>...]] Restore increme...
-U <user> User name
-P <password> Password
Note
<database> may specify a database alias
incremental backups of multi-file databases are not suppo...
"stdout" may be used as a value of <filename> for the -B ...
Improvements
(V.2.0.6) An improvement has been done for POSIX versions...
Note
The “cost” may be a 10 to 15 percent increase in the time...
Tracker reference CORE-2316.
User Manual
P. Vinkenoog
A user manual for NBak/NBackup has been prepared. It can ...
gbak Backup/Porting/Restore Utility
Content
Changed Behaviours, New Switches
V. Horsun
The new gbak switch
-RECREATE_DATABASE [OVERWRITE]
is a separate switch designed to make harder for the unsu...
-R[EPLACE_DATABASE]
In summary:
gbak -R (or gbak -r) now applies to the new -R[ECREATE_DA...
The short form of the old gbak -R[EPLACE_DATABASE] is now...
The -REP[LACE_DATABASE] switch should be considered as de...
This change means that, if you have any legacy batch or c...
If you want to retain the ability of your script to overw...
gbak -V and the “Counter” Parameter
During Firebird 1 development, an optional numeric <count...
ISQL Query Utility
New Switches
New Commands
ISQL Bugs Fixed
Work on ISQL has involved a lot of bug-fixing and the int...
One trick to note is that CHAR and VARCHAR types defined ...
New Switches
The following command-line switches were added:
-b[ail] "Bail out"
D. Ivanov, C. Valderrama
Command line switch -b to instruct isql to bail out on er...
When using scripts as input in the command line, it may b...
Most cases have been covered, but if you find some error ...
Currently there is no differentiation by error code---any...
Some Features
Even if isql is executing nested scripts, it will cease a...
DML errors will be caught when being prepared or executed...
In many cases, isql will return the line number of a DML ...
DDL errors will be caught when being prepared or executed...
The feature can be enabled/disabled interactively or from...
SET BAIL [ON | OFF]
As is the case with other SET commands, simply using SET ...
Even if BAIL is activated, it doesn't mean it will change...
Example
isql -b -i my_fb.sql -o results.log -m -m2
Tip
However, if the user loads isql interactively and later e...
Example
isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> set bail;
SQL> input my_fb.sql;
SQL> ^Z
Whatever contents the script has, it will be executed com...
-m2 to Output Stats and Plans
C. Valderrama
This is a command-line option -M2 to send the statistics ...
When the user specifies that the output should be sent to...
at the command line, the switch -o followed by a file nam...
the command OUTput followed by a file name is used, eithe...
The -m command line switch was added, to meld (mix) the e...
This left still another case: statistics about operations...
What the -m2 command line switch does is to ensure that s...
Note
Neither -m nor -m2 has an interactive counterpart through...
-r2 to Pass a Case-Sensitive Role Name
C. Valderrama
The sole objective of this parameter is to specify a case...
The default switch for this parameter is -r. Roles provid...
With -r2, the role is passed to the engine exactly as typ...
New Commands
The following commands have been added or enhanced.
SET HEAD[ing] toggle
C. Valderrama
Some people consider it useful to be able to do a SELECT ...
Therefore, printing the column headers -- previously a fi...
SET HEADing [ON | OFF]
command in the isql shell. As is the case with other SET ...
Note
There is no command line option to toggle headings off.
Using SET will display the state of SET HEAD, along with ...
SHOW SYSTEM now shows predefined UDFs
The SHOW <object_type> command is meant to show user obje...
It may be enhanced to list system views if we create some...
SET SQLDA_DISPLAY ON/OFF
A. dos Santos Fernandes
This SQLDA_DISPLAY command shows the input SQLDA paramete...
Note
The state of this option is not included in the output wh...
SET TRANSACTION Enhanced
C. Valderrama
The SET TRANSACTION statement has been enhanced so that, ...
NO AUTO UNDO
IGNORE LIMBO
LOCK TIMEOUT <number>
Example
SET TRANSACTION WAIT SNAPSHOT NO AUTO UNDO LOCK TIMEOUT 10
See also the document doc/sql.extensions/README.set_trans...
SHOW DATABASE now Returns ODS Version Number
C. Valderrama
ODS (On-Disk Structure) version is now returned in the SH...
Ability to show the line number where an error happened i...
C. Valderrama
In previous versions, the only reasonable way to know whe...
With the addition of -b for bail as described in (1), the...
Now, the ability to signal the script-related line number...
This feature works even if there are nested scripts, name...
Lines are counted according to what the underlying IO lay...
Enhanced Command-line Help
M. Kubecek
When unknown parameters are used, isql now shows all of t...
opt/firebird/bin] isql -?
Unknown switch: ?
usage: isql [options] [<database>]
-a(all) extract metadata incl. le...
-b(ail) bail on errors (set bail on)
-c(ache) <num> number of cache buffers
-ch(arset) <charset> connection charset (set n...
-d(atabase) <database> database name to put in s...
-e(cho) echo commands (set echo on)
-ex(tract) extract metadata
-i(nput) <file> input file (set input)
-m(erge) merge standard error
-m2 merge diagnostic
-n(oautocommit) no autocommit DDL (set au...
-now(arnings) do not show warnings
-o(utput) <file> output file (set output)
-pag(elength) <size> page length
-p(assword) <password> connection password
-q(uiet) do not show the message "...
-r(ole) <role> role name
-r2 <role> role (uses quoted identif...
-sqldialect <dialect> SQL dialect (set sql dial...
-t(erminator) <term> command terminator (set t...
-u(ser) <user> user name
-x extract metadata
-z show program and server v...
ISQL Bugs Fixed
SF #910430 ISQL and database dialect
fixed by C. Valderrama, B. Rodriguez Somoza
What was fixed When ISQL disconnected from a database,...
~ ~ ~
SF #223126 Misplaced collation when extracting metada...
fixed by B. Rodriguez Somoza
~ ~ ~
SF #223513 Ambiguity between tables and views
fixed by B. Rodriguez Somoza
~ ~ ~
SF #518349 ISQL SHOW mangles relationship
fixed by B. Rodriguez Somoza
~ ~ ~
Unregistered bug Possible crashes with long terminators
fixed by C. Valderrama
~ ~ ~
Unregistered bug Avoided several SQL> prompts when us...
implemented by C. Valderrama
~ ~ ~
Unregistered bugs Some memory leaks
fixed by C. Valderrama
~ ~ ~
gsec Authentication Manager
gsec return code
Changes to the gsec utility include:
gsec return code
C. Valderrama
gsec now returns an error code when used as a non-interac...
gfix Server Utility
New Shutdown States (Modes)
Changes to the gfix utility include:
New Shutdown States (Modes)
N. Samofatov, D. Yemanov
The options for gfix -shut[down] have been extended to in...
New Syntax Pattern
gfix <command> [<state>] [<options>]
<command> ::= {-shut | -online}
<state> ::= {normal | multi | single | full}
<options> ::= {[-force | -tran | -attach] <timeout>}
- “normal” state = online database
- “multi” state = multi-user shutdown mode (the legacy on...
- “single” state = single-user shutdown (only one attachm...
- “full” state = full/exclusive shutdown (no attachments ...
Note
“Multi” is the default state for -shut, “normal” is the d...
The modes can be switched sequentially:
normal <-> multi <-> single <-> full
Examples
gfix -shut single -force 0
gfix -shut full -force 0
gfix -online single
gfix -online
You cannot use -shut to bring a database one level “more ...
For example, these sequence-pairs are prohibited:
gfix -shut single -force 0
gfix -shut multi -force 0
::
gfix -online
gfix -online full
::
gfix -shut -force 0
gfix -online single
Timeout
As before, the timeout is in seconds. In the case of the ...
However, there is a known issue with the implementation o...
ページ名:
新規
名前変更
ホーム
一覧
検索
最終更新
バックアップ
ヘルプ
最終更新のRSS