Archives

You are currently viewing archive for August 2008
Category: Oracle
Posted by: hajime osako
OTN Japan - はじめてのOracle9iデータベース:バックアップ・リカバリを体験しよう

Backup
バックアップの対象となるデータファイル・制御ファイルを把握します。また、ローカル管理の一時表領域に関しては、別に確認します。

sqlplus “/as sysdba”
SQL# select name from v$datafile;
SQL# select name from v$controlfile;
SQL# select bytes, name from v$tempfile;

SQL# shutdown immediate;

ファイルをコピーします。

% mkdir /home1/ora920/app/oracle/backup
% cd /home1/ora920/app/oracle/oradata/ora920/
% cp system01.dbf /home1/ora920/app/oracle/backup
(以下同様に繰り返し)


Restore
SQL# shutdown
SQL# exit
% cp /backup/* /home1/ora920/app/oracle/oradata/ora920/

% sqlplus “/as sysdba”
SQL# startup mount
SQL# recover database until cancel;
メディア・リカバリが完了しました。
SQL# alter database open resetlogs;
(REDOログのサイズによっては起動するまでに少し時間がかかります。)

SQL# alter database tempfile
‘/home1/ora920/app/oracle/oradata/ora920/temp01.dbf’ drop;
SQL# alter tablespace temp add tempfile
'/home1/ora920/app/oracle/oradata/ora920/temp01.dbf' reuse;
もしくはファイルが存在しない場合は、
SQL# alter tablespace temp add tempfile
'/home1/ora920/app/oracle/oradata/ora920/temp01.dbf' <ファイルサイズ>;
Category: Linux tips
Posted by: hajime osako
snoopの取り方|痺れる。。。

snoop -o [出力先] [クライアントIP] [サーバIP] port [サーバポート]

08/22: Linix > TFTP

Category: Linux tips
Posted by: hajime osako
Category: MS tips
Posted by: hajime osako
Category: Linux tips
Posted by: hajime osako
Category: Oracle
Posted by: hajime osako
教えて! Watch キャラクタ・セットの確認方法
NLS 関連初期化パラメータ(NLS 環境変数)

select * from nls_database_parameters
where parameter ='NLS_CHARACTERSET';
select * from v$nls_parameters;


Character Set Migration

ALTER DATABASE CHARACTER SET AL32UTF8;

Category: Oracle
Posted by: hajime osako
CREATE STATISTICS [name] ON [table name(column name] WITH SAMPLE 50 PERSENT

ALTER DATABASE [database name] SET AUTO_CREATE_STATISTICS ON

dbcc show_statistics (table_name, stat_name)
Category: Oracle
Posted by: hajime osako
Oracle

SYS owns the data dictionary
SYS has the SYSDBA privilege which SYSTEM doesn't

Note, SYSDBA is not a role, it is a privilege. You'll find it in system_privilege_map, not in dba_roles.
Category: Oracle
Posted by: hajime osako
Installing Oracle 9i on Windows 2000

Pretty straight forward.

Note the last one OracleServerORCL is the actual database process itself. OracleOraHome90TNSListener is the listener process for remote connections to the database. OracleOraHome90Agent is the Oracle Agent used to communicate with management services. Finally, the OracleOraHome90HTTPServer is the Oracle/Apache web server.

Category: Z. links
Posted by: hajime osako
Category: Linux tips
Posted by: hajime osako
Linux File Structure

bin - commands needed during bootup
sbin - like bin but commands are not intended for normal users
proc - a virtual file system
usr/local - the place for locally installed software and other files
lib/modules - loadable kernel modules


Linux Configuration Files
/etc/exports - the file describing exported file systems for NFS
/etc/mtab - a list of currently mounted file systems
/proc/loadavg
/proc/meminfo
/var/log/messages
/var/log/secure


Linux File System Management

badblocks - used to search ad disk or partition for badblocks
cfdisk - similar to fdisk but better interface