|
[root@station90 ~]# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE station90
ora.FRA.dg ora....up.type ONLINE ONLINE station90
ora.L2.lsnr ora....er.type ONLINE ONLINE station90
ora....ER.lsnr ora....er.type ONLINE ONLINE station90
ora.asm ora.asm.type ONLINE ONLINE station90
ora.cssd ora.cssd.type ONLINE ONLINE station90
ora.diskmon ora....on.type ONLINE ONLINE station90
ora.orcl.db ora....se.type OFFLINE OFFLINE
[root@station90 ~]# crsctl start res ora.orcl.db
CRS-2640: Required resource 'ora.MYGROUP.dg' is missing.
CRS-4000: Command Start failed, or completed with errors.
[root@station90 ~]# su - oracle
[oracle@station90 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 30 19:13:25 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn / as sysdbaq
SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 6680915968 bytes
Fixed Size 2213936 bytes
Variable Size 3355445200 bytes
Database Buffers 3288334336 bytes
Redo Buffers 34922496 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@station90 ~]$ . oraenv
ORACLE_SID = [orcl] ? rcat
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/11.2.0/dbhome_1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@station90 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 30 19:38:50 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size 2213776 bytes
Variable Size 469764208 bytes
Database Buffers 1124073472 bytes
Redo Buffers 7360512 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@station90 ~]$ exit
logout
[root@station90 ~]# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE station90
ora.FRA.dg ora....up.type ONLINE ONLINE station90
ora.L2.lsnr ora....er.type ONLINE ONLINE station90
ora....ER.lsnr ora....er.type ONLINE ONLINE station90
ora.asm ora.asm.type ONLINE ONLINE station90
ora.cssd ora.cssd.type ONLINE ONLINE station90
ora.diskmon ora....on.type ONLINE ONLINE station90
ora.orcl.db ora....se.type ONLINE ONLINE station90
[root@station90 ~]# crsctl stop res ora.LISTENER.lsnr
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'station90'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'station90' succeeded
[root@station90 ~]# crsctl start res ora.LISTENER.lsnr
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'station90'
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'station90' succeeded
[root@station90 ~]# su - oracle
[oracle@station90 ~]$ . oraenv
ORACLE_SID = [orcl] ? rcat
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/11.2.0/dbhome_1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@station90 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 30 19:41:57 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected.
SQL> alter system register;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size 2213776 bytes
Variable Size 469764208 bytes
Database Buffers 1124073472 bytes
Redo Buffers 7360512 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@station90 ~]$ echo $TNS_ADMIN
/u01/app/oracle/product/11.2.0/grid/network/admin
[oracle@station90 ~]$ cd /u01/app/oracle/product/11.2.0/grid/network/admin/
[oracle@station90 admin]$ ls
listener1406294PM3736.bak listener.ora.bak.station90 shrept.lst sqlnet.ora tnsnames.ora
listener.ora samples sqlnet1406294PM3736.bak tnsnames1406294PM3736.bak
[oracle@station90 admin]$ vim tnsnames.ora
[oracle@station90 admin]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 30 19:50:08 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn / as sys
SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SQL> conn as / sys
SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SQL> conn / as sysdba
Connected.
SQL> show parameter loacl_listener
SQL> show parameter loacl_list
SQL> show parameter local_list
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string
SQL> alter system set local_listener = 'mytns';
System altered.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@station90 admin]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 30 20:09:08 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn hr/oracle_4U
ERROR:
ORA-28000: the account is locked
SQL> exit
[oracle@station90 admin]$ . oraenv
ORACLE_SID = [rcat] ? orcl
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@station90 admin]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 30 20:09:25 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected.
SQL> conn hr/oracle_4U
Connected.
SQL> set linesize 1000
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
[oracle@station90 admin]$ cd $ORACLE_HOME
[oracle@station90 dbhome_1]$ cd sqlplus/
[oracle@station90 sqlplus]$ ls
admin bin doc lib mesg
[oracle@station90 sqlplus]$ cd admin/
[oracle@station90 admin]$ ls
glogin.sql help libsqlplus.def plustrce.sql pupbld.sql
[oracle@station90 admin]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/sqlplus/admin
[oracle@station90 admin]$ vim glogin.sql
[oracle@station90 admin]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 30 20:10:56 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn hr/oracle_4U
Connected.
SQL> select * from departments;
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID
------------- ------------------------------ ---------- -----------
10 Administration 200 1700
20 Marketing 201 1800
30 Purchasing 114 1700
40 Human Resources 203 2400
50 Shipping 121 1500
60 IT 103 1400
70 Public Relations 204 2700
80 Sales 145 2500
90 Executive 100 1700
100 Finance 108 1700
110 Accounting 205 1700
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID
------------- ------------------------------ ---------- -----------
120 Treasury 1700
130 Corporate Tax 1700
140 Control And Credit 1700
150 Shareholder Services 1700
160 Benefits 1700
170 Manufacturing 1700
180 Construction 1700
190 Contracting 1700
200 Operations 1700
210 IT Support 1700
220 NOC 1700
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID
------------- ------------------------------ ---------- -----------
230 IT Helpdesk 1700
240 Government Sales 1700
250 Retail Sales 1700
260 Recruiting 1700
270 Payroll 1700
27 rows selected.
SQL> select *,rowid from departments;
select *,rowid from departments
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
SQL> select DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID,LOCATION_ID, rowid from departments;
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID ROWID
------------- ------------------------------ ---------- ----------- ------------------
10 Administration 200 1700 AAAR5kAAFAAAACvAAA
20 Marketing 201 1800 AAAR5kAAFAAAACvAAB
30 Purchasing 114 1700 AAAR5kAAFAAAACvAAC
40 Human Resources 203 2400 AAAR5kAAFAAAACvAAD
50 Shipping 121 1500 AAAR5kAAFAAAACvAAE
60 IT 103 1400 AAAR5kAAFAAAACvAAF
70 Public Relations 204 2700 AAAR5kAAFAAAACvAAG
80 Sales 145 2500 AAAR5kAAFAAAACvAAH
90 Executive 100 1700 AAAR5kAAFAAAACvAAI
100 Finance 108 1700 AAAR5kAAFAAAACvAAJ
110 Accounting 205 1700 AAAR5kAAFAAAACvAAK
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID ROWID
------------- ------------------------------ ---------- ----------- ------------------
120 Treasury 1700 AAAR5kAAFAAAACvAAL
130 Corporate Tax 1700 AAAR5kAAFAAAACvAAM
140 Control And Credit 1700 AAAR5kAAFAAAACvAAN
150 Shareholder Services 1700 AAAR5kAAFAAAACvAAO
160 Benefits 1700 AAAR5kAAFAAAACvAAP
170 Manufacturing 1700 AAAR5kAAFAAAACvAAQ
180 Construction 1700 AAAR5kAAFAAAACvAAR
190 Contracting 1700 AAAR5kAAFAAAACvAAS
200 Operations 1700 AAAR5kAAFAAAACvAAT
210 IT Support 1700 AAAR5kAAFAAAACvAAU
220 NOC 1700 AAAR5kAAFAAAACvAAV
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID ROWID
------------- ------------------------------ ---------- ----------- ------------------
230 IT Helpdesk 1700 AAAR5kAAFAAAACvAAW
240 Government Sales 1700 AAAR5kAAFAAAACvAAX
250 Retail Sales 1700 AAAR5kAAFAAAACvAAY
260 Recruiting 1700 AAAR5kAAFAAAACvAAZ
270 Payroll 1700 AAAR5kAAFAAAACvAAa
27 rows selected.
SQL> select DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID,LOCATION_ID, rowid, substr(to_char(rowid),10,6) , from departments;
select DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID,LOCATION_ID, rowid, substr(to_char(rowid),10,6) , from departments
*
ERROR at line 1:
ORA-00936: missing expression
SQL> select DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID,LOCATION_ID, rowid, substr(to_char(rowid),10,6) from departments;
select DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID,LOCATION_ID, rowid, substr(to_char(rowid),10,6) from departments
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got ROWID
SQL> select DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID,LOCATION_ID, rowid, substr(rowid,10,6) from departments;
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID ROWID SUBSTR(ROWID,10,6)
------------- ------------------------------ ---------- ----------- ------------------ ------------------------
10 Administration 200 1700 AAAR5kAAFAAAACvAAA AAAACv
20 Marketing 201 1800 AAAR5kAAFAAAACvAAB AAAACv
30 Purchasing 114 1700 AAAR5kAAFAAAACvAAC AAAACv
40 Human Resources 203 2400 AAAR5kAAFAAAACvAAD AAAACv
50 Shipping 121 1500 AAAR5kAAFAAAACvAAE AAAACv
60 IT 103 1400 AAAR5kAAFAAAACvAAF AAAACv
70 Public Relations 204 2700 AAAR5kAAFAAAACvAAG AAAACv
80 Sales 145 2500 AAAR5kAAFAAAACvAAH AAAACv
90 Executive 100 1700 AAAR5kAAFAAAACvAAI AAAACv
100 Finance 108 1700 AAAR5kAAFAAAACvAAJ AAAACv
110 Accounting 205 1700 AAAR5kAAFAAAACvAAK AAAACv
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID ROWID SUBSTR(ROWID,10,6)
------------- ------------------------------ ---------- ----------- ------------------ ------------------------
120 Treasury 1700 AAAR5kAAFAAAACvAAL AAAACv
130 Corporate Tax 1700 AAAR5kAAFAAAACvAAM AAAACv
140 Control And Credit 1700 AAAR5kAAFAAAACvAAN AAAACv
150 Shareholder Services 1700 AAAR5kAAFAAAACvAAO AAAACv
160 Benefits 1700 AAAR5kAAFAAAACvAAP AAAACv
170 Manufacturing 1700 AAAR5kAAFAAAACvAAQ AAAACv
180 Construction 1700 AAAR5kAAFAAAACvAAR AAAACv
190 Contracting 1700 AAAR5kAAFAAAACvAAS AAAACv
200 Operations 1700 AAAR5kAAFAAAACvAAT AAAACv
210 IT Support 1700 AAAR5kAAFAAAACvAAU AAAACv
220 NOC 1700 AAAR5kAAFAAAACvAAV AAAACv
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID ROWID SUBSTR(ROWID,10,6)
------------- ------------------------------ ---------- ----------- ------------------ ------------------------
230 IT Helpdesk 1700 AAAR5kAAFAAAACvAAW AAAACv
240 Government Sales 1700 AAAR5kAAFAAAACvAAX AAAACv
250 Retail Sales 1700 AAAR5kAAFAAAACvAAY AAAACv
260 Recruiting 1700 AAAR5kAAFAAAACvAAZ AAAACv
270 Payroll 1700 AAAR5kAAFAAAACvAAa AAAACv
27 rows selected.
SQL> select DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID,LOCATION_ID, rowid, substr(rowid,10,6) , dbms_rowid.rowid_block_number from departments;
select DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID,LOCATION_ID, rowid, substr(rowid,10,6) , dbms_rowid.rowid_block_number from departments
*
ERROR at line 1:
ORA-06553: PLS-306: wrong number or types of arguments in call to 'ROWID_BLOCK_NUMBER'
SQL> select DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID,LOCATION_ID, rowid, substr(rowid,10,6) , dbms_rowid.rowid_block_number from departments;
select DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID,LOCATION_ID, rowid, substr(rowid,10,6) , dbms_rowid.rowid_block_number from departments
*
ERROR at line 1:
ORA-06553: PLS-306: wrong number or types of arguments in call to 'ROWID_BLOCK_NUMBER'
SQL> select DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID,LOCATION_ID, rowid, substr(rowid,10,6) , dbms_rowid.rowid_block_number(rowid) from departments;
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID ROWID SUBSTR(ROWID,10,6) DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID)
------------- ------------------------------ ---------- ----------- ------------------ ------------------------ ------------------------------------
10 Administration 200 1700 AAAR5kAAFAAAACvAAA AAAACv 175
20 Marketing 201 1800 AAAR5kAAFAAAACvAAB AAAACv 175
30 Purchasing 114 1700 AAAR5kAAFAAAACvAAC AAAACv 175
40 Human Resources 203 2400 AAAR5kAAFAAAACvAAD AAAACv 175
50 Shipping 121 1500 AAAR5kAAFAAAACvAAE AAAACv 175
60 IT 103 1400 AAAR5kAAFAAAACvAAF AAAACv 175
70 Public Relations 204 2700 AAAR5kAAFAAAACvAAG AAAACv 175
80 Sales 145 2500 AAAR5kAAFAAAACvAAH AAAACv 175
90 Executive 100 1700 AAAR5kAAFAAAACvAAI AAAACv 175
100 Finance 108 1700 AAAR5kAAFAAAACvAAJ AAAACv 175
110 Accounting 205 1700 AAAR5kAAFAAAACvAAK AAAACv 175
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID ROWID SUBSTR(ROWID,10,6) DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID)
------------- ------------------------------ ---------- ----------- ------------------ ------------------------ ------------------------------------
120 Treasury 1700 AAAR5kAAFAAAACvAAL AAAACv 175
130 Corporate Tax 1700 AAAR5kAAFAAAACvAAM AAAACv 175
140 Control And Credit 1700 AAAR5kAAFAAAACvAAN AAAACv 175
150 Shareholder Services 1700 AAAR5kAAFAAAACvAAO AAAACv 175
160 Benefits 1700 AAAR5kAAFAAAACvAAP AAAACv 175
170 Manufacturing 1700 AAAR5kAAFAAAACvAAQ AAAACv 175
180 Construction 1700 AAAR5kAAFAAAACvAAR AAAACv 175
190 Contracting 1700 AAAR5kAAFAAAACvAAS AAAACv 175
200 Operations 1700 AAAR5kAAFAAAACvAAT AAAACv 175
210 IT Support 1700 AAAR5kAAFAAAACvAAU AAAACv 175
220 NOC 1700 AAAR5kAAFAAAACvAAV AAAACv 175
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID ROWID SUBSTR(ROWID,10,6) DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID)
------------- ------------------------------ ---------- ----------- ------------------ ------------------------ ------------------------------------
230 IT Helpdesk 1700 AAAR5kAAFAAAACvAAW AAAACv 175
240 Government Sales 1700 AAAR5kAAFAAAACvAAX AAAACv 175
250 Retail Sales 1700 AAAR5kAAFAAAACvAAY AAAACv 175
260 Recruiting 1700 AAAR5kAAFAAAACvAAZ AAAACv 175
270 Payroll 1700 AAAR5kAAFAAAACvAAa AAAACv 175
27 rows selected.
SQL>
|
|