溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

Oracle 12c的ASM新特性是什么

發(fā)布時(shí)間:2021-11-08 14:45:58 來源:億速云 閱讀:141 作者:iii 欄目:關(guān)系型數(shù)據(jù)庫(kù)

這篇文章主要講解了“Oracle 12c的ASM新特性是什么”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“Oracle 12c的ASM新特性是什么”吧!

orapwd file='+data/HTZXDBPRI/password/orapwhtzxdbpri' force=y dbuniquename=htzxdbpri format=12 sys=oracle sysbackup=oracle sysdg=oracle syskm=oracle

orapwd input_file='+data/HTZXDBPRI/password/orapwhtzxdbpri' file='+ocr/asm/password/orapwASM' asm=y force=y 

srvctl config db -d htzxdbpri -a

srvctl modify db -d htzxdbpri -pwfile '+data/HTZXDBPRI/password/orapwhtzxdbpri'

---密碼文件  linux區(qū)分$ORACLE_SID大小寫  sysdba  select* from v$pwfile_users;

--linux:orapw+$ORACLE_SID 

--windows: pwd+$ORACLE_SID.ora

  

--密碼文件存放在ASM中:

orapwd file='+data/lhrracphy/PASSWORD/pwdlhrracphy' force=y dbuniquename=lhrracphy format=12 password=lhr

orapwd file='+data' force=y dbuniquename=lhrracphy format=12 password=lhr

orapwd file='+data/HTZXDBPRI/password/orapwhtzxdbpri' force=y dbuniquename=htzxdbpri format=12 sys=oracle sysbackup=oracle sysdg=oracle syskm=oracle

  

--使用老密碼文件替換新密碼文件

orapwd input_file='+data/HTZXDBPRI/password/orapwhtzxdbpri' file='+ocr/asm/password/orapwASM' force=y 

  

orapwd input_file='+data/HTZXDBPRI/password/orapwhtzxdbpri' file='+ocr/asm/password/orapwASM' asm=y force=y 

  

--備份密碼文件

ASMCMD> pwcopy pwdorcl.378.98780432 /home/grid/

  

--配置數(shù)據(jù)庫(kù)的密碼文件

srvctl config db -d htzxdbpri -a

srvctl modify db -d htzxdbpri -pwfile '+data/HTZXDBPRI/password/orapwhtzxdbpri'

    

oradim -NEW -sid orcl9i -INTPWD admin -pfile d:\oracle\ora90\database\initstorm.ora;

C:\Users\Administrator> orapwd file="E:\oracle\ora8i\DATABASE\PWDortest.ORA" password=lhr

[oracle@robinson dbs]$  orapwd file=$ORACLE_HOME/dbs/orapworcl password=oracle force=y

asmcmd同樣也可以創(chuàng)建密碼文件:

$ asmcmd

ASMCMD> pwcreate

ASMCMD [+] > pwcreate --asm +DG/mydir/mypwfile 'oracle' -f --format 12

ASMCMD [+] > pwcreate --dbuniquename racdb +DG/mydir/mypwfile 'oracle' -f --format 12

其它命令:

pwcreate、pwdelete、pwcopy、pwmove、pwset、pwget

ASMCMD> pwget --dbuniquename htzxdbpri

+data/HTZXDBPRI/password/orapwhtzxdbpri

  

ASM存儲(chǔ)密碼文件前提條件是ASM磁盤組的 COMPATIBLE.ASM>= 12.1

select name,compatibility from v$asm_diskgroup;

  

-- create new password in ASM

orapwd file='+data/ASM/orapwasm' asm=y

-- create new password in ASM from location

orapwd input_file='/oraclegrid/dbs/orapwasm' file='+data/ASM/orapwasm'[asm=y]

-- move password file from A asm diskgroup to another

ASMCMD> pwmove --asm +CRS/asm/password/orapwasm +data/orapwasm

oracle 11g 12c dg環(huán)境 SYS密碼同步的問題

When password file is used for Redo Transport Authentication, the password of redo transport user should be same across primary and all its physical and snapshot standby databases. By default SYS user is used to authenticate redo transport sessions when password file is used.

Till 12cR1 Dataguard setup, if there is a change in password file of Primary database like Changes in password or Changes in admin privileges, then the password file needs to be copied from Primary database to standby database server and rename it according to standby database Instance name. If the password file of Primary and Standby databases are not same, then errors will be seen.

In 12cR2, the password file of standby database gets synchronized automatically when there is a change in Primary database password file. The password file change of Primary will be included in Redo and when the Redo is applied to standby, the synchronization happens in the background.

這里延伸幾個(gè)知識(shí)點(diǎn):

1 、 11g中口令文件并不能實(shí)現(xiàn)存放于asm共享訪問,修改SYS密碼,需要再每個(gè)RAC節(jié)點(diǎn)手動(dòng)實(shí)施同步 ,同樣備庫(kù)的口令文件也要手動(dòng)進(jìn)行更新覆蓋 
2、12.1版本可以實(shí)現(xiàn)口令文件ASM共享存儲(chǔ),RAC中只需要一個(gè)節(jié)點(diǎn)執(zhí)行alter user sys 就可以實(shí)現(xiàn)主庫(kù)所有節(jié)點(diǎn)同步,這點(diǎn)是11g中無法實(shí)現(xiàn)。但是備庫(kù)中口令文件依然需要手動(dòng)同步主庫(kù)的口令文件過來覆蓋 
3 、12.2版本oracle在口令文件ASM共享存儲(chǔ)的前提下,實(shí)現(xiàn)了口令文件自動(dòng)同步主備所有節(jié)點(diǎn)

MOS ---  
Automatic Password file synchronization in 12.2 Dataguard Standby database

Data Guard Standby Automatic Password file Synchronization in 12.2 (文檔 ID 2307365.1)

1 概念

This feature automatically synchronizes password files across Oracle Data Guard configurations. When the passwords of SYS, SYSDG, and so on, are changed, the password file at the primary database is updated and then the changes are propagated to all standby databases in the configuration.

該特性自動(dòng)同步Oracle數(shù)據(jù)保護(hù)配置中的密碼文件。當(dāng)SYS、SYSDG等的密碼發(fā)生更改時(shí),主數(shù)據(jù)庫(kù)中的密碼文件被更新,然后將更改傳播到配置中的所有備用數(shù)據(jù)庫(kù)。

This feature provides additional automation that further simplifies management of Oracle Data Guard configurations.

這個(gè)特性提供了額外的自動(dòng)化,進(jìn)一步簡(jiǎn)化了Oracle數(shù)據(jù)保護(hù)配置的管理。

Redo Transport Authentication Using a Password File

In an Oracle Data Guard configuration, all physical and snapshot standby databases must use a copy of the password file from the primary database. That copy is automatically refreshed whenever an administrative privilege (SYSDG, SYSOPER, SYSDBA, and so on) is granted or revoked, and after the password of any user with administrative privileges is changed. The only exception to this is far sync instances. Updated password files must still be manually copied to far sync instances because far sync instances receive redo, but do not apply it. Once the password file is up-to-date at the far sync instance the redo containing the password update at the primary is automatically propagated to any standby databases that are set up to receive redo from that far sync instance. The password file is updated on the standby when the redo is applied.

在Oracle數(shù)據(jù)保護(hù)配置中,所有物理和快照備用數(shù)據(jù)庫(kù)必須使用來自主數(shù)據(jù)庫(kù)的密碼文件副本。當(dāng)管理員權(quán)限(SYSDG、SYSOPER、SYSDBA等)被授予或撤銷時(shí),該副本將自動(dòng)刷新,并且任何具有管理員權(quán)限的用戶的密碼發(fā)生更改后,該副本將自動(dòng)刷新。唯一的例外是far sync instances。更新的密碼文件必須手動(dòng)復(fù)制到far sync instances,因?yàn)閒ar sync instances接收重做,但不應(yīng)用它。一旦密碼文件在遠(yuǎn)同步實(shí)例中是最新的,那么在主服務(wù)器上包含密碼更新的重做就會(huì)自動(dòng)傳播到任何準(zhǔn)備far sync instances接收重做的備用數(shù)據(jù)庫(kù)。在應(yīng)用重做時(shí),在備用服務(wù)器上更新密碼文件。

2 實(shí)驗(yàn)

2.1 tnsname.ora 中配置主備庫(kù)的網(wǎng)絡(luò)服務(wù)

PDBCNDBA_P =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.74)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = cndba)
    )
  )
PDBCNDBA_S =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.75)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = cndba)
    )
  )

2.2 修改主庫(kù)sys 用戶密碼  

[oracle@dg1 admin]$ sqlplus sys/PDBCNDBA_P@cndba as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue Aug 15 10:55:49 2017
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> alter user sys identified by oracle_p; 
User altered.
2.3 驗(yàn)證備庫(kù)密碼也跟著改變。
SQL> connect sys/oracle_p@PDBCNDBA_P as sysdba
Connected.
SQL> connect sys/oracle_p@"PDBCNDBA_S" as sysdba
Connected.

3 參考鏈接

http://docs.oracle.com/database/122/NEWFT/new-features.htm#NEWFT-GUID-A6211BAC-0534-44B9-B988-A7CC2B97044F 

https://petesdbablog.wordpress.com/2017/03/11/12-2-new-feature-automatically-synchronize-password-files-in-oracle-data-guard/  

https://uhesse.com/2017/01/10/auto-sync-for-password-files-in-oracle-12c-data-guard/  

ORACLE 12C ASM 新特性:共享密碼文件

在ORACLE 12C之前大家都知道密碼文件是存放在?/dbs或者?/database中,如果要修改修改sysdba權(quán)限的用戶密碼時(shí)候,會(huì)去修改密碼文件,而在rac數(shù)據(jù)庫(kù)的sys密碼文件是存在各個(gè)節(jié)點(diǎn)中,這個(gè)時(shí)候修改sysdba權(quán)限的密碼就需要在兩個(gè)節(jié)點(diǎn)都要做同樣的操作,而對(duì)于數(shù)據(jù)庫(kù)來說本身是只要在一個(gè)節(jié)點(diǎn)上修改即可,因?yàn)槊艽a是記錄在user$中,就是因?yàn)槊艽a文件非共享且在各個(gè)節(jié)點(diǎn)中都有,因此需要在各個(gè)節(jié)點(diǎn)均要執(zhí)行修改密碼命令,確保密碼文件被正常修改。因?yàn)閞ac 密碼文件非共享的機(jī)制存在,導(dǎo)致修改sysdba權(quán)限密碼繁瑣,有些時(shí)候甚至有節(jié)點(diǎn)忘記修改,導(dǎo)致需要使用密碼文件操作數(shù)據(jù)庫(kù)的時(shí)候不能正常進(jìn)行,DG傳輸日志異常等故障。在ORACLE 12C中為了解決這個(gè)問題,引入了密碼文件可以存入ASM新特性,從而使得密碼文件存儲(chǔ)在ASM中實(shí)現(xiàn)所有節(jié)點(diǎn)共享,從而解決該問題. 
ASM存儲(chǔ)密碼文件前提條件 COMPATIBLE.ASM>= 12.1 

查詢ASM信息

SQL>  select * from v$version;

BANNER                                                                               CON_ID

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

Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production              0

PL/SQL Release 12.1.0.1.0 - Production                                                    0

CORE    12.1.0.1.0      Production                                                        0

TNS for Linux: Version 12.1.0.1.0 - Production                                            0

NLSRTL Version 12.1.0.1.0 - Production                                                    0

SQL> select NAME,COMPATIBILITY from v$asm_diskgroup;

NAME                           COMPATIBILITY

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

DATA                           12.1.0.0.0

查詢crs中關(guān)于db配置

[grid@xifenfei ~]$  srvctl config database -d cdb

Database unique name: cdb

Database name: cdb

Oracle home: /u01/app/oracle/product/12.1/db_1

Oracle user: oracle

Spfile: +DATA/cdb/spfilecdb.ora

Password file: 

Domain: 

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: MANUAL

Database instance: cdb

Disk Groups: DATA

Services: 

這里db的password file為空,即表示使用默認(rèn)值,也就是為$ORACLE_HOME/dbs/orapwxifenfei

創(chuàng)建密碼文件存儲(chǔ)在ASM中

--創(chuàng)建db新密碼文件

[oracle@xifenfei ~]$ orapwd file='+data/CDB/orapwdxifenfei' dbuniquename='cdb'

Enter password for SYS: 

----輸入sys用戶密碼

--創(chuàng)建asm新密碼文件

orapwd file='+data/ASM/orapwasm' asm=y

----asm=y 表示創(chuàng)建的密碼文件為asm的

--使用老密碼文件創(chuàng)建db/asm新密碼文件

orapwd input_file='/oraclegrid/dbs/orapwasm' file='+data/ASM/orapwasm' [asm=y]

----input_file 表示使用老的密碼文件創(chuàng)建新的存儲(chǔ)在ASM中的密碼文件

查看ASM中密碼文件

ASMCMD> showversion

ASM version         : 12.1.0.1.0

ASMCMD> pwd

+data/cdb

ASMCMD>  ls -l orapwdxifenfei

Type      Redund  Striped  Time             Sys  Name

PASSWORD  UNPROT  COARSE   MAY 31 19:00:00  N    orapwdxifenfei => +DATA/CDB/PASSWORD/pwdcdb.290.816897265

配置crs中password file項(xiàng)

[grid@xifenfei ~]$ srvctl modify database -db cdb -pwfile  +data/CDB/orapwdxifenfei

查詢crs中關(guān)于db配置

[grid@xifenfei ~]$  srvctl config database -d cdb

Database unique name: cdb

Database name: cdb

Oracle home: /u01/app/oracle/product/12.1/db_1

Oracle user: oracle

Spfile: +DATA/cdb/spfilecdb.ora

Password file: +data/CDB/orapwdxifenfei

Domain: 

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: MANUAL

Database instance: cdb

Disk Groups: DATA

Services: 

至此數(shù)據(jù)庫(kù)啟動(dòng)使用密碼ASM中的密碼文件完成,補(bǔ)充說明,該方式配置在ASM中的密碼文件,只能是通過crs方式啟動(dòng)db才會(huì)生效,如果手工使用sqlplus啟動(dòng)數(shù)據(jù)庫(kù)不會(huì)使用該密碼文件,還是使用默認(rèn)密碼文件。這里也就提醒大家操作規(guī)范: 在RAC環(huán)境(包含單節(jié)點(diǎn)的GI環(huán)境)中,對(duì)數(shù)據(jù)庫(kù)的啟動(dòng)關(guān)閉操作強(qiáng)烈建議使用crs相關(guān)命令來完成,而不推薦使用sqlplus命令

Data Guard Standby Automatic Password file Synchronization in 12.2 (文檔 ID 2307365.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later 
Information in this document applies to any platform. 

GOAL

Automatic Password file synchronization in 12.2 Dataguard Standby database

SOLUTION

When password file is used for Redo Transport Authentication, the password of redo transport user should be same across primary and all its physical and snapshot standby databases. By default SYS user is used to authenticate redo transport sessions when password file is used. 

Till 12cR1 Dataguard setup, if there is a change in password file of Primary database like Changes in password or Changes in admin privileges, then the password file needs to be copied from Primary database to standby database server and rename it according to standby database Instance name. If the password file of Primary and Standby databases are not same, then errors will be seen.

In 12cR2, the password file of standby database gets synchronized automatically when there is a change in Primary database password file. The password file change of Primary will be included in Redo and when the Redo is applied to standby, the synchronization happens in the background.

Exception: Far-sync Instances (where the redo will not be applied). We need to manually copy the password file. Once the password file is sync at Far-Sync instance, the redo having password file information will get transmitted to standby which are suppose to receive from Far-sync instance.

Example:

PRIMARY>select username, sysdba, sysoper, sysasm,sysbackup,authentication_type AT from v$pwfile_users;

USERNAME SYSDB SYSOP SYSAS SYSBA AT 
-------------------- ----- ----- ----- ----- -------- 
SYS TRUE TRUE FALSE FALSE PASSWORD 
SYSDG FALSE FALSE FALSE FALSE PASSWORD 
SYSBACKUP FALSE FALSE FALSE TRUE PASSWORD 
SYSKM FALSE FALSE FALSE FALSE PASSWORD

STANDBY>select username, sysdba, sysoper, sysasm,sysbackup,authentication_type AT from v$pwfile_users;

USERNAME SYSDB SYSOP SYSAS SYSBA AT 
---------- ----- ----- ----- ----- -------- 
SYS TRUE TRUE FALSE FALSE PASSWORD 
SYSDG FALSE FALSE FALSE FALSE PASSWORD 
SYSBACKUP FALSE FALSE FALSE TRUE PASSWORD 
SYSKM FALSE FALSE FALSE FALSE PASSWORD

Let's grant a role to a user at Primary database which will make changes in Password file

PRIMARY>Grant SYSOPER to user1;

Grant succeeded.

PRIMARY>select username, sysdba, sysoper, sysasm,sysbackup,authentication_type AT from v$pwfile_users;

USERNAME SYSDB SYSOP SYSAS SYSBA AT 
-------------------- ----- ----- ----- ----- -------- 
SYS TRUE TRUE FALSE FALSE PASSWORD 
SYSDG FALSE FALSE FALSE FALSE PASSWORD 
SYSBACKUP FALSE FALSE FALSE TRUE PASSWORD 
SYSKM FALSE FALSE FALSE FALSE PASSWORD 
USER1 FALSE TRUE FALSE FALSE PASSWORD

Password file of Primary database:

-rw-r-----. 1 oracle oinstall 4096 /u01/app/oracle/product/12.2.0/dbhome_1/dbs/orapwprimdb

Switch the logfile, so that the Redo reach its standby databases

PRIMARY>alter system switch logfile;

System altered.

At standby Media recovery is not active. Verify v$pwfile_users for the granted role 

STANDBY>select username, sysdba, sysoper, sysasm,sysbackup,authentication_type AT from v$pwfile_users;

USERNAME SYSDB SYSOP SYSAS SYSBA AT 
---------- ----- ----- ----- ----- -------- 
SYS TRUE TRUE FALSE FALSE PASSWORD 
SYSDG FALSE FALSE FALSE FALSE PASSWORD 
SYSBACKUP FALSE FALSE FALSE TRUE PASSWORD 
SYSKM FALSE FALSE FALSE FALSE PASSWORD

Password file of Standby database:

-rw-r-----. 1 oracle oinstall 3584 /u01/app/oracle/product/12.2.0/dbhome_2/dbs/orapwstdbydb

Newly granted role is not reflected in Standby, lets start Media recovery and then query v$pwfile_users.

STANDBY>recover managed standby database disconnect; 
Media recovery complete.


STANDBY>select username, sysdba, sysoper, sysasm,sysbackup,authentication_type AT from v$pwfile_users;

USERNAME SYSDB SYSOP SYSAS SYSBA AT 
---------- ----- ----- ----- ----- -------- 
SYS TRUE TRUE FALSE FALSE PASSWORD 
SYSDG FALSE FALSE FALSE FALSE PASSWORD 
SYSBACKUP FALSE FALSE FALSE TRUE PASSWORD 
SYSKM FALSE FALSE FALSE FALSE PASSWORD 
USER1 FALSE TRUE FALSE FALSE PASSWORD

Password file of standby database:

-rw-r-----. 1 oracle oinstall 4096 /u01/app/oracle/product/12.2.0/dbhome_2/dbs/orapwstdbydb

 We could see after media recovery v$pwfile_users has been updated



oracle數(shù)據(jù)庫(kù)軟件是獲得過最高級(jí)別的安全認(rèn)證,完全超越其它所有數(shù)據(jù)庫(kù)軟件,并且在可維護(hù)性上基于大量的實(shí)踐需要穩(wěn)步前行,這里簡(jiǎn)單列舉幾個(gè)12c 關(guān)于password幾個(gè)新特性。

1. 新的password hash算法 
2. 新的password verify function 
3. 密碼文件可以存儲(chǔ)到ASM 
4. 密碼自動(dòng)從primary同步到standby端在Dataguard環(huán)境中 
5. 新的密碼認(rèn)證協(xié)議

以下將介紹其中幾個(gè)內(nèi)容:

1. 新的password hash算法

Oracle對(duì)Oracle Database 12c中的用戶密碼哈希進(jìn)行了改進(jìn), 通過使用基于PBKDF2的SHA512哈希算法,而不是簡(jiǎn)單的SHA1哈希,密碼哈希更安全, 從11g起user$.spare4列存儲(chǔ)著密碼的哈希值。在12.1.0.2版本時(shí)spare4列有3部分組成(S:H:T).12.2時(shí)只剩下(S:T )2部分。

S部分和11g時(shí)的算法一樣,長(zhǎng)度60 chars,是基于SHA1的哈希。

H部分是基于MD5的哈希,長(zhǎng)度為32 chars, 也可能是因?yàn)镸D5 hash更方便入侵者的暴力破解,在12.2 版本時(shí)從Spare4列去掉該部分。

T部分是從12.1.0.2版本增加,長(zhǎng)度為160 chars, 使用的是基于PBKDF2-based SHA512的算法。該算法后部分32chars 的驗(yàn)證數(shù)據(jù)部分是隨機(jī)生成。更加安全。

2. 新的password verify function

在12c中default profile除了password verify function和11g不同,其它資源限制都是相同的。 
不過國(guó)防安全要求有個(gè)建議值: 
RESOURCE NAME LIMIT 
PASSWORD_LIFE_TIME 60 
PASSWORD_REUSE_TIME 365 
PASSWORD_REUSE_MAX 5 
FAILED_LOGIN_ATTEMPTS 3 
PASSWORD_VERIFY_FUNCTION ora12c_strong_verify_function

12c新引入了verify function 有ora12c_verify_function, ora12c_strong_verify_function (ora12c_stig_verify_function) ,而且可能在12.1.0.1 ,12.1.0.2, 12.2.0.1     profile默認(rèn)的verify function名都不一樣。

比如STIG有以下限制:

  • Password at least 9 characters

  • at least 2 capital letters

  • at least 2 small letters

  • at least 2 digits

  • at least 2 special characters

  • password must differ by at least 4 characters from the old password

3. 密碼文件可以存儲(chǔ)到ASM

在Oracle Database 12c之前,密碼文件始終位于$ ORACLE_HOME / dbs文件下,即使對(duì)于RAC實(shí)例和RAC ASM集群也是如此。 對(duì)于RAC而言,DBA必須設(shè)法保持這一點(diǎn)密碼文件在每個(gè)節(jié)點(diǎn)上同步?,F(xiàn)在,在Oracle 12c中,可以將密碼文件存儲(chǔ)在ASM上。 這意味著一個(gè)共享密碼文件Oracle RAC數(shù)據(jù)庫(kù)為集群中的所有實(shí)例共享,與ASM spfile不同,ASM密碼文件的訪問只有在啟動(dòng)ASM ,并且在磁盤組mount后才可以訪問。用于創(chuàng)建密碼文件的命令實(shí)用程序仍然是相同的:“orapwd”

asmcmd同樣也可以創(chuàng)建密碼文件
$ asmcmd
ASMCMD> pwcreate

ASM存儲(chǔ)密碼文件前提條件 COMPATIBLE.ASM>= 12.1

-- create new password in ASM
orapwd file='+data/ASM/orapwasm' asm=y
-- create new password in ASM from location
orapwd input_file='/oraclegrid/dbs/orapwasm' file='+data/ASM/orapwasm'[asm=y]
-- move password file from A asm diskgroup to another
ASMCMD> pwmove --asm +CRS/asm/password/orapwasm +data/orapwasm

2. 密碼自動(dòng)從primary同步到standby端在Dataguard環(huán)境中

12cR2中一個(gè)有用的增強(qiáng)功能是密碼文件在Data Guard環(huán)境中自動(dòng)同步,如果在primary database上更改了sys的密碼,并且它自動(dòng)也在standby database上進(jìn)行了更改。 在早期版本中必須手動(dòng)完成的,通常通過使用primary database 密碼文件替換standby database上的密碼文件。

5. 新的密碼認(rèn)證協(xié)議
升級(jí)12C注意事項(xiàng): 連接失敗 ORA-28040 ORA-1017
之前寫過關(guān)于認(rèn)證的協(xié)議的。如果你的數(shù)據(jù)庫(kù)是從12c以前的版本升上來的,在升級(jí)時(shí)會(huì)提示去掉SEC_CASE_SENSITIVE_LOGON=FALSE參數(shù)如下,但是如果你沒有去掉SEC_CASE_SENSITIVE_LOGON=FALSE,那么升級(jí)后登錄可以會(huì)遇到ora-1017錯(cuò)誤,即使密碼是正確的,甚至修改在升級(jí)后再修改密碼(新的密碼版本將為”11G 12C”)。解決方法是:change SEC_CASE_SENSITIVE_LOGON=TRUE, –the default.另外注意如果是Data Pump導(dǎo)入創(chuàng)建的用戶,密碼版本會(huì)和導(dǎo)出時(shí)版本一致。
RECOMMENDED ACTIONS
===================
+ Consider removing the following DEPRECATED initialization parameters.
They are not OBSOLETE in version 12.2.0.1.0
but probably will be OBSOLETE in a future release.
Parameter
——————————
sec_case_sensitive_logon
Note:
Oracle notes that the term “version” in the allowed_logon_version_server parameter name refers to the version of the authentication protocol. It does NOT refer to the Oracle release version.
sqlnet.allowed_logon_version_server, depending on the version of the authentication protocol.
sqlnet.allowed_logon_version_server=12a: For Oracle Database 12c Release 1 (12.1) release 12.1.0.2 or later.
sqlnet.allowed_logon_version_server=12: For the critical patch updates CPUOct2012 and later Oracle Database 11g authentication protocols (recommended).
sqlnet.allowed_logon_version_server=11: For Oracle Database 11g authentication protocols (default).
sqlnet.allowed_logon_version_server=10: For Oracle Database 10g authentication protocols.
sqlnet.allowed_logon_version_server=8: For Oracle8i authentication protocol

3. 將主庫(kù)RAC中的密碼文件手動(dòng)拷貝到備庫(kù)中

從主庫(kù)ASM拷貝到文件系統(tǒng)中:

ASMCMD> pwcopy +DATA/HISS/PASSWORD/pwdhis.256.918602833/home/grid/

使用scp或者其它方式拷貝到備庫(kù)的主機(jī)中并重命名為hiss:

$ scp /home/grid/pwdhis.256.91860283310.241.8.9:/home/grid

$ mv pwdhis.256.918602833 orapwhiss

從備庫(kù)文件系統(tǒng)拷貝到ASM中:

ASMCMD> pwcopy /home/grid/orapwhiss +DATA/HISS/PASSWORD/

4. 密碼文件管理 

查詢ASM信息

SQL>  select  * from  v$version;

 

BANNER                                                                           CON_ID

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

Oracle Database  12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production              0

PL/SQL Release 12.1.0.1.0 - Production                                                    0

CORE    12.1.0.1.0      Production                                                        0

TNS for  Linux: Version 12.1.0.1.0 - Production                                            0

NLSRTL Version 12.1.0.1.0 - Production                                                    0

 

SQL> select  NAME,COMPATIBILITY from  v$asm_diskgroup;

 

NAME                            COMPATIBILITY

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

DATA                           12.1.0.0.0

查詢crs中關(guān)于db配置

[grid@orcl ~]$  srvctl config database -d cdb

Database unique name: cdb

Database name: cdb

Oracle home: /u01/app/oracle/product/12.1/db_1

Oracle user: oracle

Spfile: +DATA/cdb/spfilecdb.ora

Password file:

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: MANUAL

Database instance: cdb

Disk Groups: DATA

Services:

這里db的password file為空,即表示使用默認(rèn)值,也就是為$ORACLE_HOME/dbs/orapworcl 

創(chuàng)建密碼文件存儲(chǔ)在ASM中

--創(chuàng)建db新密碼文件

[oracle@orcl ~]$ orapwd file='+data/CDB/orapwdorcl'  dbuniquename='cdb'

 

Enter password for  SYS:

----輸入sys用戶密碼

 

--創(chuàng)建asm新密碼文件

orapwd file='+data/ASM/orapwasm'  asm=y

----asm=y 表示創(chuàng)建的密碼文件為asm的

  

--使用老密碼文件創(chuàng)建db/asm新密碼文件

orapwd input_file='/oraclegrid/dbs/orapwasm'  file='+data/ASM/orapwasm'  [asm=y]

----input_file 表示使用老的密碼文件創(chuàng)建新的存儲(chǔ)在ASM中的密碼文件

查看ASM中密碼文件

ASMCMD> showversion

ASM version         : 12.1.0.1.0

ASMCMD> pwd

+data/cdb

ASMCMD>  ls  -l orapwdorcl

Type      Redund  Striped  Time             Sys  Name

PASSWORD  UNPROT  COARSE   MAY 31 19:00:00  N    orapwdorcl => +DATA/CDB/PASSWORD/pwdcdb.290.816897265

配置crs中password file項(xiàng)

[grid@orcl ~]$ srvctl modify database -db cdb -pwfile  +data/CDB/orapwdorcl

查詢crs中關(guān)于db配置

[grid@orcl ~]$  srvctl config database -d cdb

Database unique name: cdb

Database name: cdb

Oracle home: /u01/app/oracle/product/12.1/db_1

Oracle user: oracle

Spfile: +DATA/cdb/spfilecdb.ora

Password file: +data/CDB/orapwdorcl

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: MANUAL

Database instance: cdb

Disk Groups: DATA

Services:

至此數(shù)據(jù)庫(kù)啟動(dòng)使用密碼ASM中的密碼文件完成。

補(bǔ)充說明,該方式配置在ASM中的密碼文件,只能是通過crs方式啟動(dòng)db才會(huì)生效,如果手工使用sqlplus啟動(dòng)數(shù)據(jù)庫(kù)不會(huì)使用該密碼文件,還是使用默認(rèn)密碼文件。

這里也就提醒大家操作規(guī)范: 在RAC環(huán)境(包含單節(jié)點(diǎn)的GI環(huán)境)中,對(duì)數(shù)據(jù)庫(kù)的啟動(dòng)關(guān)閉操作強(qiáng)烈建議使用crs相關(guān)命令來完成,而不推薦使用sqlplus命令。

感謝各位的閱讀,以上就是“Oracle 12c的ASM新特性是什么”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)Oracle 12c的ASM新特性是什么這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是億速云,小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI