留作记录 OLDPWD=/home/oracle [oracle@localhost dbs]$ sqlplus /nolog SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 29 14:16:25 2011 Copyright (c) 1982, 2009, Oracle. All rights reserved. SQL> conn sys as sysdba Enter password: Connected to an idle instance. SQL> startup ORA-09925: Unable to create audit trail file Linux Error: 2: No such file or directory Additional information: 9925 SQL> exit Disconnected [oracle@localhost dbs]$ vim initorcl.ora [No write since last change] Press ENTER or type command to continue [oracle@localhost dbs]$ exit logout [root@localhost ~]# shutdown -r now Broadcast message from root@localhost.localdomain (/dev/pts/0) at 14:28 ... The system is going down for reboot NOW! [root@localhost ~]# login as: root root@59.64.179.60's password: Last login: Tue Mar 29 13:37:57 2011 from 59.64.179.36 [root@localhost ~]# su - oracle [oracle@localhost ~]$ sqlplus /nolog SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 29 14:33:46 2011 Copyright (c) 1982, 2009, Oracle. All rights reserved. SQL> conn sys as sysdba Enter password: Connected to an idle instance. SQL> startup ORA-09925: Unable to create audit trail file Linux Error: 2: No such file or directory Additional information: 9925 SQL> startup nomount ORA-09925: Unable to create audit trail file Linux Error: 2: No such file or directory Additional information: 9925 ORA-01017: invalid username/password; logon denied SQL> conn wenlele/wenlele@mydb ERROR: ORA-12541: TNS:no listener Warning: You are no longer connected to ORACLE. SQL> exit [oracle@localhost ~]$ exit logout [root@localhost ~]# /etc/init.d/iptables stop iptables: Flushing firewall rules: [ OK ] iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Unloading modules: [ OK ] [root@localhost ~]# lsnrctl start -bash: lsnrctl: command not found [root@localhost ~]# lsnrctl -bash: lsnrctl: command not found [root@localhost ~]# lsnrctl -bash: lsnrctl: command not found [root@localhost ~]# su - oracle [oracle@localhost ~]$ lsnrctl LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 29-MAR-2011 14:36:55 Copyright (c) 1991, 2009, Oracle. All rights reserved. Welcome to LSNRCTL, type "help" for information. LSNRCTL> start Starting /myoracle/app/product/11.2/db_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.1.0 - Production System parameter file is /myoracle/app/product/11.2/db_1/network/admin/listener.ora Log messages written to /myoracle/app/diag/tnslsnr/localhost/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production Start Date 29-MAR-2011 14:36:59 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /myoracle/app/product/11.2/db_1/network/admin/listener.ora Listener Log File /myoracle/app/diag/tnslsnr/localhost/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) Services Summary... Service "mydb" has 1 instance(s). Instance "mydb", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully LSNRCTL> status Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production Start Date 29-MAR-2011 14:36:59 Uptime 0 days 0 hr. 0 min. 3 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /myoracle/app/product/11.2/db_1/network/admin/listener.ora Listener Log File /myoracle/app/diag/tnslsnr/localhost/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) Services Summary... Service "mydb" has 1 instance(s). Instance "mydb", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully LSNRCTL> exit [oracle@localhost ~]$ sqlplus wenlele/wenlele@mydb SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 29 14:37:38 2011 Copyright (c) 1982, 2009, Oracle. All rights reserved. ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux Error: 2: No such file or directory Process ID: 0 Session ID: 0 Serial number: 0 Enter user-name: sys@mydb Enter password: ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux Error: 2: No such file or directory Process ID: 0 Session ID: 0 Serial number: 0 Enter user-name: sys@mydb as sysdba Enter password: Connected to an idle instance. SQL> STARTUP NOMOUNT ORACLE instance started. Total System Global Area 418484224 bytes Fixed Size 1336932 bytes Variable Size 318769564 bytes Database Buffers 92274688 bytes Redo Buffers 6103040 bytes SQL> STARTUP MOUNT ORA-01081: cannot start already-running ORACLE - shut it down first SQL> ALTER DATABASE MOUNT 2 ; Database altered. SQL> --HELP SQL> ; 1 ALTER DATABASE MOUNT 2* SQL> ? index SP2-0171: HELP system not available. SQL> conn wenlele/wenlele@mydb ERROR: ORA-01033: ORACLE initialization or shutdown in progress Process ID: 0 Session ID: 0 Serial number: 0 Warning: You are no longer connected to ORACLE. SQL> shutdown immediate ORA-03135: connection lost contact SQL> startup ORA-24324: service handle not initialized ORA-01041: internal error. hostdef extension doesn't exist SQL> conn sys/sys@mydb as sysdba ERROR: ORA-01017: invalid username/password; logon denied SQL> conn sys/Telestar2010@mydb as sysdba Connected. SQL> shutdown immediate ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 418484224 bytes Fixed Size 1336932 bytes Variable Size 318769564 bytes Database Buffers 92274688 bytes Redo Buffers 6103040 bytes Database mounted. Database opened. SQL> conn wenlele/wenlele@mydb Connected. SQL>