标签云
asm 恢复 asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 kfed MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 ORACLE恢复 Oracle 恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (100)
- 数据库 (1,597)
- DB2 (22)
- MySQL (70)
- Oracle (1,463)
- Data Guard (49)
- EXADATA (7)
- GoldenGate (21)
- ORA-xxxxx (158)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (13)
- ORACLE 21C (3)
- Oracle ASM (65)
- Oracle Bug (7)
- Oracle RAC (47)
- Oracle 安全 (6)
- Oracle 开发 (27)
- Oracle 监听 (27)
- Oracle备份恢复 (530)
- Oracle安装升级 (84)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (75)
- PostgreSQL (17)
- PostgreSQL恢复 (5)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (36)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (19)
-
最近发表
- Oracle 19c/21c最新patch信息-202404
- PostgreSQL恢复系列:pg_filedump批量处理
- PostgreSQL部分主要字典信息
- PostgreSQL恢复系列:pg_filedump恢复字典构造
- PostgreSQL 16 源码安装
- ORA-00742 ORA-00312 恢复
- 数据库open成功后报ORA-00353 ORA-00354错误引起的一系列问题(本质ntfs文件系统异常)
- ORA-600 ktsiseginfo1故障
- ORA-00600: internal error code, arguments: [16703], [1403], [4] 原因
- 最近遇到几起ORA-600 16703故障(tab$被清空),请引起重视
- ORA-600 2662快速恢复之Patch scn工具
- TNS-12518: TNS:listener could not hand off client connection
- ora.storage无法启动报ORA-12514故障处理
- 断电引起文件scn异常数据库恢复
- ORA-16188: LOG_ARCHIVE_CONFIG settings inconsistent with previously started instance
- .[hudsonL@cock.li].mkp勒索加密数据库完美恢复
- 模拟带库实现rman远程备份
- 又一例:ORA-600 kclchkblk_4和2662故障
- Oracle误删除数据文件恢复
- Oracle 19C 备库DML重定向—DML Redirection
月归档:二月 2012
远程访问ASM
一、动态监听
1.监听文件
[oracle@node1 admin]$ more /u01/oracle/network/admin/listener.ora SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /u01/oracle) (PROGRAM = extproc) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0)) ) )
2.监听状态
[oracle@node1 admin]$ lsnrctl status LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 18-JAN-2012 13:38:42 Copyright (c) 1991, 2007, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node1)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production Start Date 18-JAN-2012 13:32:49 Uptime 0 days 0 hr. 5 min. 53 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/oracle/network/admin/listener.ora Listener Log File /u01/oracle/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node1)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM", status BLOCKED, has 1 handler(s) for this service... Service "+ASM_XPT" has 1 instance(s). Instance "+ASM", status BLOCKED, has 1 handler(s) for this service... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "chf" has 1 instance(s). Instance "chf", status READY, has 1 handler(s) for this service... Service "chfXDB" has 1 instance(s). Instance "chf", status READY, has 1 handler(s) for this service... Service "chf_XPT" has 1 instance(s). Instance "chf", status READY, has 1 handler(s) for this service... The command completed successfully
3.客户端tns文件[有部分测试加上了(UR=A)]
vm_asm = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = +ASM) (INSTANCE_NAME = +ASM) (UR=A) #分存在和不存在测试 ) ) vm_chf = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = chf) (INSTANCE_NAME = chf) ) )
4.无测试(UR=A)
C:\Users\XIFENFEI>tnsping vm_asm TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 23-2月 - 2012 22:15:10 Copyright (c) 1997, 2010, Oracle. All rights reserved. 已使用的参数文件: e:\oracle\11_2_0\network\admin\sqlnet.ora 已使用 TNSNAMES 适配器来解析别名 尝试连接 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = +ASM) (INSTANCE_NAME = +ASM))) OK (10 毫秒) C:\Users\XIFENFEI>SQLPLUS sys/xifenfei@vm_asm as sysdba SQL*Plus: Release 11.2.0.1.0 Production on 星期四 2月 23 22:15:14 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. ERROR: ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务 请输入用户名: ERROR: ORA-12560: TNS: 协议适配器错误 请输入用户名: ERROR: ORA-12560: TNS: 协议适配器错误 SP2-0157: 在 3 次尝试之后无法连接到 ORACLE, 退出 SQL*Plus --通过下面的数据库实例测试,证明动态监听是正常工作的,可以访问数据库 C:\Users\XIFENFEI>SQLPLUS sys/xifenfei@vm_chf as sysdba SQL*Plus: Release 11.2.0.1.0 Production on 星期四 2月 23 21:55:03 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select instance_name from v$instance; INSTANCE_NAME ---------------- chf
5.含(UR=A)测试
C:\Users\XIFENFEI>tnsping vm_asm TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 23-2月 - 2012 22:16:49 Copyright (c) 1997, 2010, Oracle. All rights reserved. 已使用的参数文件: e:\oracle\11_2_0\network\admin\sqlnet.ora 已使用 TNSNAMES 适配器来解析别名 尝试连接 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = +ASM) (INSTANCE_NAME = +ASM) (UR=A))) OK (20 毫秒) C:\Users\XIFENFEI>SQLPLUS sys/xifenfei@vm_asm as sysdba SQL*Plus: Release 11.2.0.1.0 Production on 星期四 2月 23 22:16:52 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select instance_name from v$instance; INSTANCE_NAME -------------------------------- +ASM
二、静态监听
1.监听文件
[oracle@node1 admin]$ more listener.ora SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = chf) (ORACLE_HOME = /u01/oracle) (SID_NAME = chf) ) (SID_DESC = (GLOBAL_DBNAME = +ASM) (ORACLE_HOME = /u01/oracle) (SID_NAME = +ASM) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1521)) ) )
2.监听状态
[oracle@node1 admin]$ lsnrctl status LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 18-JAN-2012 13:53:52 Copyright (c) 1991, 2007, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.30)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production Start Date 18-JAN-2012 13:51:48 Uptime 0 days 0 hr. 2 min. 4 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/oracle/network/admin/listener.ora Listener Log File /u01/oracle/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.30)(PORT=1521))) Services Summary... Service "+ASM" has 2 instance(s). Instance "+ASM", status UNKNOWN, has 1 handler(s) for this service... Instance "+ASM", status BLOCKED, has 1 handler(s) for this service... Service "+ASM_XPT" has 1 instance(s). Instance "+ASM", status BLOCKED, has 1 handler(s) for this service... Service "chf" has 2 instance(s). Instance "chf", status UNKNOWN, has 1 handler(s) for this service... Instance "chf", status READY, has 1 handler(s) for this service... Service "chfXDB" has 1 instance(s). Instance "chf", status READY, has 1 handler(s) for this service... Service "chf_XPT" has 1 instance(s). Instance "chf", status READY, has 1 handler(s) for this service... The command completed successfully
3.无(UR=A)测试
C:\Users\XIFENFEI>tnsping vm_asm TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 23-2月 - 2012 22:11:34 Copyright (c) 1997, 2010, Oracle. All rights reserved. 已使用的参数文件: e:\oracle\11_2_0\network\admin\sqlnet.ora 已使用 TNSNAMES 适配器来解析别名 尝试连接 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = +ASM) (INSTANCE_NAME = +ASM))) OK (20 毫秒) C:\Users\XIFENFEI>SQLPLUS sys/xifenfei@vm_asm as sysdba SQL*Plus: Release 11.2.0.1.0 Production on 星期四 2月 23 22:11:06 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select instance_name from v$instance; INSTANCE_NAME -------------------------------- +ASM
4.含(UR=A)测试
C:\Users\XIFENFEI>tnsping vm_asm TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 23-2月 - 2012 22:12:49 Copyright (c) 1997, 2010, Oracle. All rights reserved. 已使用的参数文件: e:\oracle\11_2_0\network\admin\sqlnet.ora 已使用 TNSNAMES 适配器来解析别名 尝试连接 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = +ASM) (INSTANCE_NAME = +ASM) (UR=A))) OK (10 毫秒) C:\Users\XIFENFEI>SQLPLUS sys/xifenfei@vm_asm as sysdba SQL*Plus: Release 11.2.0.1.0 Production on 星期四 2月 23 22:12:53 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select instance_name from v$instance; INSTANCE_NAME -------------------------------- +ASM
5.easy connect访问asm实例
C:\Users\XIFENFEI>SQLPLUS sys/xifenfei@192.168.1.30/+asm as sysdba SQL*Plus: Release 11.2.0.1.0 Production on 星期四 2月 23 22:27:42 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select instance_name from v$instance; INSTANCE_NAME -------------------------------- +ASM
三、总结
1.在动态监听中,只有设置了(UR=A)才能够远程访问ASM实例;
2.在静态监听中,无论是否设置(UR=A)均可远程访问ASM实例,甚至可以使用easy connect方法方法ASM实例。
发表在 Oracle ASM
一条评论
通过netstat+rmsock查找AIX端口对应进程
rmsock除去不包含文件描述符的套接字。它接受 socket、tcpcb、inpcb、ripcb 或 rawcb 地址并将其转换成套接字地址。然后检查每个进程所有打开的文件以查找套接字的匹配。如果没找到匹配,对该套接字执行异常终止操作,而不考虑套接字 linger 选项的存在。套接字保留的端口号释放。如果发现匹配,文件描述符和主进程状态显示给用户。
命令格式:rmsock Address TypeofAddress
[zwq:/]netstat -Aan|grep 6200|grep LISTEN f1000e0000307bb0 tcp4 0 0 *.6200 *.* LISTEN --f1000e0000307bb0 为系统内核地址 [zwq:/]rmsock f1000e0000307bb0 tcpcb The socket 0x307808 is being held by proccess 5701830 (ons). [zwq:/]ps -ef|grep 5701830|grep -v grep oracle10 5701830 5112098 0 Apr 21 - 7:17 /oracle10/app/product/crs/10.2.0/opmn/bin/ons -d
TimesTen命令—ttBackup
ttBackup使用说明
c:\>ttBackup -h Usage: ttBackup [-h | -help | -?] ttBackup [-V | -version] ttBackup -dir <directory> [-type <backupType>] [-fname <fileprefix>] [-force] {<DSN> | [-connstr] <connStr>} options: -h | -help | -? Prints this message and exits. -V | -version Prints the release number and exits. -type <backupType> The type of backup to be performed. Supported backup types are given below. Default is "fileFull". -dir <directory> The directory in which to store the backup files. -fname <fileprefix> The file prefix for the backup files in the backup directory. Default is the base filename portion of the DataStore parameter of the data store to be backed up. -force Destroy existing backup files before performing backup (full file-based backups only). <DSN>, <connStr> The DSN or ODBC connection string of the data store to be backed up. Backup types are: fileFull Full backup to the specified backup directory. The resulting backup is not enabled for incremental backup. This is the default backup type. fileFullEnable Full backup to the specified backup directory. The resulting backup is enabled for incremental backup. fileIncremental Incremental backup. Augments pre-existing backup given by '-dir' and optionally '-fname'. fileIncrOrFull If incremental backup is possible, then behaves like "fileIncremental"; else behaves like "fileFullEnable". NOTE: For above types, '-dir' is required; '-fname' and '-force' are optional. streamFull Full backup to the standard output. '-dir', '-fname' and '-force' are ignored. incrementalStop Does not perform a backup. Disables an incremental-enabled backup. '-dir' is required; '-fname' is optional; '-force' is ignored.
--全备并启动增量备份功能 c:\>ttbackup -dir E:\oracle\timesten\tt_back\full -type fileFullEnable -fname xifenfei01_ -force my_ttdb Backup started ... Backup complete Command> call ttBackupStatus (); < 2, 0, 1, 2012-02-22 23:13:18.125000, 2012-02-22 23:13:18.505000, 0, 11821056,0, 5896 > 1 row found. --增量备份 c:\>ttbackup -dir E:\oracle\timesten\tt_back\full -type fileIncremental -fname xifenfei01_ -force my_ttdb Backup started ... Backup complete Command> call ttBackupStatus (); < 2, 0, 0, 2012-02-22 23:19:24.453000, 2012-02-22 23:19:24.702000, 0, 11825152,0, 3960 > 1 row found. --执行结果 E:\oracle\timesten\tt_back\full>dir 驱动器 E 中的卷没有标签。 卷的序列号是 38D0-2A35 E:\oracle\timesten\tt_back\full 的目录 2012/02/22 23:19 <DIR> . 2012/02/22 23:19 <DIR> .. 2012/02/22 23:13 21,119,936 xifenfei01_.0.bac 2012/02/22 23:19 11,943,936 xifenfei01_.0.bac0 2012/02/22 23:19 696 xifenfei01_.sta 3 个文件 33,064,568 字节 2 个目录 9,432,420,352 可用字节 --补充说明 1.需要使用fileFullEnable启动增量备份 2.增量备份需要指定dir和fname和全备时一致
fileIncrOrFull测试
c:\>ttbackup -dir E:\oracle\timesten\tt_back\full -type fileIncrOrFull -force -fname xifenfei01_ my_ttdb Backup started ... Backup complete Command> call ttBackupStatus (); < 2, 0, 0, 2012-02-22 23:47:57.997000, 2012-02-22 23:47:58.174000, 0, 11880448,0, 5740 > 1 row found. c:\>ttbackup -dir E:\oracle\timesten\tt_back\full -type fileIncrOrFull -force -fname xifenfei00_ my_ttdb Backup started ... Backup complete Command> call ttBackupStatus (); < 2, 0, 1, 2012-02-22 23:53:37.364000, 2012-02-22 23:53:37.753000, 0, 11886592,0, 5076 > 1 row found. --补充说明 在有启用增量备份(启用增量的全备或者增量备份本身)的基础上,会自动进行增量备份; 在无启用增量备份(没有备份或者备份没有启用增量备份)的基础上,如果无则会进行全备
streamFull测试
c:\>ttBackup -type streamFull my_ttdb>E:\oracle\timesten\tt_back\full\xifenfei.tream Backup started ... Backup complete Command> call ttBackupStatus (); < 2, 1, 1, 2012-02-22 23:38:52.480000, 2012-02-22 23:38:52.606000, 0, 11874304,0, 4384 > 1 row found. c:\>dir E:\oracle\timesten\tt_back\full\xifenfei.* 驱动器 E 中的卷没有标签。 卷的序列号是 38D0-2A35 E:\oracle\timesten\tt_back\full 的目录 2012/02/22 23:38 33,064,596 xifenfei.tream 1 个文件 33,064,596 字节 0 个目录 9,399,287,808 可用字节 --补充说明 在linux/unix环境中,执行流备份可以结合dd命令 如:ttBackup -type streamFull FastIns | dd bs=64k of=/dev/rmt0
发表在 TimesTen
评论关闭