|
上完1Z0-052第6章网络
1Z0-052共19章(上完6章),1Z0-053共21章(上完2章)和1Z0-063多租户部分共9章(上完0章)
总共上完全部49章中的8章
共享服务器:
- select * from v$circuit;
- select * from v$session s where s.saddr='00000001EC922828';
- select * from v_$dispatcher s where s.PADDR='00000001EC73FDE0';
- alter system kill session '76,4839' immediate;
复制代码
公共数据库链和普通数据库链:
- [oracle@station90 admin]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 7 20:25:29 2017
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn hr/hr@utforcl199
- ERROR:
- ORA-28002: 7 天之后口令将过期
- Connected.
- SQL> select salary from employees where employee_id=100;
- SALARY
- ----------
- 99999
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 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 Aug 7 20:25:55 2017
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn hr/oracle_4U
- ERROR:
- ORA-15000: command disallowed by current instance type
- SQL> exit
- [oracle@station90 admin]$ . oraenv
- ORACLE_SID = [+ASM] ? 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 Aug 7 20:26:13 2017
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn hr/oracle_4U
- Connected.
- SQL> select salary from employees where employee_id=100;
- SALARY
- ----------
- 24000
- SQL> create database link dblink1
- 2 connect to hr identified by hr
- 3 using 'utforcl199';
- Database link created.
- SQL> select salary from employees@dblink1 where employee_id=100;
- SALARY
- ----------
- 99999
- SQL> SQL> select salary from employees where employee_id=100;
- SALARY
- ----------
- 24000
- SQL> update employees@dblink1 set salary=88888 where employee_id=100;
- 1 row updated.
- SQL> commit;
- Commit complete.
- SQL> conn / as sysdba
- Connected.
- SQL> alter user sh identified by oracle_4U account unlock;
- User altered.
- SQL> select salary from employees@dblink1 where employee_id=100;
- select salary from employees@dblink1 where employee_id=100
- *
- ERROR at line 1:
- ORA-02019: connection description for remote database not found
- SQL> select salary from hr.employees@dblink1 where employee_id=100;
- select salary from hr.employees@dblink1 where employee_id=100
- *
- ERROR at line 1:
- ORA-02019: connection description for remote database not found
- SQL> conn hr/oracle_4U
- Connected.
- SQL> grant execute on dblink1 to sh;
- grant execute on dblink1 to sh
- *
- ERROR at line 1:
- ORA-04042: procedure, function, package, or package body does not exist
- SQL> grant select on dblink1 to sh;
- grant select on dblink1 to sh
- *
- ERROR at line 1:
- ORA-00942: table or view does not exist
- SQL> create public database link dblink1
- 2 connect to hr identified by hr
- 3 using 'utforcl199';
- create public database link dblink1
- *
- ERROR at line 1:
- ORA-01031: insufficient privileges
- SQL> /
- Database link created.
- SQL> conm sh/oracle_4U
- SP2-0734: unknown command beginning "conm sh/or..." - rest of line ignored.
- SQL> conn sh/oracle_4U
- Connected.
- SQL> select salary from employees@dblink1 where employee_id=100;
- SALARY
- ----------
- 88888
- SQL> update employees@dblink1 set salary=77777 where employee_id=100;
- 1 row updated.
- SQL> commit;
- Commit complete.
- SQL>
复制代码
锁竞争:
- select * from v$session where sid in (
- select s.BLOCKING_SESSION
- from v_$session s where s.BLOCKING_SESSION is not null);
-
- select * from v_$lock l
- where l.SID in ( 130,131)
- and type <> 'AE';
复制代码
|
|