SQL> var val varchar2(4000)
SQL> set autoprint on
SQL> exec sys.dbms_system.get_env('nls_lang',:val);
PL/SQL procedure successfully completed.
VAL
--------------------------------------------------------------------------------
AMERICAN_AMERICA.CL8MSWIN1251
This site contains information, scripts and instructions related to Oracle database and other technologies. Please use sqlplus and test my scripts on test environment before actual use on production. All relevant comments are welcome.
Страницы
- Main
- Veritas cluster
- AIX
- Solaris
- Linux
- Performance scripts
- RAC
- TNS
- Init parameters
- Dataguard
- ASM
- Unix tips
- VxVM
- Linux HA (hearbeat)
- Oracle internals
- Metalink (useful notes)
- Security
- OGG Oracle Golden Gate
- HTML/JavaScript in sqlplus
- Automatic TSPITR 11.2.0.3 (dropped user)
- 12.1
- SQL Performance Analyzer
- Backup/Recovery
- Alert log
четверг, 30 декабря 2010 г.
среда, 29 декабря 2010 г.
shared pool free memory
--
-- Free memory in shared pool and in reserved_pool separately, percent of free space current and min for reserved pool
--
select s.pool, round((s.bytes - p.free_space)/1024/1024, 3) fm, round((p.free_space)/1024/1024, 3) fm_reserved
, round(((s.bytes - p.free_space)/decode(sps.value, 0, NULL, sps.value))*100, 3) pct_free
, round(((sps_reserved.value - p.max_used_size)/sps_reserved.value)*100, 3) pct_free_reserved_min
from v$sgastat s, v$shared_pool_reserved p, v$parameter sps, v$parameter sps_reserved
where s.pool = 'shared pool' and s.name = 'free memory'
and sps.name='shared_pool_size'
and sps_reserved.name='shared_pool_reserved_size'
;
-- Free memory in shared pool and in reserved_pool separately, percent of free space current and min for reserved pool
--
select s.pool, round((s.bytes - p.free_space)/1024/1024, 3) fm, round((p.free_space)/1024/1024, 3) fm_reserved
, round(((s.bytes - p.free_space)/decode(sps.value, 0, NULL, sps.value))*100, 3) pct_free
, round(((sps_reserved.value - p.max_used_size)/sps_reserved.value)*100, 3) pct_free_reserved_min
from v$sgastat s, v$shared_pool_reserved p, v$parameter sps, v$parameter sps_reserved
where s.pool = 'shared pool' and s.name = 'free memory'
and sps.name='shared_pool_size'
and sps_reserved.name='shared_pool_reserved_size'
;
peformance issue - nls_lang
set NLS_LANG=american_america.utf8
--
19:54:07 SQL> select * from character_set;
171080 rows selected.
Elapsed: 00:00:29.68
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
3808 consistent gets
2009 physical reads
0 redo size
16942067 bytes sent via SQL*Net to client
1026 bytes received via SQL*Net from client
59 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
171080 rows processed
--
set NLS_LANG=
--
SQL> select * from character_set;
171080 rows selected.
Elapsed: 00:00:02.26
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
14909 consistent gets
2855 physical reads
0 redo size
18383263 bytes sent via SQL*Net to client
125854 bytes received via SQL*Net from client
11407 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
171080 rows processed
--
19:54:07 SQL> select * from character_set;
171080 rows selected.
Elapsed: 00:00:29.68
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
3808 consistent gets
2009 physical reads
0 redo size
16942067 bytes sent via SQL*Net to client
1026 bytes received via SQL*Net from client
59 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
171080 rows processed
--
set NLS_LANG=
--
SQL> select * from character_set;
171080 rows selected.
Elapsed: 00:00:02.26
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
14909 consistent gets
2855 physical reads
0 redo size
18383263 bytes sent via SQL*Net to client
125854 bytes received via SQL*Net from client
11407 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
171080 rows processed
Подписаться на:
Сообщения (Atom)
Update BLOB
set define off DECLARE vb1 CLOB := 'long text'; vb2 CLOB := 'long text'; vb3 CLOB := ...
-
set define off DECLARE vb1 CLOB := 'long text'; vb2 CLOB := 'long text'; vb3 CLOB := ...
-
RMAN> sql "alter database datafile '/u01/app/oracle/oradata/orcl/test_1.dbf' off line"; using target database contro...
-
-- After media failure 03:03:25 150 4294967295 SYS@orcl> select * from t_t where object_name = 'test'; select * from t_t where ob...