ORACLEÖÐÈçºÎ²éÕÒÌØ¶¨¶ÔÏóÖеÄÎı¾ÄÚÈÝ~
SQL> select dbms_metadata.get_ddl('PROCEDURE','PRO2','SCOTT') text from dual;
TEXT
----------------------------------------
CREATE OR REPLACE PROCEDURE "SCOTT"."P
RO2"
is
begin
dbms_output.put_line('wangpeng up');
end;
SQL> select dbms_metadata.get_ddl('PROCEDURE','PRO1','SCOTT') text from dual;
TEXT
----------------------------------------
CREATE OR REPLACE PROCEDURE "SCOTT"."P
RO1"
is
begin
dbms_output.put_line('wanghai up');
end;
SQL> select * from(
2 SELECT NAME , LINE , 'Create or Replace ' || TEXT as text
3 from USER_SOURCE
4 WHERE TYPE = 'PROCEDURE'
5 AND LINE = 1
6 UNION
7 SELECT NAME, LINE, TEXT as text
8 from USER_SOURCE
9 WHERE TYPE = 'PROCEDURE'
10 AND LINE > 1
11 UNION
12 SELECT NAME, 999999 , '/' as text
13 from USER_SOURCE
14 WHERE TYPE = 'PROCEDURE'
15 AND LINE = 1
16 ORDER BY 1, 2
17 ) c
18 where UPPER(c.text) like '%WANGHAI%';
NAME LINE TEXT
---------- ------- ----------------------------------------
PRO1 4 dbms_output.put_line('wanghai up');
SQL> select * from(
2 SELECT NAME , LINE , 'Create or Replace ' || TEXT as text
3 from USER_SOURCE
4 WHERE TYPE = 'PROCEDURE'
5 AND LINE = 1
6 UNION
7 SELECT NAME, LINE, TEXT as text
8 from USER_SOURCE
9 WHERE TYPE = 'PROCEDURE'
10 AND LINE > 1
11 UNION
12 SELECT NAME, 999999 , '/' as text
13 from USER_SOURCE
14 WHERE TYPE = 'PROCEDURE'
15 AND LINE = 1
16 ORDER BY 1, 2
17 ) c
18 where UPPER(c.text) like '%WANGPENG%';
NAME LINE TEXT
---------- ------- ----------------------------------------
PRO2 4 dbms_output.put_line('wangpeng up');
SQL> select * from(
2 SELECT NAME , LINE , 'Create or Replace ' || TEXT as text
3 from USER_SOURCE
4 WHERE TYPE = 'PROCEDURE'
5 AND LINE = 1
6 UNION
7 SELECT NAME, LINE, TEXT as text
8 from USER_SOURCE
9 WHERE TY
Ïà¹ØÎĵµ£º
About parent vs child latches. There is no fundamental low level difference between parent and child latches, they are all small regions of memory modified with atomic test-and-set style opcodes.
You see parent (and solitary) latches from x$ksll ......
INTERVAL DAY TO SECONDÊý¾ÝÀàÐÍ
OracleÓï·¨:
INTERVAL '{ integer | integer time_expr | time_expr }'
{ { DAY | HOUR | MINUTE } [ ( leading_precision ) ]
| SECOND [ ( leading_precision [, fractional_seconds_precision ] ) ] }
[ TO { DAY | HOUR | MINUTE | SECOND [ (fractional_seconds_precision) ] } ......
oracle Êý¾Ý¿âÀï²é¿´±í¿Õ¼äÊ©Óþ°¿ö£»
oracle±í¿Õ¼äµÄʶùÇé¿öÒª³£³£²é¿´£¬Õý³£ÏпձÈÂʹýµÍµÄʱ·Ö¾ÍÓ¦¸Ã˼¿¼Ôö´ó±í¿´¿Õ¼äÁË¡£²é¿´²½ÖèÈç´ÎSQL:
²½Öè1£º
select dbf.tablespace_name,
dbf.totalspace "×ÜÁ¿(M)",
dbf.totalblocks as ×Ü¿éÊý,
dfs.freespace "ÓàÏÂ×ÜÁ¿(M)",
dfs.freeblocks "ÓàÏ¿éÊý",
(dfs.f ......
Oracle ×°Åä¹£¸Å
Òª²é¿´¿ÉÓà RAM ºÍ»¥»»¿Õ¼ä´óС£¬ÔË×÷ÒÔ´ÎÏÂÁ
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
±ÈÈ磺
# grep MemTotal /proc/meminfo
MemTotal:512236 kB
# grep SwapTotal /proc/meminfo
SwapTotal:1574360 kB
½ÓÏÂÀ´£¬´´ÔìÓÃÀ´×°ÅäºÍά»¤ Oracle Ê®g Èí¼þµÄ Linux ×éºÍÓû ......
Èç¹û½ö½öÊÇlock£¬ÒÔÏÂÓï¾ä¿ÉÒÔ·¢ÏÖËùÓÐÓû§Ëø :
SELECT s.username,
decode(l.type, 'TM', 'TABLE LOCK', 'TX', 'ROW LOCK', NULL) LOCK_LEVEL,
o.owner,
o.object_name,
&n ......