TOP をテンプレートにして作成
ホーム
バックアップ
一覧
検索
最終更新
ヘルプ
ログイン
開始行
cf) [[Firebird 2.5 Release Notes:http://www.firebirdsql.o...
(目次つける・・・)
* Data Definition Language (DDL) [#ydf93c47]
** Visibility of Procedure Definition Changes on Classic ...
One such change addressed the problem of the visibility o...
Classic サーバーにおいて、ほかの接続でstored procedureを...
Now, such changes are made visible to the entire server a...
修正しているトランザクションがコミットを完了させるとすぐ...
** CREATE/ALTER/DROP USER [#w97b76bc]
In v.2.5, Firebird finally has syntax to enable user acco...
Firebird 2.5で、正規のデータベースにログインしたとき、提...
The CREATE USER and CREATE USER statements also include t...
CREATE USER、CREATE USERは、通常のユーザーにセキュリティ...
For the usage description and a full overview of the RDB$...
RDB$ADMINの概要や使用例については、 [[Administrative Feat...
Syntax Patterns
The SYSDBA, or a user with SYSDBA privileges in both the ...
SYSDBAまたはSYSDBA権限を持つユーザーは、データベース(セ...
CREATE USER <username> {PASSWORD 'password'}
[FIRSTNAME 'firstname']
[MIDDLENAME 'middlename']
[LASTNAME 'lastname']
[GRANT ADMIN ROLE];
Note
The PASSWORD clause is required when creating a new user.
PASSWORD句は必須項目。
It should be the initial password for that new user. The ...
その新規ユーザーのパスワードの初期値となる。ユーザーは後...
The SYSDBA, or a user with SYSDBA privileges in both the ...
SYSDBAまたはSYSDBA権限を持つユーザーは、データベース(セ...
Non-privileged users can use this statement to alter only...
SYSDBA権限を持たないユーザーは、自身の属性のみを変更する...
ALTER USER <username>
[PASSWORD 'password']
[FIRSTNAME 'firstname']
[MIDDLENAME 'middlename']
[LASTNAME 'lastname']
[{GRANT | REVOKE} ADMIN ROLE];
Note
At least one of the optional parameters must be present.
いずれか一つのパラメータを指定しなければならない。
ALTER USER does not allow the <username> to be changed.
ALTER USERはユーザー名を変更する事が出来ない。
If a different <username> is required, the old one should...
ユーザー名を変更したい場合は、一度そのユーザーを削除し、...
The SYSDBA, or a user with SYSDBA privileges in both the ...
SYSDBAまたはSYSDBA権限を持つユーザーは、データベース(セ...
DROP USER <username>;
Restrictions
CREATE USER and DROP USER statements and GRANT | REVOKE A...
CREATE USER、DROP USER、GRANT / REVOKE ADMIN ROLEはSYSDBA...
An ordinary user can ALTER his own password and elements ...
通常のユーザーは自身の属性を変更する事が出来る
An attempt to modify another user will fail.
ほかのユーザーの属性の変更は失敗する。
Examples
SYSDBA or a user with equivalent privileges in both the c...
CREATE USER alex PASSWORD 'test';
ALTER USER alex FIRSTNAME 'Alex' LASTNAME 'Peshkov';
ALTER USER alex PASSWORD 'IdQfA';
** Syntaxes for Altering Views [#f1c9314a]
Previously, in order to alter a view definition, it was n...
過去のバージョンでは、View定義を変更するために、一度削除...
This made things very cumbersome, especially if there wer...
依存性を持つ場合、この操作は重荷となっていた。
V.2.5 introduces syntaxes for ALTER VIEW and CREATE OR AL...
Firebird 2.5では、ALTER VIEW、CREATE OR ALTER VIEWが追加...
*** ALTER VIEW [#m06755c0]
ALTER VIEW enables a view definition to be altered withou...
ALTER VIEWは変更前のVIEWの再生成(DROP、CREATE)なしに変更...
*** CREATE OR ALTER VIEW [#vd93570b]
With CREATE OR ALTER VIEW, the view definition will be al...
CREATE OR ALTER VIEWは、まだ未作成であれば新規にVIEWを作...
Syntax Pattern
{create [ or alter ] | alter } view <view_name>
[ ( <field list> ) ]
as <select statement>
Example
create table users (
id integer,
name varchar(20),
passwd varchar(20)
);
create view v_users as
select name from users;
alter view v_users (id, name) as
select id, name from users;
*** Extensions for CREATE VIEW [#wce2302e]
The following extensions have been added for CREATE VIEW.
CREATE VIEWに以下の拡張が加えられた。
Specify Stored Procedure in FROM Clause
FROM句にStored Procedureを指定する事が出来る。
Adriano dos Santos Fernandes
Tracker reference CORE-886.
A selectable stored procedure can now be specified in the...
Example
create view a_view as
select * from a_procedure(current_date);
Create UNION View Without Column List
Dmitry Yemanov
Tracker reference CORE-1402.
The column list can now be omitted from CREATE VIEW when ...
結果セットがUNION句を用いて定義されるとき、CREATE VIEWで...
Example
recreate view V1 as
select d.rdb$relation_id from rdb$database d
union all
select d.rdb$relation_id from rdb$database d
recreate view V2 as
select d.rdb$relation_id as q from rdb$database d
union all
select d.rdb$relation_id as w from rdb$database d
Inferred Column Names
Adriano dos Santos Fernandes
Tracker reference CORE-2424.
CREATE VIEW now has the capability to infer column names ...
CREATE VIEWはGROUP BY句やサブクエリから、列名を推論する事...
Example
create view V as
select d.rdb$relation_id from rdb$database d
group by d.rdb$relation_id
create view V as
select a from (select 1 a from rdb$database);
** ALTER Mechanism for Computed Columns [#t70293ed]
A column defined as COMPUTED BY <expression> can now be a...
COMPUTED BY <式>として定義された列は、ALTER TABLE...ALTER...
This feature can be used only to change the <expression> ...
この機能は列定義の式を変更する事のみ可能。
It cannot convert a computed column to non-computed or vi...
この構文は、計算列を通常の列定義に変更、またはその逆を行...
Syntax Pattern
alter table <table-name>
alter <computed-column-name>
[type <data-type>]
COMPUTED BY (<expression>);
Examples
create table test (
n integer,
dn computed by (n * 2)
);
commit;
alter table test
alter dn computed by (n + n);
** Extensions for SQL Permissions [#o294b9d8]
Alex Peshkov
The following extensions have been implemented in the are...
*** GRANTED BY Clause [#ca1466df]
A GRANTED BY (or its alternative, AS) clause can now be o...
GRANT / REVOKEにGRANTED BY句が追加された。これはほかのユ...
Syntax Pattern
grant <right> to <object>
[ { granted by | as } [ user ] <username> ]
--
revoke <right> from <object>
[ { granted by | as } [ user ] <username> ]
Tip
{ granted by | as }
GRANTED BY and AS are equivalent.
GRANTED BYとGRANTED ASは等価。
GRANTED BY is the form recommended by the SQL standard.
GRANTED BYはSQL標準化されている。
We support AS for compatibility with some other servers (...
ほかのDBサーバー(Infomix)で用いられるGRANTED ASもサポート...
Example
Logged in as SYSDBA:
SYSDBAでログインして、
create role r1; -- SYSDBA owns the role
/* next, SYSDBA grants the role to user1
with the power to grant it to others */
grant r1 to user1 with admin option;
/* SYSDBA uses GRANTED BY to exercise
user1's ADMIN OPTION */
grant r1 to public granted by user1;
In isql, we look at the effects:
isqlの場合:
SQL>show grant;
/* Grant permissions for this database */
GRANT R1 TO PUBLIC GRANTED BY USER1
GRANT R1 TO USER1 WITH ADMIN OPTION
SQL>
*** ALTER ROLE [#u47e4fad]
Tracker reference CORE-1660.
The new ALTER ROLE statement has a specialised function t...
追加されたALTER ROLEは信頼された認証の間Windowsの管理者に...
It has no other purpose currently.
現在、ほかの機能はない。
Note
For the usage description of ALTER ROLE and a full overvi...
ALTER ROLEの使用例やRDB$ADMINの概要は [[Administrative Fe...
*** REVOKE ALL [#l6d518ab]
Tracker reference CORE-2113.
When a user is removed from the security database or anot...
ユーザーがセキュリティデータベースやほかの認証ソース(OS...
This extension adds the capability to revoke all privileg...
この機能を使う事で、特定のユーザーやロールからワンステッ...
Syntax Pattern
REVOKE ALL ON ALL FROM { <user list> | <role list> }
Example
Logged in as SYSDBA:
# gsec -del guest
# isql employee
fbs bin # ./isql employee
Database: employee
SQL> REVOKE ALL ON ALL FROM USER guest;
SQL>
*** Default COLLATION Attribute for a Database [#r9c61e9f]
Adriano dos Santos Fernandes
Tracker references CORE-1737 and CORE-1803.
An ODS 11.2 or higher database can now have a default COL...
ODS 11,2以降のバージョンは、規定のキャラクタセットに関連...
enabling all text column, domain and variable definitions...
これは、すべてのテキスト形式の列、ドメイン、変数宣言が同...
The COLLATION clause is optional. If it is omitted, the d...
COLLATION句はオプション。COLLATIONが指定されない場合、キ...
Tip
Note also that the default collation order for a characte...
データベースに使用されるキャラクタセットについての規定の...
Syntax Pattern
create database <file name>
[ page_size <page size> ]
[ length = <length> ]
[ user <user name> ]
[ password <user password> ]
[ set names <charset name> ]
[ default character set <charset name>
[ [ collation <collation name> ] ]
[ difference file <file name> ]
Note
The parameter DIFFERENCE FILE is not a new one for CREATE...
CREATE DATABASEのパラメータ:DIFFERENCE FILEは、別段新し...
It was quietly introduced in association with the nBacku...
nBackup 2.0の導入の際に追加されている。
For more information, see Evolution of CREATE DATABASE at...
詳細は、この章の最後のEvolution of CREATE DATABASE参照
Example
create database 'test.fdb'
default character set win1252
collation win_ptbr;
*** ALTER CHARACTER SET Command [#db89c5df]
New syntax introduced in this version, enabling the defau...
このバージョンから、データベース内のキャラクタセットの規...
The default collation is used when table columns are crea...
テーブルの各列にキャラクタセットが与えられて作られるとき...
Note
String constants also use the default collation of the co...
文字列定数もまた、接続時に指定されるキャラクタセットの規...
The character set and collation of existing columns are n...
既に作成済みのテーブル列に指定されたキャラクタセットやCOL...
Syntax Pattern
ALTER CHARACTER SET <charset_name>
SET DEFAULT COLLATION <collation_name>
Example
create database 'people.fdb'
default character set win1252;
alter character set win1252
set default collation win_ptbr;
create table person (
id integer,
name varchar(50) /* will use the database default
character set and the win1252
default collation */
);
insert into person
values (1, 'adriano');
insert into person
values (2, 'ADRIANO');
/* will retrieve both records
because win_ptbr is case insensitive */
select * from person where name like 'A%';
Tip
Another improvement allows the current value of RDB$DEFAU...
backup/restoreの際、システムテーブル:RDB$CHARACTER_SETS...
** Evolution of CREATE DATABASE [#meae0d3a]
DDL support for the database header attributes introduced...
nBackupの状態を登録したり変更するために導入されたデータベ...
Users of nBackup will be familiar with the ALTER DATABASE...
nBackupのユーザーは、nBackupによるフルバックアップの間、...
(訳注:イミフ)
*** Naming the Delta File for nBackup [#udc17591]
ALTER DATABASE also has another argument that allows you ...
ALTER DATABASEはまた、差分データを保存するファイル名を指...
To quote from Paul Vinkenoog's excellent manual for nBackup:
Paul VinkenoogのnBackupのマニュアルより引用。
By default, the delta file lives in the same directory as...
デフォルトで、差分ファイルはデータベースと同じディレクト...
It also has the same name as the database file, but with ...
差分ファイルのファイル名はデータベースファイル名 + .delta。
There is usually no reason to change this, but it can be ...
nbackupを使わないのであれば、差分ファイルのファイル名を変...
Make a connection to the database with any client that al...
すべてのクライアントでデータベースへの接続して、以下の文...
alter database
add difference file 'path-and-filename'
The custom delta file specification is persistent in the ...
カスタムの差分ファイルの仕様は、システムテーブル:RDB$FIL...
To revert to the default behaviour, issue the following s...
規定の挙動に復帰したい場合、以下の文を実行する。
alter database
drop difference file
Those who are still curious may study the details in the ...
詳細について知りたい人は、nBackup 2.0のマニュアルのリリー...
*** The DIFFERENCE FILE Argument for CREATE DATABASE [#q2...
C. Valderrama
In Firebird 2.0, syntax for prescribing a custom name for...
Firebird 2.0において、CREATE DATABASEのパラメータに、割り...
You can observe its placement in the syntax pattern given...
「Default COLLATION Attribute for a Database」の章に示し...
As with ALTER DATABASE, the keyword for the argument is D...
ALTER DATABASEと同様に、パラメータ名はDIFFERENCE FILE、値...
It allows you to specify a custom name for the delta file...
ALTER DATABASE BEGIN BACKUPが実行された際に、または同等の...
Examples of Usage
]..\bin> isql -user sysdba -pass masterke
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'ticks' difference file 'jaguar';
SQL> shell dir jaguar;
Volume in drive F is Firebird
Volume Serial Number is BCD9-4211
Directory of ..\bin
File Not Found
This is correct, we only defined the file name.
これはファイル名を定義しただけである。
Now it will be used:
使用する際は、
SQL> alter database begin backup;
SQL> shell dir jaguar;
Volume in drive F is Firebird
Volume Serial Number is BCD9-4211
Directory of ..\bin
10-11-2009 00:59 8.192 jaguar
1 File(s) 8.192 bytes
0 Dir(s) 16.617.979.904 bytes free
SQL> alter database end backup;
SQL> shell dir jaguar;
Volume in drive F is Firebird
Volume Serial Number is BCD9-4211
Directory of ..\bin
SQL> drop database;
SQL> ˆZ
Since the argument is a file name, it goes inside single ...
パラメータはファイル名なので、シングルクォーテーションで...
Double-quotes are not valid:
the statement will fail and return a confusing error mess...
ダブルクォーテーションでくくったときは、エラーメッセージ...
]..\bin> isql -user sysdba -pass master key
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'ticks' DIFFERENCE FILE 'jaguar';
SQL> alter database add difference file 'leopard';
Statement failed, SQLCODE = -607
unsuccessful metadata update
-Difference file is already defined
The message is correct. Even though the delta was deleted...
ALTER DATABASE END BACKUPを実行すると、差分ファイルは削除...
SQL> alter database drop difference file;
SQL> alter database begin backup;
This does not break anything, because the engine will res...
データベースエンジンが規定の処理を行って差分ファイルを再...
SQL> alter database add difference file 'leopard';
SQL> alter database begin backup;
SQL> alter database drop difference file;
Statement failed, SQLCODE = -607
unsuccessful metadata update
-Cannot change difference file name while database is in...
This is correct validation.
SQL> alter database end backup;
SQL> drop database;
SQL> ˆZ
最終行:
cf) [[Firebird 2.5 Release Notes:http://www.firebirdsql.o...
(目次つける・・・)
* Data Definition Language (DDL) [#ydf93c47]
** Visibility of Procedure Definition Changes on Classic ...
One such change addressed the problem of the visibility o...
Classic サーバーにおいて、ほかの接続でstored procedureを...
Now, such changes are made visible to the entire server a...
修正しているトランザクションがコミットを完了させるとすぐ...
** CREATE/ALTER/DROP USER [#w97b76bc]
In v.2.5, Firebird finally has syntax to enable user acco...
Firebird 2.5で、正規のデータベースにログインしたとき、提...
The CREATE USER and CREATE USER statements also include t...
CREATE USER、CREATE USERは、通常のユーザーにセキュリティ...
For the usage description and a full overview of the RDB$...
RDB$ADMINの概要や使用例については、 [[Administrative Feat...
Syntax Patterns
The SYSDBA, or a user with SYSDBA privileges in both the ...
SYSDBAまたはSYSDBA権限を持つユーザーは、データベース(セ...
CREATE USER <username> {PASSWORD 'password'}
[FIRSTNAME 'firstname']
[MIDDLENAME 'middlename']
[LASTNAME 'lastname']
[GRANT ADMIN ROLE];
Note
The PASSWORD clause is required when creating a new user.
PASSWORD句は必須項目。
It should be the initial password for that new user. The ...
その新規ユーザーのパスワードの初期値となる。ユーザーは後...
The SYSDBA, or a user with SYSDBA privileges in both the ...
SYSDBAまたはSYSDBA権限を持つユーザーは、データベース(セ...
Non-privileged users can use this statement to alter only...
SYSDBA権限を持たないユーザーは、自身の属性のみを変更する...
ALTER USER <username>
[PASSWORD 'password']
[FIRSTNAME 'firstname']
[MIDDLENAME 'middlename']
[LASTNAME 'lastname']
[{GRANT | REVOKE} ADMIN ROLE];
Note
At least one of the optional parameters must be present.
いずれか一つのパラメータを指定しなければならない。
ALTER USER does not allow the <username> to be changed.
ALTER USERはユーザー名を変更する事が出来ない。
If a different <username> is required, the old one should...
ユーザー名を変更したい場合は、一度そのユーザーを削除し、...
The SYSDBA, or a user with SYSDBA privileges in both the ...
SYSDBAまたはSYSDBA権限を持つユーザーは、データベース(セ...
DROP USER <username>;
Restrictions
CREATE USER and DROP USER statements and GRANT | REVOKE A...
CREATE USER、DROP USER、GRANT / REVOKE ADMIN ROLEはSYSDBA...
An ordinary user can ALTER his own password and elements ...
通常のユーザーは自身の属性を変更する事が出来る
An attempt to modify another user will fail.
ほかのユーザーの属性の変更は失敗する。
Examples
SYSDBA or a user with equivalent privileges in both the c...
CREATE USER alex PASSWORD 'test';
ALTER USER alex FIRSTNAME 'Alex' LASTNAME 'Peshkov';
ALTER USER alex PASSWORD 'IdQfA';
** Syntaxes for Altering Views [#f1c9314a]
Previously, in order to alter a view definition, it was n...
過去のバージョンでは、View定義を変更するために、一度削除...
This made things very cumbersome, especially if there wer...
依存性を持つ場合、この操作は重荷となっていた。
V.2.5 introduces syntaxes for ALTER VIEW and CREATE OR AL...
Firebird 2.5では、ALTER VIEW、CREATE OR ALTER VIEWが追加...
*** ALTER VIEW [#m06755c0]
ALTER VIEW enables a view definition to be altered withou...
ALTER VIEWは変更前のVIEWの再生成(DROP、CREATE)なしに変更...
*** CREATE OR ALTER VIEW [#vd93570b]
With CREATE OR ALTER VIEW, the view definition will be al...
CREATE OR ALTER VIEWは、まだ未作成であれば新規にVIEWを作...
Syntax Pattern
{create [ or alter ] | alter } view <view_name>
[ ( <field list> ) ]
as <select statement>
Example
create table users (
id integer,
name varchar(20),
passwd varchar(20)
);
create view v_users as
select name from users;
alter view v_users (id, name) as
select id, name from users;
*** Extensions for CREATE VIEW [#wce2302e]
The following extensions have been added for CREATE VIEW.
CREATE VIEWに以下の拡張が加えられた。
Specify Stored Procedure in FROM Clause
FROM句にStored Procedureを指定する事が出来る。
Adriano dos Santos Fernandes
Tracker reference CORE-886.
A selectable stored procedure can now be specified in the...
Example
create view a_view as
select * from a_procedure(current_date);
Create UNION View Without Column List
Dmitry Yemanov
Tracker reference CORE-1402.
The column list can now be omitted from CREATE VIEW when ...
結果セットがUNION句を用いて定義されるとき、CREATE VIEWで...
Example
recreate view V1 as
select d.rdb$relation_id from rdb$database d
union all
select d.rdb$relation_id from rdb$database d
recreate view V2 as
select d.rdb$relation_id as q from rdb$database d
union all
select d.rdb$relation_id as w from rdb$database d
Inferred Column Names
Adriano dos Santos Fernandes
Tracker reference CORE-2424.
CREATE VIEW now has the capability to infer column names ...
CREATE VIEWはGROUP BY句やサブクエリから、列名を推論する事...
Example
create view V as
select d.rdb$relation_id from rdb$database d
group by d.rdb$relation_id
create view V as
select a from (select 1 a from rdb$database);
** ALTER Mechanism for Computed Columns [#t70293ed]
A column defined as COMPUTED BY <expression> can now be a...
COMPUTED BY <式>として定義された列は、ALTER TABLE...ALTER...
This feature can be used only to change the <expression> ...
この機能は列定義の式を変更する事のみ可能。
It cannot convert a computed column to non-computed or vi...
この構文は、計算列を通常の列定義に変更、またはその逆を行...
Syntax Pattern
alter table <table-name>
alter <computed-column-name>
[type <data-type>]
COMPUTED BY (<expression>);
Examples
create table test (
n integer,
dn computed by (n * 2)
);
commit;
alter table test
alter dn computed by (n + n);
** Extensions for SQL Permissions [#o294b9d8]
Alex Peshkov
The following extensions have been implemented in the are...
*** GRANTED BY Clause [#ca1466df]
A GRANTED BY (or its alternative, AS) clause can now be o...
GRANT / REVOKEにGRANTED BY句が追加された。これはほかのユ...
Syntax Pattern
grant <right> to <object>
[ { granted by | as } [ user ] <username> ]
--
revoke <right> from <object>
[ { granted by | as } [ user ] <username> ]
Tip
{ granted by | as }
GRANTED BY and AS are equivalent.
GRANTED BYとGRANTED ASは等価。
GRANTED BY is the form recommended by the SQL standard.
GRANTED BYはSQL標準化されている。
We support AS for compatibility with some other servers (...
ほかのDBサーバー(Infomix)で用いられるGRANTED ASもサポート...
Example
Logged in as SYSDBA:
SYSDBAでログインして、
create role r1; -- SYSDBA owns the role
/* next, SYSDBA grants the role to user1
with the power to grant it to others */
grant r1 to user1 with admin option;
/* SYSDBA uses GRANTED BY to exercise
user1's ADMIN OPTION */
grant r1 to public granted by user1;
In isql, we look at the effects:
isqlの場合:
SQL>show grant;
/* Grant permissions for this database */
GRANT R1 TO PUBLIC GRANTED BY USER1
GRANT R1 TO USER1 WITH ADMIN OPTION
SQL>
*** ALTER ROLE [#u47e4fad]
Tracker reference CORE-1660.
The new ALTER ROLE statement has a specialised function t...
追加されたALTER ROLEは信頼された認証の間Windowsの管理者に...
It has no other purpose currently.
現在、ほかの機能はない。
Note
For the usage description of ALTER ROLE and a full overvi...
ALTER ROLEの使用例やRDB$ADMINの概要は [[Administrative Fe...
*** REVOKE ALL [#l6d518ab]
Tracker reference CORE-2113.
When a user is removed from the security database or anot...
ユーザーがセキュリティデータベースやほかの認証ソース(OS...
This extension adds the capability to revoke all privileg...
この機能を使う事で、特定のユーザーやロールからワンステッ...
Syntax Pattern
REVOKE ALL ON ALL FROM { <user list> | <role list> }
Example
Logged in as SYSDBA:
# gsec -del guest
# isql employee
fbs bin # ./isql employee
Database: employee
SQL> REVOKE ALL ON ALL FROM USER guest;
SQL>
*** Default COLLATION Attribute for a Database [#r9c61e9f]
Adriano dos Santos Fernandes
Tracker references CORE-1737 and CORE-1803.
An ODS 11.2 or higher database can now have a default COL...
ODS 11,2以降のバージョンは、規定のキャラクタセットに関連...
enabling all text column, domain and variable definitions...
これは、すべてのテキスト形式の列、ドメイン、変数宣言が同...
The COLLATION clause is optional. If it is omitted, the d...
COLLATION句はオプション。COLLATIONが指定されない場合、キ...
Tip
Note also that the default collation order for a characte...
データベースに使用されるキャラクタセットについての規定の...
Syntax Pattern
create database <file name>
[ page_size <page size> ]
[ length = <length> ]
[ user <user name> ]
[ password <user password> ]
[ set names <charset name> ]
[ default character set <charset name>
[ [ collation <collation name> ] ]
[ difference file <file name> ]
Note
The parameter DIFFERENCE FILE is not a new one for CREATE...
CREATE DATABASEのパラメータ:DIFFERENCE FILEは、別段新し...
It was quietly introduced in association with the nBacku...
nBackup 2.0の導入の際に追加されている。
For more information, see Evolution of CREATE DATABASE at...
詳細は、この章の最後のEvolution of CREATE DATABASE参照
Example
create database 'test.fdb'
default character set win1252
collation win_ptbr;
*** ALTER CHARACTER SET Command [#db89c5df]
New syntax introduced in this version, enabling the defau...
このバージョンから、データベース内のキャラクタセットの規...
The default collation is used when table columns are crea...
テーブルの各列にキャラクタセットが与えられて作られるとき...
Note
String constants also use the default collation of the co...
文字列定数もまた、接続時に指定されるキャラクタセットの規...
The character set and collation of existing columns are n...
既に作成済みのテーブル列に指定されたキャラクタセットやCOL...
Syntax Pattern
ALTER CHARACTER SET <charset_name>
SET DEFAULT COLLATION <collation_name>
Example
create database 'people.fdb'
default character set win1252;
alter character set win1252
set default collation win_ptbr;
create table person (
id integer,
name varchar(50) /* will use the database default
character set and the win1252
default collation */
);
insert into person
values (1, 'adriano');
insert into person
values (2, 'ADRIANO');
/* will retrieve both records
because win_ptbr is case insensitive */
select * from person where name like 'A%';
Tip
Another improvement allows the current value of RDB$DEFAU...
backup/restoreの際、システムテーブル:RDB$CHARACTER_SETS...
** Evolution of CREATE DATABASE [#meae0d3a]
DDL support for the database header attributes introduced...
nBackupの状態を登録したり変更するために導入されたデータベ...
Users of nBackup will be familiar with the ALTER DATABASE...
nBackupのユーザーは、nBackupによるフルバックアップの間、...
(訳注:イミフ)
*** Naming the Delta File for nBackup [#udc17591]
ALTER DATABASE also has another argument that allows you ...
ALTER DATABASEはまた、差分データを保存するファイル名を指...
To quote from Paul Vinkenoog's excellent manual for nBackup:
Paul VinkenoogのnBackupのマニュアルより引用。
By default, the delta file lives in the same directory as...
デフォルトで、差分ファイルはデータベースと同じディレクト...
It also has the same name as the database file, but with ...
差分ファイルのファイル名はデータベースファイル名 + .delta。
There is usually no reason to change this, but it can be ...
nbackupを使わないのであれば、差分ファイルのファイル名を変...
Make a connection to the database with any client that al...
すべてのクライアントでデータベースへの接続して、以下の文...
alter database
add difference file 'path-and-filename'
The custom delta file specification is persistent in the ...
カスタムの差分ファイルの仕様は、システムテーブル:RDB$FIL...
To revert to the default behaviour, issue the following s...
規定の挙動に復帰したい場合、以下の文を実行する。
alter database
drop difference file
Those who are still curious may study the details in the ...
詳細について知りたい人は、nBackup 2.0のマニュアルのリリー...
*** The DIFFERENCE FILE Argument for CREATE DATABASE [#q2...
C. Valderrama
In Firebird 2.0, syntax for prescribing a custom name for...
Firebird 2.0において、CREATE DATABASEのパラメータに、割り...
You can observe its placement in the syntax pattern given...
「Default COLLATION Attribute for a Database」の章に示し...
As with ALTER DATABASE, the keyword for the argument is D...
ALTER DATABASEと同様に、パラメータ名はDIFFERENCE FILE、値...
It allows you to specify a custom name for the delta file...
ALTER DATABASE BEGIN BACKUPが実行された際に、または同等の...
Examples of Usage
]..\bin> isql -user sysdba -pass masterke
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'ticks' difference file 'jaguar';
SQL> shell dir jaguar;
Volume in drive F is Firebird
Volume Serial Number is BCD9-4211
Directory of ..\bin
File Not Found
This is correct, we only defined the file name.
これはファイル名を定義しただけである。
Now it will be used:
使用する際は、
SQL> alter database begin backup;
SQL> shell dir jaguar;
Volume in drive F is Firebird
Volume Serial Number is BCD9-4211
Directory of ..\bin
10-11-2009 00:59 8.192 jaguar
1 File(s) 8.192 bytes
0 Dir(s) 16.617.979.904 bytes free
SQL> alter database end backup;
SQL> shell dir jaguar;
Volume in drive F is Firebird
Volume Serial Number is BCD9-4211
Directory of ..\bin
SQL> drop database;
SQL> ˆZ
Since the argument is a file name, it goes inside single ...
パラメータはファイル名なので、シングルクォーテーションで...
Double-quotes are not valid:
the statement will fail and return a confusing error mess...
ダブルクォーテーションでくくったときは、エラーメッセージ...
]..\bin> isql -user sysdba -pass master key
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'ticks' DIFFERENCE FILE 'jaguar';
SQL> alter database add difference file 'leopard';
Statement failed, SQLCODE = -607
unsuccessful metadata update
-Difference file is already defined
The message is correct. Even though the delta was deleted...
ALTER DATABASE END BACKUPを実行すると、差分ファイルは削除...
SQL> alter database drop difference file;
SQL> alter database begin backup;
This does not break anything, because the engine will res...
データベースエンジンが規定の処理を行って差分ファイルを再...
SQL> alter database add difference file 'leopard';
SQL> alter database begin backup;
SQL> alter database drop difference file;
Statement failed, SQLCODE = -607
unsuccessful metadata update
-Cannot change difference file name while database is in...
This is correct validation.
SQL> alter database end backup;
SQL> drop database;
SQL> ˆZ
ページ名:
新規
名前変更
ホーム
一覧
検索
最終更新
バックアップ
ヘルプ
最終更新のRSS