the supplement records of ocp

You want an ASM instance to manage the files of your database. To achieve this objective, you specify the following parameters in the parameter file of the database:

INSTANCE_TYPE = RDBMS

DB_NAME = PROD

LARGE_POOL_SIZE = 8MB

DB_BLOCK_SIZE = 4K

LOG_ARCHIVE_DEST = +dgroupA

LOG_ARCHIVE_FORMAT = "$ORACLE_SID_%s_%t.%t"

DB_CREATE_FILE_DEST = +dgroupA

COMPATIBLE = 10.1.0.2.0

CONTROL_FILES = +dgroupA

Which parameter would be ignored while starting up the instance for the database PROD?

A. LARGE_POOL_SIZE

B. DB_CREATE_FILE_DEST

C. LOG_ARCHIVE_DEST

D. CONTROL_FILES

E. LOG_ARCHIVE_FORMAT

F. DB_BLOCK_SIZE

Editor’s note:If LOG_ARCHIVE_DEST is set to a disk group name, LOG_ARCHIVE_FORMAT is ignored. Unique filenames for archived logs are automatically created by the Oracle database. If LOG_ARCHIVE_DEST is set to a directory in a disk group, LOG_ARCHIVE_FORMAT has its normal semantics.

 

Case 1:

1. Shut down the database and perform. a backup.

2. Restore all the data files.

3. Mount the database.

4. Recover the database.

5. Without applying all the redo log files, open the database using the RESETLOGS

option.

6. Back up the database.

Case 2:

1. Shut down the database and perform. a backup.

2. Restore only the data files of the tablespace where user error damaged the data.

3. Mount the database.

4. Recover the database.

5. Open the database with the RESETLOGS option.

6. Back up the database.

Case 3:

Actualtests.com - The Power of Knowing

1. Shut down the database.

2. Restore the data files.

3. Open the database.

4. Perform. recovery to the current point in time.

Which case has the correct steps for an incomplete recovery?

A. Only case 1

B. Only case 2

C. Only case 3

D. Case 1 and 2

E. Case 2 and 3

F. Case 1 and 3

G. All cases, case 1, case 2, case 3

Editor’s notes:The correct answer is A. but set 2 and 3 may be reversed

 

You are connected to Recovery Manager (RMAN) without a recovery catalog. There is no copy of the control file available. You want to restore the control file from an autobackup. To retrieve the autobackup, you need the database ID (DBID).

In which two sources would you find the DBID? (Choose two.)

A. the alert log file

B. the server parameter file

C. the formatted name of a control file autobackup

D. an RMAN session log file

E. the trace file

Editor’s notes:To restore the control file from an autobackup, the database must be in a NOMOUNT state. You need the database ID (DBID) to retrieve the autobackups. Your DBID should be recorded along with other basic information about your database. If you do not have a record of the DBID of your database, there are two places you can easily find it:

·From the formatted name of a control file autobackup.

·From a RMAN session log file. The DBID is displayed by the RMAN client when it starts up and connects to your database.

 

You execute the following command to perform. a backup by using Recovery Manager

(RMAN):

RMAN> run

{allocate channel c1 type sbt;

backup datafile 1;

}

The command errors out. A part of the error message is as follows:

RMAN-03009: failure of allocate command on c1 channel

ORA-19554: error allocating device, device type: SBT_TAPE, device name:

What could explain why the statement failed?

A.sbt is not a valid device type.

B.Media Management Library was not loaded.

C.The sbt device cannot be used for data file backups.

D.No path was defined in theALLOCATE CHANNEL command.

E.The channel is currently being used by another RMAN session.

Edirot’s notes:Oracle9s Media Management Layer (MML) API lets third-party vendors build a media manager, software that works with RMAN and the vendor's hardware to allow backups to sequential media devices such as tape drives. The media manager handles loading, unloading and labeling of sequential media such as tapes. You must install media manager software to use RMAN with sequential media devices.

 

When backing up or restoring, the RMAN client connects to the target instance and directs the instance to send requests to its media manager. No direct communication occurs between the RMAN client and media manager.

Performing Backup and Restore with a Media Manager

 

Before performing backup or restore to a media manager, you must allocate one or more channels to handle the communication with the media manager. You can also configure default channels for use with the media manager, which will be applied for all backup and recovery tasks that use the media manager where you do not explicitly allocate channels. For a conceptual overview of channels, see "About RMAN Channels". Configuring or allocating channels for backups is discussed further in "Configuring and Allocating Channels for Use in Backups".

 

For example, this sequence of commands would configure channels for the media manager and back up the database to the media manager:

 

RMAN> CONFIGURE DEVICE TYPE sbt PARALLELISM 1;

RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt;

RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(NSR_SERVER=bksvr1)';

RMAN> BACKUP DATABASE;

 

In Recovery Manager (RMAN), you have set control file autobackup to ON by using the following command:

CONFIGURE CONTROLFILE AUTOBACKUP ON;

Which two events would cause the control file to be backed up automatically? (Choose two)

A. A tablespace is taken offline.

B. The database instance is restarted.

C. A new data file is added to an existing tablespace.

D. A successful backup is recorded in the RMAN repository.

E. The RMAN connection is disconnected from the target database.

Editor’s notes:The answer is C and D.But,why answer A is wrong?

When the database structure changes,autobackup will perform. such as adding a new tablespace, altering the state of a tablespace or datafile (for example, bringing it online), adding a new online redo log, renaming a file, adding a new redo thread, and so on.

But except taking tablespace offline.

 

What is the implication of setting the initialization parameter FAST_START_MTTR_TARGET to 0 in your  database? 

A) MTTR Advisor would be disabled. 

B) Redo Log Advisor would be disabled. 

C) Automatic tuning of checkpoint would be disabled. 

D) Checkpoint information would not be written to the alert log file. 

Editor’s notes:The answer is C,but I think A is also right.

To enable MTTR Advisor, set the two initialization parameters STATISTICS_LEVEL and FAST_START_MTTR_TARGET.

STATISTICS_LEVEL governs whether all advisors are enabled and is not specific to MTTR Advisor. Make sure that it is set to TYPICAL or ALL. Then, when FAST_START_MTTR_TARGET is set to a non-zero value, the MTTR Advisor is enabled

Automatic checkpoint tuning is enabled by default. If it is disabled, by setting the parameter to zero explicitly, you can enable it by unsetting FAST_START_MTTR_TARGET or set it to a nonzero value. If you set this parameter to zero this feature will be disabled.

Note: this is different from defaulting (i.e. not setting) fast_start_mttr_target to 0.

 

69: Your tnsnames.ora file has the following entry for the service alias ORCL:

ORCL=

( DESCRIPTION =

(ADDRESS = (PROTOCOL= TCP)(HOST = 10.156.24.216)(PORT = 1521))

(CONNECT_DATA=

(SERVER = DEDICATED)

(SERVICE_NAME = orcl.oracle.com)

)

)

The TNSPING command executes successfully when tested with ORCL but you are not able to connect to the database instance with the following command:

SQL> CONNECT scott/tiger@orcl

What could be the reason for this?

A.The listener is not running at the server.

B.The TNS_ADMIN environmental variable is set to a wrong value.

C.The orcl.oracle.com database service is not registered with the listener.

D.The DEFAULT_DOMAIN parameter is set to a wrong value in the SQLNET.ORAfile

Editor’s notes:the step of tnsping if that:

Oracletnsping测试程序,在通讯时使用TCP协议。TCP 是面向连接的OSI传输层协议。面向连接的协议在初始建立连接的阶段需要进行初始的序列号的交换,这就是我们通常所指的三次握手。即tnsping测试程序在与listener进行通讯时会产生三次握手现象。

当在命令行中发出了tnsping命令后,会执行oracle 网络别名(即网络服务名,主机连接字符串)的解析工作。这个解析工作会在本地的tnsnames.ora文件或ORACLE的命令服务器或ORACLE LDAP(目录服务)中进行。解析的目的是得到目标listener所在的机器名(IP地址)和listener侦听的端口号。

一旦得到listener的机器名与端口号,就可以打开一个到目标机器与端口的TCP连接。为了打开这个TCP连接,listener的机器名必须被解析为ip地址(当然这只有在解析出的listener的连接地址为机器名时才这样做),然后TCP/IP执行三次握手来完成这次连接。

在连接建立之后,Tnsping工具然后就发送一个Oracle TNS 连接包给Oracle ListenerListener然后就回应一个TNS 拒绝包(Refuse packet),在两个机器间的TCP/IP连接就结束了。从oracle 网络别名的解析到结束TCP/IP连接之间的总的耗费的时间就显示在tnsping命令的输出中。

 

Q: 102 A SELECT statement can be used to perform. these three functions:

1. Choose rows from a table.
2. Choose columns from a table.
3. Bring together data that is stored in different tables by creating a link between them.
Which set of keywords describes these capabilities?

A. difference, projection, join
B. selection, projection, join
C. selection, intersection, join
D. intersection, projection, join
E. difference, projection, product
这个属于关系型数据库理论知识。
Selection:选择。意思是从表中查询出部分行。
Projection:投影。意思是从表中查询出部分列。
intersection:交集。多表的共同部分。
difference:同上就是不同部分。。

 

When we create table,the condition of constrain has many format.

1、primary key
create table EMP4
(
  EMPNO    NUMBER(4) constraint PK_EMP4 primary KEY ,
  ENAME    VARCHAR2(10),
  JOB      VARCHAR2(9),
  MGR      NUMBER(4),
  HIREDATE DATE,
  SAL      NUMBER(7,2),
  COMM     NUMBER(7,2),
  DEPTNO   NUMBER(2)
);

also ,you can add primary key like this:

create table EMP4
(
  EMPNO    NUMBER(4),
  ENAME    VARCHAR2(10),
  JOB      VARCHAR2(9),
  MGR      NUMBER(4),
  HIREDATE DATE,
  SAL      NUMBER(7,2),
  COMM     NUMBER(7,2),
  DEPTNO   NUMBER(2)
 
);
alter table EMP
  add constraint PK_EMP primary key (EMPNO);
 
2、foreign key
create table EMP4
(
  EMPNO    NUMBER(4),
  ENAME    VARCHAR2(10),
  JOB      VARCHAR2(9),
  MGR      NUMBER(4),
  HIREDATE DATE,
  SAL      NUMBER(7,2),
  COMM     NUMBER(7,2),
  DEPTNO   NUMBER(2) constraint FK_DEPT4
  references DEPT (DEPTNO)   --- there is no key words "foreign key"
);

and also,you can do this to create foreign:

create table EMP4
(
  EMPNO    NUMBER(4),
  ENAME    VARCHAR2(10),
  JOB      VARCHAR2(9),
  MGR      NUMBER(4),
  HIREDATE DATE,
  SAL      NUMBER(7,2),
  COMM     NUMBER(7,2),
  DEPTNO   NUMBER(2)
 
);
alter table EMP
  add constraint FK_DEPT foreign key (DEPTNO)
  references DEPT (DEPTNO);  -- the keyword "foreign key" and "references" can not be reverse.remeber indeedly.
 
 
look at these two statements:
1、SELECT 1,'&2' FROM emp WHERE empno=4;
2、SELECT 1,&2 FROM emp WHERE empno=4;

the difference between '&2' and &2 is just the ''. the acture statement 1 is that:
SELECT 1,'2' FROM emp WHERE empno=4;
and the other one is that:
SELECT 1,2 FROM emp WHERE empno=4;
so ,you can see the difference.


the foreign key allow the column has null value.

 


the definition of NATURAL JOIN
NATURAL JOIN

The NATURAL keyword indicates that a natural join is being performed. A natural join is based on all columns in the two tables that have the same name. It selects rows from the two tables that have equal values in the relevant columns. When specifying columns that are involved in the natural join, do not qualify the column name with a table name or table alias.

On occasion, the table pairings in natural or cross joins may be ambiguous. For example:

a NATURAL LEFT JOIN b LEFT JOIN c ON b.c1 = c.c1

can be interpreted in either of the following ways:

a NATURAL LEFT JOIN (b LEFT JOIN c ON b.c1 = c.c1)
   (a NATURAL LEFT JOIN b) LEFT JOIN c ON b.c1 = c.c1

To avoid this ambiguity, you can use parentheses to specify the pairings of joined tables. In the absence of such parentheses, the database uses left associativity, pairing the tables from left to right.


Restriction on Natural Joins

You cannot specify a LOB column, columns of AnyType, AnyData, or AnyDataSet, or a collection column as part of a natural join.


 

The null value display last for asc ordered and for first for  desc ordered.  just remeber.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14730395/viewspace-675545/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/14730395/viewspace-675545/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值