位置:首页 » 技术2 » Oracle 12.1 RAC安装新主机,识别老存储和恢复数据库例子

Oracle 12.1 RAC安装新主机,识别老存储和恢复数据库例子

日期:2016-05-23 阅读:0num
Advertisement

oracle中恢复数据库我相信各位做运维的朋友都有碰到过吧,下面我们来看一篇关于Oracle 12.1 RAC安装新主机,识别老存储和恢复数据库例子,希望对各位有帮助。

具体步骤如下(因为先在12.1中测试,然后才在112.测试,因此这里的测试记录了发现的一些问题和处理方法,而11.2中模拟主机损坏,直接使用了这里的经验,因此没有任何报错信息):
1,安装12.1.0.2的GI软件,如果需要也apply最新的PSU,然后查看磁盘和磁盘组:
[[email protected] ~]$ kfod disks=all ds=true cluster=true status=true
--------------------------------------------------------------------------------
Disk Size Header Path Disk Group User Group
================================================================================
1: 2047 Mb MEMBER /dev/asm-diskb CRSDG grid asmadmin
2: 2047 Mb MEMBER /dev/asm-diskc CRSDG grid asmadmin
3: 2047 Mb MEMBER /dev/asm-diskd CRSDG grid asmadmin
4: 2048 Mb MEMBER /dev/asm-diske DATADG grid asmadmin
5: 2048 Mb MEMBER /dev/asm-diskf DATADG grid asmadmin
6: 2048 Mb MEMBER /dev/asm-diskg DATADG grid asmadmin
7: 3072 Mb MEMBER /dev/asm-diskh DATADG2 grid asmadmin
8: 10240 Mb MEMBER /dev/asm-diski DATADG2 grid asmadmin
--------------------------------------------------------------------------------
ORACLE_SID ORACLE_HOME HOST_NAME
================================================================================
+ASM1 /u01/app/12.1.0.2/grid lunarrac
[[email protected] ~]$
创建ASM的spfile
[[email protected] ~]$ ss
SQL*Plus: Release 12.1.0.2.0 Production on Sun Feb 14 19:08:33 2016

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

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> create pfile='/tmp/asm.pfile' from spfile;

File created.

SQL>
添加磁盘组'CRSDG', 'DATADG', 'DATADG2'
1
SQL> alter system set asm_diskgroups='CRSDG', 'DATADG', 'DATADG2' scope=both;

System altered.

SQL>
查找spfile:
[email protected]+ASM1>SELECT f.group_number, f.file_number, a.name name, f.type type
2 FROM v$asm_file f, v$asm_alias a
3 WHERE f.group_number=a.group_number and f.file_number=a.file_number
4 and f.type='PARAMETERFILE'
5 ORDER BY 1, 2;

GROUP_NUMBER FILE_NUMBER NAME TYPE
---------------- ---------------- ------------------------------------------------------- -------------------------
1 268 spfile.268.903782013 PARAMETERFILE
2 273 spfile.273.892298577 PARAMETERFILE

Elapsed: 00:00:00.16
[email protected]+ASM1>
这里看到有两个spfile,哪一个是我们需要的呢?
或者如果这个存储上有多个数据库时,怎么确定哪个数据库使用哪个spfle?
我们知道ASM内部是使用OMF管理数据文件的,因此,它的命名规则是:
因此,根据dbuniquename我们就可以确定哪个数据库使用哪个spfile。
+group/DB_UNIQUE_NAME/file_type/file_type_tag.file#.incarnation#
文件类型是datafile, controlfile, onlinelog等等
ASMCMD> ls -l
Type Redund Striped Time Sys Name
PARAMETERFILE UNPROT COARSE DEC 25 10:00:00 Y spfile.273.892298577
ASMCMD> pwd
+datadg2/lunar/PARAMETERFILE
ASMCMD>
我们将spifle从ASM中复制到文件系统,然后查看其中信息是否正确:
ASMCMD> cp spfile.273.892298577 /tmp/spfile.273.892298577
copying +datadg2/lunar/PARAMETERFILE/spfile.273.892298577 -> /tmp/spfile.273.892298577
ASMCMD> ls -l
Type Redund Striped Time Sys Name
PARAMETERFILE UNPROT COARSE FEB 14 20:00:00 Y spfile.273.892298577
ASMCMD>
查看spfile
[[email protected] ~]$ strings /tmp/spfile.273.892298577
lunar1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
lunar2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
*._gc_policy_time=0
*._gc_undo_affinity=FALSE
*._index_partition_large_extents='FALSE'
*._optimizer_adaptive_cursor_sharing=FALSE
*._optimizer_extended_cursor_sharing='NONE'
*._optimizer_extended_cursor_sharing_rel='NONE'
*._optimizer_null_aware_antijoin=FALSE
*._optimizer_use_feedback=FALSE
*._partition_large_extents='FALSE'
*._PX_use_large_
pool=TRUE
*._undo_autotune=FALSE
*.audit_file_dest='/u01/app/oracle/admin/lunar/adump'
*.audit_trail='NONE'
*.cluster_database=true
*.compatible='12.1.0.2.0'
*.control_files='+DATADG2/LUNAR/CONTROLFILE/current.257.892295167','+DATADG2/LUNAR/CONTROLFILE/current.258.892295171'
*.db_block_size=8192
*.db_cache_size=52428800
*.db_create_file_dest='+DATADG2'
*.db_domain=''
*.db_name='lunar'
*.db_recovery_file_dest='+DATADG2'
*.db_recovery_file_dest_size=5565m
*.db_writer_processes=2
*.defe
rred_segment_creation=FALSE
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=lunarXDB)'
*.event='28401 trace name context forever,level 1','10949 trace name context forever,level 1'
lunar2.instance_number=2
lunar1.instance_number=1
*.java_pool_size=52428800
*.job_queue_processes=5
*.large_pool_size=10485760
*.log_archive_format='%t_%s_%r.dbf'
*.log_buffer=10305536
*.memory_target=0
*.open_cursors=300
*.parallel_force_local=TRUE
*.parallel_max_servers=30
*.pa
rallel_min_servers=30
*.parallel_servers_target=30
*.pga_aggregate_limit=629145600
*.pga_aggregate_target=360m
*.processes=150
*.remote_login_passwordfile='exclusive'
*.resource_limit=TRUE
*.resource_manager_plan=''
*.session_cached_cursors=30
*.sga_target=0
*.shared_pool_size=419430400
lunar2.thread=2
lunar1.thread=1
lunar2.undo_tablespace='UNDOTBS2'
lunar1.undo_tablespace='UNDOTBS1'
[[email protected] ~]$
这时,启动是数据库会报错:
[[email protected] ~]$ ss

SQL*Plus: Release 12.1.0.2.0 Production on Sun Feb 14 21:05:13 2016

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

Connected to an idle instance.

[email protected]>startup
ORACLE instance started.

Total System Global Area 557842432 bytes
Fixed Size 2926520 bytes
Variable Size 486541384 bytes
Database Buffers 54525952 bytes
Redo Buffers 13848576 bytes
ORA-00205: error in identifying control file, check alert log for more info
[email protected]>
alert中报错如下:
ORACLE_BASE from environment = /u01/app/oracle
Sun Feb 14 21:11:42 2016
ALTER DATABASE MOUNT
Sun Feb 14 21:11:42 2016
This instance was first to mount
Sun Feb 14 21:11:42 2016
NOTE: ASMB mounting group 2 (DATADG2)
Sun Feb 14 21:11:42 2016
ORA-15025: could not open disk "/dev/asm-diskh"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
Sun Feb 14 21:11:42 2016
ORA-15025: could not open disk "/dev/asm-diski"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
NOTE: Disk 0 in group 2 could not be opened.
WARNING: Failed to complete group 2
WARNING: group 2 is being dismounted.
WARNING: ASMB force dismounting group 2 (DATADG2) due to failed mount
SUCCESS: diskgroup DATADG2 was dismounted
NOTE: ASMB mounting group 2 (DATADG2)
Sun Feb 14 21:11:43 2016
ORA-15025: could not open disk "/dev/asm-diskh"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
Sun Feb 14 21:11:43 2016
ORA-15025: could not open disk "/dev/asm-diski"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
NOTE: Disk 0 in group 2 could not be opened.
WARNING: Failed to complete group 2
WARNING: group 2 is being dismounted.
WARNING: ASMB force dismounting group 2 (DATADG2) due to failed mount
SUCCESS: diskgroup DATADG2 was dismounted
Sun Feb 14 21:11:43 2016
ORA-00210: cannot open the specified control file
ORA-00202: control file: '+DATADG2/LUNAR/CONTROLFILE/current.258.892295171'
ORA-17503: ksfdopn:2 Failed to open file +DATADG2/LUNAR/CONTROLFILE/current.258.892295171
ORA-15001: diskgroup "DATADG2" does not exist or is not mounted
ORA-15040: diskgroup is incomplete
ORA-00210: cannot open the specified control file
ORA-00202: control file: '+DATADG2/LUNAR/CONTROLFILE/current.257.892295167'
ORA-17503: ksfdopn:2 Failed to open file +DATADG2/LUNAR/CONTROLFILE/current.257.892295167
ORA-15001: diskgroup "DATADG2" does not exist or is not mounted
ORA-15040: diskgroup is incomplete
ORA-205 signalled during: ALTER DATABASE MOUNT...
Sun Feb 14 21:12:07 2016
Decreasing number of real time LMS from 1 to 0
根据报错信息,我们知道,是因为oracle没有访问asm磁盘组的权限造成的,因此需要修改oracle权限:
[[email protected] ~]$ $ORACLE_HOME/bin/setasmgidwrap o=/u01/app/oracle/product/12.1.0.2/dbhome_1/bin/oracle
[[email protected] ~]$ ls -lrt /u01/app/oracle/product/12.1.0.2/dbhome_1/bin/oracle
-rwsr-s--x 1 oracle asmadmin 323762276 Feb 14 18:15 /u01/app/oracle/product/12.1.0.2/dbhome_1/bin/oracle
[[email protected] ~]$
再次mount数据库,依然报错:
[email protected]>alter database mount;
alter database mount
*
ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info
Elapsed: 00:00:17.22
[email protected]>
报错信息如下:
alter database mount
Sun Feb 14 21:18:10 2016
This instance was first to mount
Process O000 died, see its trace file
Sun Feb 14 21:18:12 2016
NOTE: ASMB mounting group 2 (DATADG2)
Process O000 died, see its trace file
Sun Feb 14 21:18:16 2016
ORA-15025: could not open disk "/dev/asm-diskh"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
Sun Feb 14 21:18:19 2016
ORA-15025: could not open disk "/dev/asm-diski"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
NOTE: Disk 0 in group 2 could not be opened.
WARNING: Failed to complete group 2
Sun Feb 14 21:18:24 2016
WARNING: group 2 is being dismounted.
WARNING: ASMB force dismounting group 2 (DATADG2) due to failed mount
SUCCESS: diskgroup DATADG2 was dismounted
NOTE: ASMB mounting group 2 (DATADG2)
Sun Feb 14 21:18:26 2016
ORA-15025: could not open disk "/dev/asm-diskh"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15040: diskgroup is incomplete
ORA-15040: diskgroup is incomplete
Sun Feb 14 21:18:26 2016
ORA-15025: could not open disk "/dev/asm-diski"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
NOTE: Disk 0 in group 2 could not be opened.
WARNING: Failed to complete group 2
WARNING: group 2 is being dismounted.
WARNING: ASMB force dismounting group 2 (DATADG2) due to failed mount
SUCCESS: diskgroup DATADG2 was dismounted
Sun Feb 14 21:18:26 2016
ORA-00210: cannot open the specified control file
ORA-00202: control file: '+DATADG2/LUNAR/CONTROLFILE/current.258.892295171'
ORA-17503: ksfdopn:2 Failed to open file +DATADG2/LUNAR/CONTROLFILE/current.258.892295171
ORA-15001: diskgroup "DATADG2" does not exist or is not mounted
ORA-15040: diskgroup is incomplete
ORA-00210: cannot open the specified control file
ORA-00202: control file: '+DATADG2/LUNAR/CONTROLFILE/current.257.892295167'
ORA-17503: ksfdopn:2 Failed to open file +DATADG2/LUNAR/CONTROLFILE/current.257.892295167
ORA-15001: diskgroup "DATADG2" does not exist or is not mounted
ORA-15040: diskgroup is incomplete
ORA-205 signalled during: alter database mount
...
Process m000 died, see its trace file
Process m001 died, see its trace file
Process m000 died, see its trace file
Process m000 died, see its trace file
Process m001 died, see its trace file
Process m000 died, see its trace file
具体的trace文件如下:
Trace file /u01/app/oracle/diag/rdbms/lunar/lunar1/trace/lunar1_m000_14358.trc
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/12.1.0.2/dbhome_1
System name: Linux
Node name: lunarrac
Release: 3.8.13-44.1.1.el6uek.x86_64
Version: #2 SMP Wed Sep 10 06:10:25 PDT 2014
Machine: x86_64
Instance name: lunar1
Redo thread mounted by this instance: 0 <none>
Oracle process number: 0
Unix process pid: 14358, image:
*** 2016-02-14 21:20:01.641
Died during process startup with error 27140 (seq=94)
OPIRIP: Uncaught error 27140. Error stack:
ORA-27140: attach to post/wait facility failed
ORA-27300: OS system dependent operation:invalid_egid failed with status: 1
ORA-27301: OS failure message: Operation not permitted
ORA-27302: failure occurred at: skgpwinit6
ORA-27303: additional information: startup egid = 6000 (oinstall), current egid = 5000 (asmadmin)
~
这里看到,应该是数据库还是不能访问磁盘组,将磁盘组注册到ocr中的过程如下:
SQL> alter diskgroup datadg mount
Sun Feb 14 21:42:56 2016
NOTE: cache registered group DATADG 2/0x4BA26F20
NOTE: cache began mount (first) of group DATADG 2/0x4BA26F20
NOTE: Assigning number (2,1) to disk (/dev/asm-diskf)
NOTE: Assigning number (2,2) to disk (/dev/asm-diskg)
NOTE: Assigning number (2,0) to disk (/dev/asm-diske)
Sun Feb 14 21:43:02 2016
NOTE: GMON heartbeating for grp 2 (DATADG)
GMON querying group 2 at 17 for pid 30, osid 19564
Sun Feb 14 21:43:02 2016
NOTE: cache is mounting group DATADG created on 2015/10/05 07:49:39
NOTE: cache opening disk 0 of grp 2: DATADG_0000 path:/dev/asm-diske
NOTE: 02/14/16 21:43:02 DATADG.F1X0 found on disk 0 au 10 fcn 0.0 datfmt 1
NOTE: cache opening disk 1 of grp 2: DATADG_0001 path:/dev/asm-diskf
NOTE: 02/14/16 21:43:02 DATADG.F1X0 found on disk 1 au 10 fcn 0.0 datfmt 1
NOTE: cache opening disk 2 of grp 2: DATADG_0002 path:/dev/asm-diskg
NOTE: 02/14/16 21:43:02 DATADG.F1X0 found on disk 2 au 10 fcn 0.0 datfmt 1
Sun Feb 14 21:43:02 2016
NOTE: cache mounting (first) normal redundancy group 2/0x4BA26F20 (DATADG)
Sun Feb 14 21:43:02 2016
* allocate domain 2, invalid = TRUE
Sun Feb 14 21:43:03 2016
NOTE: attached to recovery domain 2
Sun Feb 14 21:43:03 2016
* validated domain 2, flags = 0x0
NOTE: cache recovered group 2 to fcn 0.73
NOTE: redo buffer size is 256 blocks (1056768 bytes)
Sun Feb 14 21:43:03 2016
NOTE: LGWR attempting to mount thread 1 for diskgroup 2 (DATADG)
NOTE: LGWR found thread 1 closed at ABA 11.22 lock domain=0 inc#=0 instnum=1
NOTE: LGWR mounted thread 1 for diskgroup 2 (DATADG)
Sun Feb 14 21:43:03 2016
NOTE: LGWR opened thread 1 (DATADG) at fcn 0.73 ABA 12.23 lock domain=2 inc#=2 instnum=1 gx.incarn=1268936480 mntstmp=2016/02/14 21:43:03.557000
Sun Feb 14 21:43:03 2016
NOTE: cache mounting group 2/0x4BA26F20 (DATADG) succeeded
NOTE: cache ending mount (success) of group DATADG number=2 incarn=0x4ba26f20
Sun Feb 14 21:43:03 2016
NOTE: Instance updated compatible.asm to 12.1.0.0.0 for grp 2
Sun Feb 14 21:43:03 2016
SUCCESS: diskgroup DATADG was mounted
Sun Feb 14 21:43:03 2016
SUCCESS: alter diskgroup datadg mount
Sun Feb 14 21:43:04 2016
NOTE: diskgroup resource ora.DATADG.dg is online
WARNING: unknown state for diskgroup resource ora.DATADG.dg, Return Value: 3
再次查看,ocr中已经包含了这些磁盘组
[[email protected] ~]# crsctl status res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRSDG.dg
ONLINE ONLINE lunarrac STABLE
ora.DATADG.dg
ONLINE ONLINE lunarrac STABLE
ora.DATADG2.dg
ONLINE ONLINE lunarrac STABLE
ora.LISTENER.lsnr
ONLINE ONLINE lunarrac STABLE
ora.asm
ONLINE ONLINE lunarrac Started,STABLE
ora.net1.network
ONLINE ONLINE lunarrac STABLE
ora.ons
ONLINE ONLINE lunarrac STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE lunarrac STABLE
ora.MGMTLSNR
1 ONLINE ONLINE lunarrac 169.254.52.98 192.16
8.60.56,STABLE
ora.cvu
1 ONLINE ONLINE lunarrac STABLE
ora.lunarrac.vip
1 ONLINE ONLINE lunarrac STABLE
ora.mgmtdb
1 OFFLINE OFFLINE STABLE
ora.oc4j
1 ONLINE ONLINE lunarrac STABLE
ora.scan1.vip
1 ONLINE ONLINE lunarrac STABLE
--------------------------------------------------------------------------------
[[email protected] ~]#
将数据库注册到ocr中:
在12.1中如果沿用11.2的配置数据库命令,那么数据库可以启动,但是可以发现配置信息是有问题的:
例如,“Database name: lunarrac”这里显示lunarrac是我的主机名,而数据库名是lunar,因此使用112.的命令注册数据库到ocr会有其他未知问题
建议,在不同版本,根据不同版本的命令进行注册。
[[email protected] ~]$ srvctl add database -d lunar -n lunarrac -o $ORACLE_HOME -p +datadg2/lunar/PARAMETERFILE/spfile.273.892298577 -s OPEN -y AUTOMATIC -a "CRSDG,DATADG,DATADG2" -t IMMEDIATE
[[email protected] ~]$ srvctl config database -d lunar
Database unique name: lunar
Database name: lunarrac
Oracle home: /u01/app/oracle/product/12.1.0.2/dbhome_1
Oracle user: oracle
Spfile: +datadg2/lunar/PARAMETERFILE/spfile.273.892298577
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: CRSDG,DATADG,DATADG2
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oinstall
Database instances:
Configured nodes:
Database is administrator managed
[[email protected] ~]$
检查crs状态,数据库已经注册进去了:
[[email protected] ~]# crsctl status res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRSDG.dg
ONLINE ONLINE lunarrac STABLE
ora.DATADG.dg
ONLINE ONLINE lunarrac STABLE
ora.DATADG2.dg
ONLINE ONLINE lunarrac STABLE
ora.LISTENER.lsnr
ONLINE ONLINE lunarrac STABLE
ora.asm
ONLINE ONLINE lunarrac Started,STABLE
ora.net1.network
ONLINE ONLINE lunarrac STABLE
ora.ons
ONLINE ONLINE lunarrac STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE lunarrac STABLE
ora.MGMTLSNR
1 ONLINE ONLINE lunarrac 169.254.52.98 192.16
8.60.56,STABLE
ora.cvu
1 ONLINE ONLINE lunarrac STABLE
ora.lunar.db
1 OFFLINE OFFLINE STABLE
ora.lunarrac.vip
1 ONLINE ONLINE lunarrac STABLE
ora.mgmtdb
1 OFFLINE OFFLINE STABLE
ora.oc4j
1 ONLINE ONLINE lunarrac STABLE
ora.scan1.vip
1 ONLINE ONLINE lunarrac STABLE
--------------------------------------------------------------------------------
[[email protected] ~]#
启动数据库:
[[email protected] ~]$ srvctl start database -d lunar
[[email protected] ~]$
.
[[email protected] ~]# crsctl status res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRSDG.dg
ONLINE ONLINE lunarrac STABLE
ora.DATADG.dg
ONLINE ONLINE lunarrac STABLE
ora.DATADG2.dg
ONLINE ONLINE lunarrac STABLE
ora.LISTENER.lsnr
ONLINE ONLINE lunarrac STABLE
ora.asm
ONLINE ONLINE lunarrac Started,STABLE
ora.net1.network
ONLINE ONLINE lunarrac STABLE
ora.ons
ONLINE ONLINE lunarrac STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE lunarrac STABLE
ora.MGMTLSNR
1 ONLINE ONLINE lunarrac 169.254.52.98 192.16
8.60.56,STABLE
ora.cvu
1 ONLINE ONLINE lunarrac STABLE
ora.lunar.db
1 ONLINE ONLINE lunarrac Open,STABLE
ora.lunarrac.vip
1 ONLINE ONLINE lunarrac STABLE
ora.mgmtdb
1 OFFLINE OFFLINE STABLE
ora.oc4j
1 ONLINE ONLINE lunarrac STABLE
ora.scan1.vip
1 ONLINE ONLINE lunarrac STABLE
--------------------------------------------------------------------------------
[[email protected] ~]#
在挂完老存储后,还需要检查口令文件,如果有必要,需要重新给sys和system授予sysdba,sysoper权限,以便使用操作系统认证方式登录数据库。

相关文章
  • Oracle 12.1 RAC安装新主机,识别老存储和恢复数据库例子

    oracle中恢复数据库我相信各位做运维的朋友都有碰到过吧,下面我们来看一篇关于Oracle 12.1 RAC安装新主机,识别老存储和恢复数据库例子,希望对各位有帮助. 具体步骤如下(因为先在12.1中测试,然后才在112.测试,因此这里的测试记录了发现的一些问题和处理方法,而11.2中模拟主机损坏,直接使用了这里的经验,因此没有任何报错信息): 1,安装12.1.0.2的GI软件,如果需要也apply最新的PSU,然后查看磁盘和磁盘组: [[email protected] ~]$ kfod disk

  • 12.1RAC 系列-安装新主机,识别老存储和恢复数据库

    联系:QQ(5163721) 标题: 12.1RAC 系列-安装新主机,识别老存储和恢复数据库 作者:Lunar©版权所有[文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.] 在11.2中模拟主机损坏,使用重新安装新主机识别老存储并恢复数据库.这里的测试也同样是模拟主机损坏,安装新主机识别老存储来恢复数据库,不同之处在于,这里假设老存储的ocr和vf是保存在单独的crsdg的,客户没有新的磁盘来创建新的crsdg,因此,我们需要将最前面的3块盘(除去sda后,是sdb~sdd)使用d

  • oracle中11.2 RAC安装新主机,识别老存储-3-配置老存储的数据库

    本文章来为各位介绍一篇关于oracle 11.2 RAC安装新主机,识别老存储-3-配置老存储的数据库的例子,希望文章对各位有帮助. 安装Oracle 11.2.0.4数据库软件,然后执行root.sh,这个没有特别的东西,略. 之后,我们需要修改ORACLE RDBMS的oracle二进制文件的权限,让oracle 数据库进程可以获取ASM磁盘组. [[email protected] ~]# su - grid [[email protected] ~]$ $ORACLE_HOME/bin/setasmgidwra

  • oracle 11.2 RAC 系列-安装新主机,识别老存储-1-识别ASM磁盘

    下面我们一起来看一篇关于oracle 11.2 RAC 系列-安装新主机,识别老存储-1-识别ASM磁盘的例子,希望文章对各位同学会有帮助. 在有些场景下,RAC环境中如果主机出现问题,比如硬件故障等,不能启动,我们需要尽快存储上的启动数据库,恢复业务,那么就需要迁移以前的RAC环境到新的主机环境下,我测试了11.2和12.1的RAC,恢复过程还是很快的,基本上就是安装软件的过程,如果真实场景恢复业务,有两种方法: 1,按照我这里的方法重新安装主机,恢复RAC和数据库 2,如果之前有可用的操作系

  • oracle 11.2 RAC 系列安装新主机,识别老存储-2-准备识别数据库

    本文章来为各位介绍一篇关于oracle 11.2 RAC 系列安装新主机,识别老存储-2-准备识别数据库,希望文章能够帮助到各位朋友. 假设原来的主机已经完全不能启动了(比如硬件故障等),只能在存储上的ASM中查找数据库使用的参数文件: [[email protected] ~]$ ss SQL*Plus: Release 11.2.0.4.0 Production on Mon Feb 15 21:48:15 2016 Copyright (c) 1982, 2013, Oracle. All right

  • Oracle 12.1 RAC 配置第二个网络和相应的SCAN2例子

    本文章来为各位介绍一篇关于Oracle 12.1 RAC 配置第二个网络和相应的SCAN2例子,希望这篇教程能够帮助到各位朋友. 在配置ADG或者使用oracle 的集群管理应用的HA时(比如OGG),我们可能希望使用不同的网络,以避免ADG传输日志等对主生产网络的造成影响. 从11.2开始,我们可以使用crs管理多个网络资源(缺省只有network1),但是SCAN只能在多个网络中的一个上活动(缺省是network1,后续可以指定到不同网络上). 然后,我们通常会配置专门为ADG传输日志的ne

  • ORACLE中没有参数文件和控制文件怎么通过rman恢复数据库

    ORACLE中没有参数文件和控制文件如何通过rman恢复数据库 场景: 一个DEV告诉我生产环境下某个用户的表都看不到了,需要恢复,而此时生产库上存储自动备份的参数文件控制文件的磁盘目录文件坏块,所以导致rman备份的只有数据文件和归档日志文件,这种情况下,如何在测试服务器上利用rman恢复数据呢?google了很多资料,咨询了朋友,恢复过程如下: 前期准备工作: 事先查询好先查询下原来的数据文件路径 SQL> select name from v$datafile; NAME --------

  • ORACLE中没有参数文件和控制文件如何通过rman恢复数据库

    场景: 一个DEV告诉我生产环境下某个用户的表都看不到了,需要恢复,而此时生产库上存储自动备份的参数文件控制文件的磁盘目录文件坏块,所以导致rman备份的只有数据文件和归档日志文件,这种情况下,如何在测试服务器上利用rman恢复数据呢?google了很多资料,咨询了朋友,恢复过程如下: 前期准备工作: 事先查询好先查询下原来的数据文件路径 SQL> select name from v$datafile; NAME ----------------------------------------

  • 【脚本】使用VBOX在Oracle Enterprise Linux 五上安装 Oracle Database 12c RAC 12.1.0.1

    [脚本]使用VBOX在Oracle Enterprise Linux 5上安装 Oracle Database 12c RAC 12.1.0.1 使用VBOX在Oracle Enterprise Linux 5上安装 Oracle Database 12c RAC 12.1.0.1 Oracle数据库十分的复杂,尤其是在不同的平台或存储安装一套完善的Oracle DB考验的不仅是一个人的技术水平,更是考验技术人员的耐心以及细心程度.其中,需要掌握太多的IT技术领域的知识,包括但不限于硬件,网络,

  • oracle 12c rac安装acfs文件系统教程 oracle 12c rac安装acfs文件系统教程

    本文章来为各位介绍一篇关于oracle 12c rac安装acfs文件系统教程,这篇文章介绍的比较仔细了各位可以慢慢收藏看哦 这篇文章介绍了如何在一个已经安装12c rac的虚拟机上,如何建立acfs文件系统,并且利用acfs snapshot刷一个COW(Copy-On-Write)库出来做测试库. Highlight Step: 一.给虚拟机增加asm盘,以便建立acfs文件系统 二.创建acfs文件系统 三.在节点1创建数据库在acfs文件系统上.(12c支持数据文件,控制文件,日志文件等

  • Oracle RAC安装过程中遇到的“坑”和关键点(二) Oracle RAC安装过程中遇到的“坑”和关键点(二)

    Oracle RAC安装过程中碰到的"坑"和关键点(二) (1) 依赖包的安装 Linux下安装Oracle,除了系统配置参数,我觉得依赖包的安装是另一个比较琐碎的操作. 本次安装碰到了几个包的问题: (a) rpm -Uvh gcc-4*提示: 02. error: Failed dependencies: 03. cloog-ppl >= 0.15 is needed by gcc-4.4.7-4.el6.x86_64 04. cpp = 4.4.7-4.el6 is nee

  • Oracle Database 11g R2 在Oracle Linux 6.3跟Ubuntu 12.04的安装 Oracle Database 11g R2 在Oracle Linux 6.3跟Ubuntu 12.04的安装

    Oracle Database 11g R2 在Oracle Linux 6.3和Ubuntu 12.04的安装 Oracle Database很难装.在微博上看到,有人说如果装好Oracle的数据库,其他数据库就很简单了.除了MySQL,我没装过其他,所以不知道.. Oracle Linux Server 6.3: 既然是Oracle的产品,Oracle Linux应该是被支持的平台之一.Oracle Database 11g Release 2 (11.2) Installation On

  • 12.12号----rac安装的大略流程

    12.12号----rac安装的大概流程 1.download software 2.Vmware Server Installation 3.Operating System Installation 4.Clone the Virtual machine 5.Create Shared Disks 6.Attach the shared Disks 7.Check NetWork and Shared Disks 8.ClusterWare Installation 9.CRS PatchS

  • oracle 10g rac安装报错集锦

    oracle 10g rac安装报错汇总 删除crs 1. 停止资源:关闭crs资源:crsctl stop resources 关闭crs: crsctl stop crs 2. 使用脚本:两个节点root.delete.sh, rootdeinstall.sh 3. 删除启动项: rm/etc/oracle/* rm -f/etc/init.d/init.cssd rm -f /etc/init.d/init.crs rm -f/etc/init.d/init.crsd rm -f/etc/

  • Oracle RAC安装过程中遇到的“坑”和关键点(一) Oracle RAC安装过程中遇到的“坑”和关键点(一)

    Oracle RAC安装过程中碰到的"坑"和关键点(一) 在物理机上使用虚机搭建RAC环境时碰到了很多"坑"和关键点,这里慢慢一一回味总结下. 物理机:Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz,8G内存 虚拟机软件:VMware ServerVersion 2.0.2 数据库软件:Oracle 11.2.0.1.Grid 虚机操作系统:Oracle Linux 6.2 虚机安装规划:本地硬盘20G,内存2G,共享磁盘共有4块:

  • Ubuntu 12.04 32bit 安装Oracle 11g 及常见异常 Ubuntu 12.04 32bit 安装Oracle 11g 及常见异常

    Ubuntu 12.04 32bit 安装Oracle 11g 及常见错误 1. 更新 在root用户下安装依赖项--------------针对Ubuntu12.04 32bit sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install gcc make binutils libc6 libc6-dev lesstif2 rpm libmotif3 libstdc++5 libaio1 libaio-dev build

  • oracle rac 安装异常整理 oracle rac 安装异常整理

    oracle rac 安装错误整理. 今天是2014.05.26,离别N久的博客今天继续使用.最近一直忙着离职.入职另外加上家的网一直没有交费,弄的自己开始不那么安稳.学习就是需要一种心情平静.内心稳妥的去进行. 因换笔记本,特需要重新搭建Rac环境,这几篇日志整理一下,我在安装过程中遇到的错误,可能以前我整理过其他的问题,而这是我本次遇到的. 实验环境: virtual box+ Oracle 11.2.0.4 + ASM (Openfiler)+ oracle linux 6.4 问题一:在

  • Oracle 11g R2 RAC高可用联接特性 – SCAN详解

    Oracle 11g R2 RAC高可用连接特性 – SCAN详解 昨天帮朋友解决11g RAC SCAN问题,当时为这朋友简单解答了一些SCAN特性相关的问题,但我知道这仅仅是一小部分. Oracle从11g开始推出SCAN特性可不是我解答那样简单的,SCAN特性在Oracle RAC高可用连接里占据着非常重要的地位,也是以后的重点推进方向. 昨天处理完问题比较晚自己又比较累,所以没有整理出SCAN特性相关资料,今天就抽出点时间把SCAN高可用连接特性介绍出去. 说在前头:文章中核心内容来自官

  • RAC安装时急需执行4个脚本及意义

    RAC安装时需要执行4个脚本及意义 RAC安装时需要执行4个脚本 1) $ORACLE_BASE/oraInventory/orainstRoot.sh (clusterware 结束时执行) 2) $CRS_HOME/root.sh (clusterware 结束时执行) 3) $CRS_HOME/bin/vipca.sh(该脚本是在第二个节点执行$CRS_HOME/root.sh时被自动调用) 4) $ORACLE_HOME/root.sh (安装完数据库以后执行) 1. orainstRo

  • RAC安装时需要执行4个脚本及意义

    RAC安装时需要执行4个脚本 1) $ORACLE_BASE/oraInventory/orainstRoot.sh (clusterware 结束时执行) 2) $CRS_HOME/root.sh (clusterware 结束时执行) 3) $CRS_HOME/bin/vipca.sh(该脚本是在第二个节点执行$CRS_HOME/root.sh时被自动调用) 4) $ORACLE_HOME/root.sh (安装完数据库以后执行) 1. orainstRoot.sh 脚本 1.1 orain

最新文章
  • 有多少童鞋读过APUE

    最近一直在看APUE,想深入学习一下操作系统相关的知识. 想问一下有多少童鞋完整看完apue的? --cut-- darasion在2012-07-18 14:50:2回答到: 在读. 感觉看完不一定都能理解, 经常用才好. qianleilei在2012-07-18 14:54:0回答到: @darasion 也有这种感觉. hq5261984在2012-07-18 17:29:3回答到: 国内基本用不上. haohaolee在2012-07-18 17:35:2回答到: 还没读完.APUE虽

  • 做技术 的做了这么久,终于让我见识到厉害的人了

    一个人搞定了网站,包括iphone ,android, 交易接口. 代码量复杂程度包含go,C++, nodejs.即使用 fackbook 的包装React. 问题是客户端包括windows,mac,linux ,GO和C++写的客户端. 并且知识丰富了得啊. 问题是这些技术一个搞定. 在这里默默的 不需要融资,不需要融资,不需要任何融资,吊炸了. 并且年龄不是很大. 忘了说,从来没有在任何公司工作过.炸了. 这种人工资多少啊在市场上,谁能说清楚些. --cut-- zonghua在2016-

  • 5 个 Inbox 邀请

    5个Inbox邀请,需要的留下邮箱 --cut-- s5s5在2014-11-14 08:58:2回答到: [email protected] lj6684在2014-11-14 08:59:5回答到: [email protected] TKS woorz在2014-11-14 09:00:0回答到: [email protected] thx vivia在2014-11-14 09:00:5回答到: [email protected] tks lujq在2014-11-14 09:02:3回答到: @s5s5

  • 萨摩耶分娩注意事项 萨摩耶分娩注意事项

    萨摩耶怀孕60天之后就要分娩了,朋友你做好准备了吗?狗狗分娩是值得重视的大事情,下面淘狗网来给大家分享一些萨摩耶狗狗分娩的注意事项. 首先在萨摩耶分娩之前要准备好产房,毛巾,温水,剪刀等工具等待狗狗分娩,在萨摩耶分娩前1天,母犬表现紧张不安,性情急躁,外阴部肿大,乳房膨大红润,可挤出白色乳汁,子宫颈和阴道变软并逐步开张,水晶状透明黏液流出,并有少量血液.母犬多在凌晨和傍晚产仔,因而应留心观察. 现在看下分娩过程,萨摩耶分娩时会横卧.回顾腹部,出现努责.呻吟.呼吸加快,然后伸长后腿,阴户有稀薄液体

  • 解析php curl_setopt 函数的相关应用及介绍

    一.要想使用curl_setopt 这个函数必须在服务器里边进行编译curl这个组件,怎么安装编译这个组件请具体到google搜索二.curl_setopt的php帮助文档的解释bool curl_setopt (int ch, string option, mixed value) curl_setopt()函数将为一个CURL会话设置选项.option参数是你想要的设置,value是这个选项给定的值. 下列选项的值将被作为长整形使用(在option参数中指定): CURLOPT_INFILE

  • 价值十万的兰博基尼手机 刷上雷电OS让它物有所值 价值十万的兰博基尼手机 刷上雷电OS让它物有所值

    兰博基尼TL688是世界上最贵的手机,在京东商城售价12万8千元.这部超贵的手机虽然在材质和工艺上达到了顶级水准,但"然并卵"的是,手机搭载的却是容易被人诟病的安卓系统.不过最近土豪们发现了一个好办法,刷上雷电OS可以让它物有所值. 图:兰博基尼TL688是世界上最贵的手机,在京东商城售价12万8千元 据了解,兰博基尼TL688配备了2英寸QVGA的屏幕,300万像素.支持视频录制的后置摄像头,同时还有一个前置摄像头.此外这款手机还具备4GB内置存储空间,支持GPRS/EDGE连接.作

  • 《永恒之塔》新手入门-操作设置

    游戏操作可以更改,以下为默认快捷键 鼠标操作 键盘操作一 键盘操作二 移动 角色向前移动 左键单击 W ↑ 角色向后移动 S ↓ 角色向左移动 Q ← 角色向右移动 E → 角色向左前移动 W+A 角色向右前移动 W+D 角色向左后移动 S+A 角色向右后移动 S+D 跳跃 SPACE(空格键) 动作 跑步/行走 切换 . 休息(坐)/正常(站)切换 , 自动跑步 NumLock 与NPC对话 左键双击/右键单击 使用道具 购买/出售物品 与锁定目标交易 右键单击目标呼出菜单 Shift+T 邀

  • 收集一些JAVA实习生面试值得注意的有关问题

    收集一些JAVA实习生面试值得注意的问题 JAVA实习生面试题收集--稻草人 大三找实习时,在面试中面试官会问到一些基础的问题,这里略作总结. 1.Java Servlet部分 什么是Servlet:Servlet是按照Servlet规范编写的,运行在服务器端的Java类. 维基百科 写道 Java Servlet是用Java编写的服务器端程序.其主要功能在于交互式地浏览和修改数据,生成动态Web内容.狭义的Servlet是指Java语言实现的一个接口,广义的Servlet是指任何实现了这个Se

  • 《NBA 2K16》MT模式争霸赛99星攻略 《NBA 2K16》MT模式争霸赛99星攻略

    想要知道在<NBA 2K16>MT模式争霸赛中每关如何3星通关吗?球员该怎么选择呢?想要知道有什么方法技巧吗?今天小编给大家带来<NBA 2K16>MT模式争霸赛99星攻略及球员推荐,希望大家喜欢. 一分钱没花现在的阵容 刷星方法: 1.主要是刷背身分数,注意是背身分数不是背打,在上篮或者投篮的同时按下L2背身按键,会触发背身然后瞬间完成主要动作,主要扣篮会变成上篮,急停跳投,命中后会加5分背身分数,最后加成背身也有100多. 2.罚球要满10个命中越高分越多,三分不建议投,到后面

  • Android系统做了哪些优化

    Android系统做了哪些优化? Android系统框架和上层应用是类java(不是正统的sun java)开发的,实现了自己的java虚拟机dalvik,既然用java虚拟机和java开发,一般都会认为效率低下.其实不然,在基本主流的智能手机的软件平台上,android的执行速度是最快的. 那么android效率为什么这么的高呢?特别是一个应用程序的启动时间很短,本文主要从以下个八方面进行分析: 1. 资源文件的优化读取. 我们知道android在UI开发时有个很大的好处是xml文件来描述UI

热门推荐