Bookmark and Share
Last Updates
Display: 141 - 150 of 150, Total Pages: 15
<< < 1 ... 8 9 10 11 12 13 14 15
[Blog] Oracle's V$ Views (archive log 部分) [Original] 2005-11-7 8:39am

The following views are part of the data dictionary.

See also Oracle's x$ tables

v$archive_dest

Shows all archived redo log destinations. Use this view to find out to which place archived redo logs are copied: select dest_id,destination from v$archive_dest

These values correspond to the init parameter log_archive_dest_n.

v$archive_dest_status

This view allows to find status and errors for each of the defined

v$archived_log

Displays successfully archived redo logs.

shows received logs on a primary standby database.

v$archive_gap

Lists sequence numbers of the archived los that are known to be missing for each thread on a (physical?) standby database (highest gap only).

v$archive_processes

This view provides information on the archive processes. It can be used to find out if an ARCH process is active or not.

v$controlfile

Displays the location and status of each controlfile in the database.

v$controlfile_record_section

See sections in a controlfile.

v$buffer_pool

See buffer pools.

This view's column id can be joined with x$kcbwds.indx

See also x$kcbwbpd

v$buffer_pool_statistics

v$database

This view lets you access database information. For example, you can check (using log_mode) whether or not the database is in archivelog mode:

ADPDB>select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG

v$logfile

This view can be queried to find the filenames, group numbers and states of redo log files. For example, to find all files of group 2, use select member from v$logfile where group# = 2

v$logmnr_contents

See dbms_logmnr.

v$log_history

This view contains an entry for each Log Switch that occured. The column first_time indicates the time of the first entry???

On physical standby databases, this view shows applied logs.

v$logstdby

Can be used to verify that archived redo logs are being applied to standby databases.

http://www.adp-gmbh.ch/ora/misc/dynamic_performance_views.html

Read Full Article...

Section:Oracle DBA | Read:11973 | Comment:39 | Rating:0%

[Blog] 向clob、long中插入字符的pl/sql [Original] 2005-11-1 3:21pm

insert_clob01.sql

Declare
v_long1 long;
v_long2 long;
v_long3 long;
v_lob4 clob;
Begin
v_long1 := v_long1 || RPAD('TEST1', 1000,'DOG');
v_long2 := v_long2 || RPAD('TEST2', 40,'CAT');
v_long3 := v_long3 || RPAD('TEST3', 3000,'FISH');
v_lob4 := v_lob4 || RPAD('TEST4', 3964,'DUCK');
insert into t166_t(c1,c2,c3,c4,c5,c6,c7,c8,
C230000010,C240000007,C240000008,
C240000012,C309,c310,c311,c312,c318,C321,C600000704)
values ('g', v_long2, 1, v_long2,v_long2,1,1,'a',
v_lob4,v_lob4,v_lob4,v_lob4,
v_lob4,v_lob4,v_long2,v_long2,v_long2,v_long2,v_lob4);
commit;
End;
/

Read Full Article...

Section:Oracle DBA | Read:2451 | Comment:28 | Rating:0%

[Blog] 怎样计算oracle表中一个row的长度,如何知道CLOB的长度 [Original] 2005-11-1 3:15pm

很简单啦。

SQLPLUS> analyze table XXX compute statistics;

SQLPLUS>select AVG_ROW_LEN from user_tables where table_name='XXX';

如果是要计算CLOB长度:

SQLPLUS>select length(C230000010) from t166;

或者用dbms_lob.getlength(LOB type);

如果要计算VARCHAR的长度用length(trim(Column name)) 。

Read Full Article...

Section:Oracle DBA | Read:9464 | Comment:29 | Rating:0%

[Blog] Oracle CLOB datatype [Original] 2005-11-1 3:14pm

在定义CLOB时有两种方式,一种是in-row, 另一种是out-row。如果是out-row,那只有CLOB locator存放在row中,一般使用这种方式来定义CLOB。例子:

CREATE TABLE T166

(

...

C230000010 CLOB NULL,
...

)

LOB (C230000010) STORE AS
( TABLESPACE USERS
DISABLE STORAGE IN ROW
CHUNK 8192
PCTVERSION 10
NOCACHE
NOLOGGING)

如果想定义为in-row,那就把disable改为enable就可以啦。

Read Full Article...

Section:Oracle DBA | Read:5525 | Comment:0 | Rating:0%

[Blog] Oracle character set [Original] 2005-10-14 1:32pm

--检查Oracle数据库使用了什么character set:

SQL>select * from nls_session_parameters where parameter like 'NLS_LANG%' or parameter like 'NLS_TERR%';

SQL>select * from nls_database_parameters where parameter like 'NLS_CHAR%';

--设置Linux 或者 unix 环境变量

export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK" 

export NLS_LANG="FRENCH_FRANCE.WE8ISO8859P1"

Read Full Article...

Section:Oracle DBA | Read:9397 | Comment:28 | Rating:0%

[Blog] 快速修复mysql replication [Original] 2005-8-20 9:47pm

有时来自master的一些bad queries会破坏了mysql replication,下面这个小技巧能在不重新restart mysql slave的情况下修复replication.

Read Full Article...

Section:MySQL DBA | Read:875 | Comment:0 | Rating:0%

[Blog] 怎样查看Oracle数据库中tablespace的大小? [Original] 2005-8-9 2:22pm

下面是一个script, 可以查看数据库中所有tablespace(表空间)的大小,我也是从网络上查来的,虽然只有几行语句,但是经常用到,对于喜欢command lines的朋友们很有用。

rem -----------------------------------------------------------------------
rem Purpose:    Show Used/free space in Meg by tablespace name
rem -----------------------------------------------------------------------

tti "Space Usage for Database in Meg"

SELECT Total.name "Tablespace Name",
       nvl(Free_space, 0) Free_space,
       nvl(total_space-Free_space, 0) Used_space,
       total_space
FROM
  (select tablespace_name, sum(bytes/1024/1024) Free_Space
     from sys.dba_free_space
    group by tablespace_name
  ) Free,
  (select b.name,  sum(bytes/1024/1024) TOTAL_SPACE
     from sys.v_$datafile a, sys.v_$tablespace B
    where a.ts# = b.ts#
    group by b.name
  ) Total
WHERE Free.Tablespace_name(+) = Total.name
ORDER BY Total.name
/

tti off

--------------------------------------

Sample output:

Tue Aug 09                                                             page    1
                        Space Usage for Database in Meg

Tablespace Name                FREE_SPACE     USED_SPACE     TOTAL_SPACE
----------------------------------     -------------------  --------------- ------------------------------------------------
CWMLITE                                    10.625             9.375                      20
DRSYS                                      10.3125           9.6875                      20
EXAMPLE                                      .3125        137.8125              138.125
INDX                                          22.875             2.125                      25

Read Full Article...

Section:Oracle DBA | Read:22524 | Comment:5 | Rating:0%

[Blog] 如何改变Oracle当前用户的日期显示格式? [Original] 2005-8-4 3:24pm

SQL>alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS";

SQL>alter session set NLS_DATE_FORMAT="MM/DD/YYYY HH:MI:SS AM";

查看系统日期:

SQL>select sysdate from dual;

Read Full Article...

Section:Oracle DBA | Read:16058 | Comment:0 | Rating:0%

[Blog] 如何定期删除MySQL的bin log 文件 and expire_logs_days = 30 [Original] 2005-8-4 2:59pm

我是编制了一个script,放在linux的crontab中,用于定期删除MySQL的bin log 文件,我的所有的bin log文件保存一个月。

Read Full Article...

Section:MySQL DBA | Read:2381 | Comment:0 | Rating:0%

[Blog] 怎样确定Oracle数据库中的字符集? [Original] 2005-7-6 2:36pm

在SQLPLUS中运行如下命令:

SQL>select SYS.PROPS$.VALUE$ from SYS.PROPS$ where ((SYS.PROPS$.NAME ='NLS_CHARACTERSET')) ;

SQL> select * from nls_database_parameters where parameter like 'NLS_CHAR%';

这一般是和环境变量NLS_LANG配合着使用的,比如说中文是:

$export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"

字符集一般是在安装Oracle时确定的,一旦确定之后,想改变数据库的字符集就需要重新按照Oracle数据库。

Read Full Article...

Section:Oracle DBA | Read:4244 | Comment:0 | Rating:0%

<< < 1 ... 8 9 10 11 12 13 14 15
Latest Comments
eozzrixrlo

on line..
- By admin, 2008-4-24 2:34am
rvaqlckrdu

free nud..
- By admin, 2008-4-24 2:33am
xndfjmwcpj

- By admin, 2008-4-5 1:02pm
vsjblsgatm

somali p..
- By admin, 2008-4-5 1:01pm
jknsdsmvyi

- By admin, 2008-3-12 1:48am
fkgyuchizk

tramadol..
- By admin, 2008-3-12 1:48am
wnniqpohsg

- By admin, 2008-4-24 2:32am
unxnmahoya

in phent..
- By admin, 2008-4-24 2:29am
bkgulrjbtt

- By admin, 2008-3-12 1:47am