pb17: oracle$ sudo gcc_select 3.3 Password: Default compiler has been set to: gcc version 3.3 20030304 (Apple Computer, Inc. build 1809) pb17: oracle$ gcc -v Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs Thread model: posix gcc version 3.3 20030304 (Apple Computer, Inc. build 1809) pb17: oracle$
cd $ORACLE_HOME/lib mv libnnz10.dylib libnnz10.dylib.ori relink all mv libnnz10.dylib.ori libnnz10.dylib
4)あとは、DBCAでデータベースを作成するだけである。
(ちなみに、私のPowerBookでは、カスタムデータベースの作成は失敗するが、シードデータベースからの作成だと成功する。また、DBCAの画面が0%のまま更新されない状態のままなのだが、データベースの作成は成功するので top コマンドなどで確認しているとよいと思う)DBCAの画面は、いつものFlash版スライドショーを見ていただきたい。
# This file is used by ORACLE utilities. It is created by root.sh # and updated by the Database Configuration Assistant when creating # a database.
# A colon, ':', is used as the field terminator. A new line terminates # the entry. Lines beginning with a pound sign, '#', are comments. # # Entries are of the form: # $ORACLE_SID:$ORACLE_HOME:: # # The first and second fields are the system identifier and home # directory of the database respectively. The third filed indicates # to the dbstart utility that the database should , "Y", or should not, # "N", be brought up at system boot time. # # Multiple entries with the same $ORACLE_SID are not allowed. # # *:/Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/panther:N panther:/Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/panther:Y cube: oracle$
3)プロパティリストファイルの作成
今回は、空ファイルを touch コマンドで作成したが、viや、Property List Editor(後述)または、その他のテキストエディタで直接作成してもかまわない。
Property List Editor は、開発ツールに含まれているProperty Listファイル編集用の専用エディタだ。使い方は非常に簡単なので特に説明はしないが、以下にこのツールで Oracle10g 用 StartupParameters.plist を作成した画面載せておく。touchコマンドで作成した空の StartupParameters.plist を Finder 上でダブルクリックすれば、すぐに編集に取りかかれる。
また、viや、その他のテキストエディタで作成する場合には、以下のように入力すればよい。(NextStep時代の形式で記述することも可能だが、MacOS Xでは、XMLを積極的に利用しているので、この例では XML で記述(前述の Property List Editor でも XML形式で作成される)している。キー値及び意味については、ここで紹介した書籍や、Appleが公開しているマニュアルを参考にしてほしい)
sh-2.05b# /sbin/SystemStarter -nd start "Oracle10g 10.1.3 Database" Welcome to Macintosh. Found item: NortonAutoProtect Found item: NortonMissedTasks Found item: VirtualPCOSServices Found item: Accounting Found item: AMD Found item: Apache Found item: AppleShare Found item: AppServices Found item: AuthServer Found item: BIND Found item: ConfigServer Found item: CoreGraphics Found item: CrashReporter Found item: Cron Found item: DirectoryServices Found item: Disks Found item: IPServices Found item: KernelEventAgent Found item: LDAP Found item: LoginWindow Found item: mDNSResponder Found item: NetInfo Found item: Network Found item: NetworkExtensions Found item: NetworkTime Found item: NFS Found item: NIS Found item: Oracle Found item: OracleCRS Unable to open parameters file /System/Library/StartupItems/OracleCRS/ StartupParameters.plist for item OracleCRS. (No such file or directory) Found item: Portmap Found item: Postfix Found item: PrintingServices Found item: RemoteDesktopAgent Found item: SecurityServer Found item: SNMP Found item: SystemLog Found item: SystemTuning Found item: xgridagentd Running command (425): /System/Library/StartupItems/SecurityServer/SecurityServer start Finished Apple Security Server (425) Running command (426): /System/Library/StartupItems/Disks/Disks start Finished local disks (426) Running command (427): /System/Library/StartupItems/Oracle/Oracle start Finished Oracle10g 10.1.3 Database Server (427) none left Startup complete. Hangup sh-2.05b#
sh-2.05b# /sbin/SystemStarter -v start "Oracle10g 10.1.3 Database" Welcome to Macintosh. Unable to open parameters file /System/Library/StartupItems/OracleCRS/ StartupParameters.plist for item OracleCRS. (No such file or directory) Starting SecurityServer Checking disks Waiting for Oracle10g 10.1.3 Database Server /System/Library/StartupItems/Oracle/Oracle: line 143: unexpected EOF while looking for matching `'' /System/Library/StartupItems/Oracle/Oracle: line 147: syntax error: unexpected end of file Oracle10g 10.1.3 Database Server (461) did not complete successfully. The following StartupItems failed to properly start: /System/Library/StartupItems/Oracle - execution of Startup script failed Startup complete. Hangup sh-2.05b#
5−2−1) 起動確認!
sh-2.05b# /sbin/SystemStarter -v start "Oracle10g 10.1.3 Database" Welcome to Macintosh. Unable to open parameters file /System/Library/StartupItems/OracleCRS/ StartupParameters.plist for item OracleCRS. (No such file or directory) Starting SecurityServer Checking disks **************************** env for Oracle **************************** TERM=vt100 NLS_LANG=Japanese_Japan.JA16SJISTILDE ORACLE_OWNER=oracle ORACLE_SID=panther ORACLE_BASE=/Volumes/ExtraDisk2/u01/app/oracle ORACLE_OWNER_PATH=/Users/oracle PATH=/Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/panther/bin: /usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin PWD=/System/Library/StartupItems/Oracle SHLVL=1 DYLD_LIBRARY_PATH=/usr/X11R6/lib:/Volumes/ExtraDisk2/u01/app/oracle/ product/10.1.0/panther/lib:/Volumes/ExtraDisk2/u01/app/oracle/product/ 10.1.0/panther/rdbms/lib: CLASSPATH=/Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/panther ORACLE_HOME=/Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/panther _=/usr/bin/env
************************************* hard and soft shell resource limits ************************************* Hard limit: core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 67584 pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 65536 cpu time (seconds, -t) unlimited max user processes (-u) 2068 virtual memory (kbytes, -v) 9007199254806527
Soft limit: core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 65536 pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 65536 cpu time (seconds, -t) unlimited max user processes (-u) 2068 virtual memory (kbytes, -v) 9007199254806527 Starting Oracle Names... onsctl: ons started Started Oracle Names Starting TNS Listener...
LSNRCTL for MacOS X Server: Version 10.1.0.3.0 - Production on 11-6月 -2005 12:06:58
Copyright (c) 1991, 2004, Oracle. All rights reserved.
TNSLSNR for MacOS X Server: Version 10.1.0.3.0 - Production システム・パラメータ・ファイルは/Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0 /panther/network/admin/listener.oraです。 ログ・メッセージを/Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/panther/ network/log/listener.logに書き込みました。 リスニングしています: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=cube.discus.jp)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cube.discus.jp)(PORT=1521)))に接続中 リスナーのステータス ------------------------ 別名 LISTENER バージョン TNSLSNR for MacOS X Server: Version 10.1.0.3.0 - Production 開始日 11-6月 -2005 12:06:59 稼働時間 0 日 0 時間 0 分 0 秒 トレース・レベル OFF セキュリティ ON: Local OS Authentication SNMP OFF パラメータ・ファイル /Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/ panther/network/admin/listener.ora ログ・ファイル /Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/ panther/network/log/listener.log リスニング・エンドポイントのサマリー... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cube.discus.jp)(PORT=1521))) サービスのサマリー... サービス"panther"には、1件のインスタンスがあります。 インスタンス"panther"、状態UNKNOWNには、このサービスに対する1件のハンドラがあります... コマンドは正常に終了しました。 Started TNS Listener. Starting Oracle database...
SQL*Plus: Release 10.1.0.3.0 - Production on 土 6月 11 12:07:00 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
SQL> Waiting for Oracle10g 10.1.3 Database Server アイドル・インスタンスに接続しました。 SQL> Waiting for Oracle10g 10.1.3 Database Server Waiting for Oracle10g 10.1.3 Database Server ORACLEインスタンスが起動しました。
Total System Global Area 230686720 bytes Fixed Size 778584 bytes Variable Size 78651048 bytes Database Buffers 150994944 bytes Redo Buffers 262144 bytes データベースがマウントされました。 Waiting for Oracle10g 10.1.3 Database Server Waiting for Oracle10g 10.1.3 Database Server Waiting for Oracle10g 10.1.3 Database Server データベースがオープンされました。 SQL> Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production With the Partitioning, OLAP and Data Mining optionsとの接続が切断されました。
Database "panther" warm started. Started Oracle database Starting iSQL*plus... iSQL*Plus 10.1.0.3.0 Copyright (c) 2004 Oracle. All rights reserved. Starting iSQL*Plus ... Waiting for Oracle10g 10.1.3 Database Server Waiting for Oracle10g 10.1.3 Database Server iSQL*Plus started. Started iSQL*plus. Starting OEM Database Console... Oracle Enterprise Manager 10g Database Control Release 10.1.0.3.0 Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved. http://cube.discus.jp:5500/em/console/aboutApplication Starting Oracle Enterprise Manager 10g Database Control ... .Waiting for Oracle10g 10.1.3 Database Server .Waiting for Oracle10g 10.1.3 Database Server started. ------------------------------------------------------------------ Logs are generated in directory /Volumes/ExtraDisk2/u01/app/oracle/ product/10.1.0/panther/cube.discus.jp_panther/sysman/log Started OEM Database Console. Startup complete. Hangup sh-2.05b#
SQL*Plus: Release 10.1.0.3.0 - Production on 土 6月 11 12:13:10 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production With the Partitioning, OLAP and Data Mining options に接続されました。 SQL> desc emp 名前 NULL? 型 ----------------------------------------- -------- ---------------------------- EMPNO NOT NULL NUMBER(4) ENAME VARCHAR2(10) JOB VARCHAR2(9) MGR NUMBER(4) HIREDATE DATE SAL NUMBER(7,2) COMM NUMBER(7,2) DEPTNO NUMBER(2)
SQL> exit Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production With the Partitioning, OLAP and Data Mining optionsとの接続が切断されました。 cube: oracle$ exit logout sh-2.05b#
5−2−3) 停止確認!
sh-2.05b# /sbin/SystemStarter -v stop "Oracle10g 10.1.3 Database" Welcome to Macintosh. Unable to open parameters file /System/Library/StartupItems/OracleCRS/ StartupParameters.plist for item OracleCRS. (No such file or directory) **************************** env for Oracle **************************** TERM=vt100 NLS_LANG=Japanese_Japan.JA16SJISTILDE ORACLE_OWNER=oracle ORACLE_SID=panther ORACLE_BASE=/Volumes/ExtraDisk2/u01/app/oracle ORACLE_OWNER_PATH=/Users/oracle PATH=/Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/panther /bin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin PWD=/System/Library/StartupItems/Oracle SHLVL=1 DYLD_LIBRARY_PATH=/usr/X11R6/lib:/Volumes/ExtraDisk2/u01/app/oracle/ product/10.1.0/panther/lib:/Volumes/ExtraDisk2/u01/app/oracle/product/ 10.1.0/panther/rdbms/lib: CLASSPATH=/Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/panther ORACLE_HOME=/Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/panther _=/usr/bin/env
************************************* hard and soft shell resource limits ************************************* Hard limit: core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 67584 pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 65536 cpu time (seconds, -t) unlimited max user processes (-u) 2068 virtual memory (kbytes, -v) 9007199254806527
Soft limit: core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 65536 pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 65536 cpu time (seconds, -t) unlimited max user processes (-u) 2068 virtual memory (kbytes, -v) 9007199254806527 Stopping OEM Database Console... Oracle Enterprise Manager 10g Database Control Release 10.1.0.3.0 Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved. http://cube.discus.jp:5500/em/console/aboutApplication Stopping Oracle Enterprise Manager 10g Database Control ... Waiting for Oracle10g 10.1.3 Database Server Waiting for Oracle10g 10.1.3 Database Server ... Waiting for Oracle10g 10.1.3 Database Server Stopped. Stopped OEM Database Console. Stopping iSQL*plus... iSQL*Plus 10.1.0.3.0 Copyright (c) 2004 Oracle. All rights reserved.
Stopping iSQL*Plus ... Waiting for Oracle10g 10.1.3 Database Server Waiting for Oracle10g 10.1.3 Database Server Waiting for Oracle10g 10.1.3 Database Server iSQL*Plus stopped. Stopped iSQL*plus. Stopping Oracle Database...
SQL*Plus: Release 10.1.0.3.0 - Production on 土 6月 11 12:14:40 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
SQL> Waiting for Oracle10g 10.1.3 Database Server 接続されました。 SQL> Waiting for Oracle10g 10.1.3 Database Server Waiting for Oracle10g 10.1.3 Database Server データベースがクローズされました。 データベースがディスマウントされました。 Waiting for Oracle10g 10.1.3 Database Server ORACLEインスタンスがシャットダウンされました。 SQL> Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production With the Partitioning, OLAP and Data Mining optionsとの接続が切断されました。 Database "panther" shut down. Stopped Oracle Database. Stopping TNS Listener... Waiting for Oracle10g 10.1.3 Database Server
LSNRCTL for MacOS X Server: Version 10.1.0.3.0 - Production on 11-6月 -2005 12:15:00
Copyright (c) 1991, 2004, Oracle. All rights reserved.
OEM 10g にSafariや、Mozillaでアクセスすると、java exceptionが発生し、stack traceが表示されてしまうということであった。(Panther De Oracle10g その7) 実は、これも、前回(Panther De Oracle10g その9)と同様に ”既知の問題” なのである。付属するドキュメント(リリースノート)には、以下の記述がある。
Copy Required Font Files
Before installing the software, copy the font files from the fonts directory on the Oracle Database 10g CD-ROM to the /Library/Java/Home/lib/fonts directory on the system where you want to install the software. For RAC installations, copy the font files to the /Library/Java/Home/lib/fonts directory on each node of the cluster.
If you do not do this, runtime exceptions may occur when you access Oracle Enterprise Manager, iSQL*Plus, or iSearch through a browser that uses a multibyte character set, for example Japanese.
前回(Panther De Oracle10g その8)で、リスナーがハングアップする問題が発生したが、その解決方法が、Oracle10g for MacOS Xに付属するリリースノートに記載されていた。ようするに、”既知の問題” ということですな〜。
リリースノートには以下のように記載されている。
Stopping the Oracle Net Listener
On Mac OS X, make sure that Oracle Names Server (ONS) is running before entering the listener stop command. If ONS is not running, the listener stop command may cause the listener to hang. To start ONS, enter the following command:
TNSLSNR for MacOS X Server: Version 10.1.0.3.0 - Production システム・パラメータ・ファイルは/Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/ panther/network/admin/listener.oraです。 ログ・メッセージを/Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/ panther/network/log/listener.logに書き込みました。 リスニングしています: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cube.discus.jp)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cube.discus.jp)(PORT=1521)))に接続中 リスナーのステータス ------------------------ 別名 LISTENER バージョン TNSLSNR for MacOS X Server: Version 10.1.0.3.0 - Production 開始日 05-6月 -2005 18:27:32 稼働時間 0 日 0 時間 0 分 0 秒 トレース・レベル OFF セキュリティ ON: Local OS Authentication SNMP OFF パラメータ・ファイル /Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/ panther/network/admin/listener.ora ログ・ファイル /Volumes/ExtraDisk2/u01/app/oracle/product/10.1.0/ panther/network/log/listener.log リスニング・エンドポイントのサマリー... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cube.discus.jp)(PORT=1521))) サービスのサマリー... サービス"panther"には、1件のインスタンスがあります。 インスタンス"panther"、状態UNKNOWNには、このサービスに対する1件のハンドラがあります... コマンドは正常に終了しました。
Mac De Oracle という記事なので、Oracle以外の商用データベースのことは書いていないのだが、いくつかの商用データベースベンダがMacOS X版をリリースし始めた。
ちょうど、SybaseとOracle が MacOS X 10.2 Jaguar に対応した、エンタープライズ向けデータベースをリリースするという発表があったころ、IBMも調査していたようなのだ。現時点開発中であるという噂もないので、DB2 for Mac OS Xはしばらくないのかもしれないが・・・・。
今回も、Mac OS X Tiger で、Server版ではないことに注意。
また、現時点(2005/6/1)では、Oracle10g は、Mac OS X Tigerに対応しているというアナウンスは出ていないし、Mac OS X Panther Server 10.3.6以外の動作保証もされていない。
sh-2.05b# uname -a Darwin pb17.local 8.1.0 Darwin Kernel Version 8.1.0: Tue May 10 18:16:08 PDT 2005; root:xnu-792.1.5.obj ̄4/RELEASE_PPC Power Macintosh powerpc sh-2.05b#
sh-2.05b# sw_vers ProductName: Mac OS X ProductVersion: 10.4.1 BuildVersion: 8B15 sh-2.05b#
そういえば、PowerBook を Mac OS X 10.4 (tiger) にupdateする際に、ファイルシステムの破損が検出され、TechToo Proでディスクを修復。本当は、DiskUtility で修復したがったが、DiskUtilityが修復作業中にクラッシュてしまうので、TechToo Proで修復したのだ。しかし、60GBのディスクを修復するのにあまりに時間がかかるので、TechToo Proの修復途中で停止させ、残りをDiskUtilityで修復したために、復活できなかったファイル群があったようだ。時間が掛かっても最後までTechToo Proで修復するべきであった。。結局、Mac OS X Tigerをクリーンインストールし、被害の無かったパーティションのデータも念のためにバックアップからリストアしてなんとか復活したのであった。
Checking the status of Oracle init process... Expecting the CRS daemons to be up within 600 seconds. Giving up: Oracle CSS stack appears NOT to be running. ./root.sh: line 788: /System/Library/StartupItems/OracleCRS: is a directory Oracle CSS service would not start as installed Automatic Storage Management(ASM) cannot be used until Oracle CSS service is started mkdir: /opt: No such file or directory mkdir: /opt/ORCLfmap: No such file or directory mkdir: /opt/ORCLfmap/prot1_32: No such file or directory mkdir: /opt/ORCLfmap/prot1_32: No such file or directory mkdir: /opt/ORCLfmap/prot1_32: No such file or directory cp: /opt/ORCLfmap/prot1_32/bin: No such file or directory cp: /opt/ORCLfmap/prot1_32/bin: No such file or directory chmod: /opt/ORCLfmap/prot1_32/bin/fmputl: No such file or directory chmod: /opt/ORCLfmap/prot1_32/bin/fmputlhp: No such file or directory cp: /opt/ORCLfmap/prot1_32/etc: No such file or directory sh-2.05b#
最近のコメント