Oracle10g忘记密码

[simonsun@magic ~]$ sudo /etc/init.d/oracle10g stop
Stopping Oracle10g: iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
Stopping iSQL*Plus ...
iSQL*Plus stopped.
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://magic.linux:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
 ...  Stopped.

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 07-SEP-2009 16:51:37

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
The command completed successfully
[simonsun@magic ~]$ su oracle
口令:
[oracle@magic simonsun]$ cd ~
[oracle@magic ~]$ export ORACLE_BASE=/home/oracle
[oracle@magic ~]$ export ORACLE_HOME=$ORACLE_BASE/database
[oracle@magic ~]$ export ORACLE_SID=SUNORA
[oracle@magic ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@magic ~]$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
[oracle@magic ~]$ export PATH
[oracle@magic ~]$ cd $ORACLE_HOME

( 注,如果已经配置在环境变量里,可以不用这样手动配置 )


[oracle@magic database]$ ./bin/isqlplusctl start
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Starting iSQL*Plus ...
iSQL*Plus started.
[oracle@magic database]$ ./bin/sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 7 16:54:40 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn /as sysdba;
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area  608174080 bytes
Fixed Size                  1220820 bytes
Variable Size             184553260 bytes
Database Buffers          415236096 bytes
Redo Buffers                7163904 bytes
Database mounted.
Database opened.
SQL> alter user sys identified by PasSwOrd;

User altered.

SQL> alter user system identified by PasSwOrd;

User altered.

SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@magic database]$ exit
[simonsun@magic ~]$ sudo /etc/init.d/oracle10g start
Starting Oracle10g:
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 07-SEP-2009 17:04:34

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Starting /home/oracle/database/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /home/oracle/database/network/admin/listener.ora
Log messages written to /home/oracle/database/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=magic.linux)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                07-SEP-2009 17:04:34
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/database/network/admin/listener.ora
Listener Log File         /home/oracle/database/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=magic.linux)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Processing Database instance "SUNORA": log file /home/oracle/database/startup.log
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
iSQL*Plus instance on port 5560 is already running ...
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://magic.linux:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control .......................... started.
------------------------------------------------------------------
Logs are generated in directory /home/oracle/database/magic.linux_SUNORA/sysman/log
[simonsun@magic ~]$ su oracle
口令:
[oracle@magic simonsun]$ cd
[oracle@magic ~]$ export ORACLE_BASE=/home/oracle
[oracle@magic ~]$ export ORACLE_HOME=$ORACLE_BASE/database
[oracle@magic ~]$ export ORACLE_SID=SUNORA
[oracle@magic ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@magic ~]$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
[oracle@magic ~]$ export PATH
[oracle@magic ~]$ export ORACLE_HOME=/home/oracle/database/
[oracle@magic ~]$ cd $ORACLE_HOME
[oracle@magic database]$ ./bin/sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 7 17:10:41 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name: sys/PasSwOrd@SUNORA as sysdba

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

你可能感兴趣的:(oracle,sql,C++,c,linux)