读书笔记20120213----Oracle password file, block change-tracking file

来源:互联网 发布:加油卡软件 编辑:程序博客网 时间:2024/05/22 03:16

Oracle password file

The password file is an optional file that permits the remoteSYSDBAor administrator access to the

database.OS authentication won’t work over the network forSYSDBA, even if the very unsafe (for security

reasons) parameter REMOTE_OS_AUTHENT is set to true.---

So, let’s correct our situation. First, we’ll start up the database locally so we can set the

REMOTE_LOGIN_PASSWORDFILE. Its default value isNONE, meaning there is no password file; there are no

remote SYSDBA logins. It has two other settings:SHARED(more than one database can use the same

password file) and EXCLUSIVE (only one database uses a given password file). We’ll set ours toEXCLUSIVE,

as we want to use it for only one database (i.e., the normal use):

sys%ORA11GR2> alter system set remote_login_passwordfile=exclusive scope=spfile;

System altered.

The next step is to use the command-line tool(on UNIX and Windows) namedorapwdto create and populate the initial password file:

$ orapwd file=orapw$ORACLE_SID password=bar entries=20

the password file resides in the $ORACLE_HOME/dbsdirectory on Unix, while on Windows, it's located inthe%ORACLE_HOME%\databasedirectory.

----对于Sysdba用户不能远程访问,如出现

ORA-01031: insufficient privileges

 

Now, we have another user OPS$TKYTE, Who has been granted sysdba, but not able to connect remotely yet.

$ sqlplus 'ops$tkyte/foobar' as sysdba

sys%ORA11GR2> show user

USER is "SYS"

sys%ORA11GR2> exit

and then do remote connection

$ sqlplus 'ops$tkyte/foobar'@ora11gr2 as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 20 16:37:46 2010

Copyright (c) 1982, 2009, Oracle. All rights reserved.

ERROR:

ORA-01031: insufficient privileges

The reason for this is that OPS$TKYTE is not yet in the password file. In order to getOPS$TKYTEinto the

password file, we need to “regrant” that account SYSDBA:

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 20 16:38:43 2010

With the Partitioning, OLAP, Data Mining and Real Application Testing options

sys%ORA11GR2> grant sysdba to ops$tkyte;

Grant succeeded.

sys%ORA11GR2> exit

$ sqlplus 'ops$tkyte/foobar'@ora11gr2 as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 20 16:38:53 2010

With the Partitioning, OLAP, Data Mining and Real Application Testing options

sys%ORA11GR2>

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

Block Change Tracking File

 

is to track what blocks have modified since the last incremental backup. With

this, the Recovery Manager (RMAN) tool can back up only the database blocks that have actually been

modified without having to read the entire database.

how to enable change tracking

alter database enable block change tracking using file '<path>';

disable:

alter database disable block change tracking;-----Note that the command will erase the block chang-tracing file. It does not just disable the feature---it removes the file as well. (note, on some system, the file will not be removed even after you disable it, like Windows.This is an OS-specific issue)

 

原创粉丝点击