"conn / as sysdba" on Windows
We can do the following when we want to connect to Oracle db using "conn / as sysdba" in *nix environment:
% export ORACLE_SID=ORCL
% sqlplus /nolog
% conn / as sysdba
Not a big deal. However, I got the following doing the same on Windows XP:
C:\>set ORACLE_SID=ORCL
C:\>sqlplus /nolog
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Sep 29 16:08:51 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
SQL> conn / as sysdba
ERROR:
ORA-12560: TNS:protocol adapter error
After going around for awhile, here is the solution: we need to start the corresponding Oracle services (OracleService
And here we go again:
C:\>set ORACLE_SID=ORCL
C:\>net start OracleServiceORCL
The OracleServiceORCL service is starting.
The OracleServiceORCL service was started successfully.
C:\>sqlplus /nolog
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Sep 29 16:38:20 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 1298168 bytes
Variable Size 289407240 bytes
Database Buffers 314572800 bytes
Redo Buffers 7090176 bytes
Notice that the listener is not even started!
1 Comments:
Lovely ppost
Post a Comment
<< Home