RMAN script problem to create logical standby database !
Dear Friends ,
I am using Oracle10g database . I want to create a logical standby database . I create two database :
Primary : orcl
standby : orclsby1
Every steps I followed successfully , but when I am going to create "standby database" from "primary database" using rman then I found the following error :
The script is below which I have to run in Primary (orcl) database :
Script :
run {
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate auxiliary channel stby type disk;
duplicate target database for standby from active database
spfile
parameter_value_convert 'orcl','orclsby1'
set db_unique_name='orclsby1'
set db_file_name_convert='/orcl/','/orclsby1/'
set log_file_name_convert='/orcl/','/orclsby1/'
set control_files='/u01/app/oracle/oradata/orclsby1.ctl'
set log_archive_max_processes='5'
set fal_client='orclsby1'
set fal_server='orcl'
set standby_file_management='AUTO'
set log_archive_config='dg_config=(orcl,orclsby1)'
set log_archive_dest_1='service=orcl ASYNC
valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=orcl'
Problem which I got :
[oracle@localhost DG]$ rman target sys/sys123@orcl auxiliary sys/sys123@orclsby1
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Oct 19 15:58:17 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1227832857)
connected to auxiliary database: ORCLSBY1 (not mounted)
RMAN> @cr_phys_sby1.txt
RMAN> run {
2> allocate channel prmy1 type disk;
3> allocate channel prmy2 type disk;
4> allocate channel prmy3 type disk;
5> allocate channel prmy4 type disk;
6> allocate auxiliary channel stby type disk;
7> duplicate target database for standby from
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "from": expecting one of: "dorecover, db_file_name_convert, nofilenamecheck, ;"
RMAN-01007: at line 7 column 39 file: cr_phys_sby1.txt
I try to edit the above script using 'nofilenamecheck' 'dorecover' etc. , but cannot resolve the problem . Would u plz help me .... where the problem is .
Both databases are running on Oracle10g platform .
Waiting for ur kind reply .. ...
You need to:
- create a SPFILE manually for standby database
- use the RMAN command: DUPLICATE TARGET DATABASE FOR STANDBY
- remove all SPFILE statements from RMAN script.
Similar Messages
-
How to create logical standby database without using Oracle Grid Control
Hi All,
I want to create Logical standby database on 11gr2 on RHEL 5 without using oracle Grid Control.
I already have a primary database as well as physical standby database.
What i want to create a logical standby database as well on the same machine where physical standby database is running.
So anyone of you help me out to do that
Thanks in advanceHi,
Creating a Logical Standby Database
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ls.htm#SBYDB00300
Regards,
Tom -
How to create logical standby database?
Hi,
can i created logical standby database without creating physical stanby database? is it possible?
Thanks,Hi,
Creating a Logical Standby Database
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ls.htm#SBYDB00300
Regards,
Tom -
Creating logical standby database
Hi all,
10.2.0.1
Following this link
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ls.htm
Where do i need to issue these statements:
SQL> EXECUTE DBMS_LOGSTDBY.BUILD;
SQL> ALTER DATABASE RECOVER TO LOGICAL STANDBY db_name;
on physical standby or primary database.
I issued the first stament on primary and second on physical standby .
IN the alert log of standby,i have the following entries.
Wed Jan 20 15:34:28 2010
Converting standby mount to primary mount.
Wed Jan 20 15:34:28 2010
ACTIVATE STANDBY: Complete - Database mounted as primary (treasury)
*** DBNEWID utility started ***
DBID will be changed from 306589979 to new DBID of 330710340 for database
.........................I am trying to create a logical standby database after creating a physical standby database.
It seems standby changed to primary which was not desired.
ThanksNot tried myself, but you might want to have a look at this URL.
It appears to suggest that you need to change names of datafiles as well as value db_name explcitly on standby. -
Problem while creating Physical standby database on remote Server
Hi
I try to create a physical standby datbaase using OEM 10gr2, it is working when I create on same server. No issue but when I try to create same on remote server it is giving below warning and process failing. Please let me know what needs to be down in this senario...
It is showing redo log information in v$log and v$log_file but not creating physically on PHYSICAL Standby instance..
I appriciate your help and ur time too..
These messages are from PRIMARY database alert*.log file
There is space for up to 12 standby redo logfiles
Use the following SQL commands on the standby database to create
standby redo logfiles that match the primary database:
ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl5.f' SIZE 52428800;
WARNING: OMF is enabled on this database. Creating a physical
standby controlfile, when OMF is enabled on the primary
database, requires manual RMAN intervention to resolve OMF
datafile pathnames.
NOTE: Please refer to the RMAN documentation for procedures
describing how to manually resolve OMF datafile pathnames.
Thanks and Regards,
RKWell, it is simply warning that "Creating a physical
standby controlfile, when OMF is enabled on the primary
database, requires manual RMAN intervention to resolve OMF
datafile pathnames.
NOTE: Please refer to the RMAN documentation for procedures
describing how to manually resolve OMF datafile pathnames"
For instance, the path for the logfile name in "ALTER DATABASE ADD STANDBY LOGFILE 'srl5.f' SIZE 52428800" may need to be changed manually. It is advisable to check the mentioned documentation. -
Creation of Logical Standby Database Using RMAN ACTIVE DATABASE COMMAND
Hi All,
I am in confusion how to create logical standby database from primary database using rman active database command.
What i did:-
Create primary database on machine 1 on RHEL 5 with Oracle 11gR2
Create standby database on machine 2 on RHEL 5 With Oracle 11gR2 from primary using RMAN active database command
Trying to create logical standby database on machine 3 on RHEL 5 with Oracle 11gR2 using RMAN active database command from primary.
The point which confuse me is to start the logical standby in nomount mode on machine 3 with which pfile like i create the pfile for standby database do i need to create the pfile for logical standby db.
I done the creation of logical standby database by converting physical standby to logical standby database
I am following the below mentioned doc for the same:
Creating a physical and a logical standby database in a DR environment | Chen Guang's Blog
Kindly guide me how to work over the same or please provide me the steps of the same.
Thanks in advance.Thanks for your reply
I already started the logical standby database with pfile in nomount mode. And successfully completed the duplication of database. by mentioning the DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT parameter.
But i am not able to receive the logs on the above mentioned blog i run the sql command to check the logs but getting "no rows selected"
My primary database pfile is:
pc01prmy.__db_cache_size=83886080
pc01prmy.__java_pool_size=12582912
pc01prmy.__large_pool_size=4194304
pc01prmy.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
pc01prmy.__pga_aggregate_target=79691776
pc01prmy.__sga_target=239075328
pc01prmy.__shared_io_pool_size=0
pc01prmy.__shared_pool_size=134217728
pc01prmy.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/pc01prmy/adump'
*.audit_trail='db'
*.compatible='11.1.0.0.0'
*.control_files='/u01/app/oracle/oradata/PC01PRMY/controlfile/o1_mf_91g3mdtr_.ctl','/u01/app/oracle/flash_recovery_area/PC01PRMY/controlfile/o1_mf_91g3mf6v_.ctl'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle/oradata'
*.db_domain=''
*.db_file_name_convert='/u01/app/oracle/oradata/PC01SBY/datafile','/u01/app/oracle/oradata/PC01PRMY/datafile'
*.db_name='pc01prmy'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=pc01prmyXDB)'
*.fal_client='PC01PRMY'
*.fal_server='PC01SBY'
*.log_archive_config='DG_CONFIG=(pc01prmy,pc01sby,pc01ls)'
*.log_archive_dest_1='LOCATION=/u01/app/oracle/flash_recovery_area/PC01PRMY/ VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pc01prmy'
*.log_archive_dest_2='SERVICE=pc01sby LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pc01sby'
*.log_archive_dest_3='SERVICE=pc01ls LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=pc01ls'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='DEFER'
*.log_archive_dest_state_3='DEFER'
*.log_archive_max_processes=30
*.log_file_name_convert='/u01/app/oracle/oradata/PC01SBY/onlinelog','/u01/app/oracle/oradata/PC01PRMY/onlinelog'
*.open_cursors=300
*.pga_aggregate_target=78643200
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=236978176
*.undo_tablespace='UNDOTBS1'
My logical standby pfile is:-
pc01ls.__db_cache_size=92274688
pc01ls.__java_pool_size=12582912
pc01ls.__large_pool_size=4194304
pc01ls.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
pc01ls.__pga_aggregate_target=79691776
pc01ls.__sga_target=239075328
pc01ls.__shared_io_pool_size=0
pc01ls.__shared_pool_size=125829120
pc01ls.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/pc01ls/adump'
*.audit_trail='db'
*.compatible='11.1.0.0.0'
*.control_files='/u01/app/oracle/oradata/PC01LS/controlfile/o1_mf_91g3mdtr_.ctl','/u01/app/oracle/flash_recovery_area/PC01LS/controlfile/o1_mf_91g3mf6v_.ctl'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle/oradata'
*.db_domain=''
*.db_file_name_convert='/u01/app/oracle/oradata/PC01SBY/datafile','/u01/app/oracle/oradata/PC01PRMY/datafile'
*.db_name='pc01prmy'
*.db_unique_name='pc01ls'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=pc01prmyXDB)'
*.log_archive_config='DG_CONFIG=(pc01prmy,pc01sby,pc01ls)'
*.log_archive_dest_1='LOCATION=/u01/app/oracle/flash_recovery_area/PC01PRMY/ VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=pc01prmy'
*.log_archive_dest_2='LOCATION=/u01/app/oracle/flash_recovery_area/PC01LS/ VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=pc01ls'
*.log_archive_dest_3='SERVICE=pc01ls LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=pc01ls'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_max_processes=30
*.log_file_name_convert='/u01/app/oracle/oradata/PC01SBY/onlinelog','/u01/app/oracle/oradata/PC01PRMY/onlinelog'
*.open_cursors=300
*.pga_aggregate_target=78643200
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=236978176
*.undo_tablespace='UNDOTBS1'
Kindly advice over the same -
Dataguard Problem(logical standby database)
Hi,
I have successfully created logical standby database, and everything is working fine, all of the SQL is applying and archiving is also shipping.
Until I create a new tablespace for e.g. pay in the primary database, and suddenly SQL applying is stopped, but the archive is shipping.
I am using Windows XP SP2 and Oracle 10gRel2.
The contents of AlertLog file are as
Wed Jul 23 22:52:19 2008
Thread 1 cannot allocate new log, sequence 133
Checkpoint not complete
Current log# 3 seq# 132 mem# 0: C:\ORACLE\PRODUCT\10.2.0\ORADATA\IMRAN\REDO03.LOG
Wed Jul 23 22:52:23 2008
Destination LOG_ARCHIVE_DEST_2 is SYNCHRONIZED
Wed Jul 23 22:52:23 2008
Destination LOG_ARCHIVE_DEST_2 no longer supports SYNCHRONIZATION
Wed Jul 23 22:52:23 2008
Thread 1 advanced to log sequence 133 (LGWR switch)
Current log# 1 seq# 133 mem# 0: C:\ORACLE\PRODUCT\10.2.0\ORADATA\IMRAN\REDO01.LOG
Thread 1 cannot allocate new log, sequence 134
Checkpoint not complete
Current log# 1 seq# 133 mem# 0: C:\ORACLE\PRODUCT\10.2.0\ORADATA\IMRAN\REDO01.LOG
Wed Jul 23 22:52:29 2008
Destination LOG_ARCHIVE_DEST_2 is SYNCHRONIZED
Wed Jul 23 22:52:29 2008
Destination LOG_ARCHIVE_DEST_2 no longer supports SYNCHRONIZATION
Wed Jul 23 22:52:29 2008
Thread 1 advanced to log sequence 134 (LGWR switch)
Current log# 2 seq# 134 mem# 0: C:\ORACLE\PRODUCT\10.2.0\ORADATA\IMRAN\REDO02.LOG
Wed Jul 23 22:55:49 2008
Thread 1 cannot allocate new log, sequence 135
Checkpoint not complete
Current log# 2 seq# 134 mem# 0: C:\ORACLE\PRODUCT\10.2.0\ORADATA\IMRAN\REDO02.LOG
Wed Jul 23 22:55:54 2008
Destination LOG_ARCHIVE_DEST_2 is SYNCHRONIZED
Wed Jul 23 22:55:54 2008
Destination LOG_ARCHIVE_DEST_2 no longer supports SYNCHRONIZATION
Wed Jul 23 22:55:54 2008
Thread 1 advanced to log sequence 135 (LGWR switch)
Current log# 3 seq# 135 mem# 0: C:\ORACLE\PRODUCT\10.2.0\ORADATA\IMRAN\REDO03.LOG
When i use this command, the SQL Apply starts again but the tablespace is not created on Logical standby database.
kindly give me a solution.
Thanks in advanced.In Standy database also you need to add TB details for it to recognise Primary DB new TB .
try adding it and retry your operation . -
Error when logical standby database
Hii all,
First time i am creating logical standby database on oracle 10gR2 by oracle doc.
but When i try to create logical standby database it give error
DG 2011-07-11-09:44:24 0 2 755997031 Operation CTL_GET_STATUS cancelled during phase 2, error = ORA-16797
DG 2011-07-11-09:44:24 0 2 755997031 Operation CTL_GET_STATUS cancelled during phase 2, error = ORA-16797
DG 2011-07-11-09:45:24 0 2 0 RSM0: HEALTH CHECK ERROR: ORA-16797: database is not using a server parameter file.
when i try to create spfile from pfile it give error.
ORA-01078 failure in processing initialization parameters.
LRM-00123 invalid character number found in the input file.
Please help
Vaibhav Dixit.Vaibhav Dixit wrote:
stan.__db_cache_size=432013312
stan.__java_pool_size=4194304
stan.__large_pool_size=8388608
stan.__shared_pool_size=163577856
stan.__streams_pool_size=0
*.audit_file_dest='D:\oracle\product\10.2.0/admin/stan/adump'
*.background_dump_dest='D:\oracle\product\10.2.0/admin/stan/bdump'
*.compatible='10.2.0.1.0'
*.control_files='D:\oracle\product\10.2.0/oradata/stan/stan05.ctl'
*.core_dump_dest='D:\oracle\product\10.2.0/admin/stan/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='stan'
*.DB_UNIQUE_NAME='stan'
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(prim,stan)'
*.DB_FILE_NAME_CONVERT='D:\oracle\product\10.2.0\oradata\prim\','D:\oracle\product\10.2.0\oradata\stan\'
*.LOG_FILE_NAME_CONVERT= ’D:\oracle\product\10.2.0\oradata\prim\’,’D:\oracle\product\10.2.0\oradata\stan\’,'D:\oracle\product\10.2.0\flash_recovery_area\prim\ONLINELOG','D:\oracle\product\10.2.0\flash_recovery_area\stan\ONLINELOG'
*.LOG_ARCHIVE_FORMAT='%t_%s_%r.arc'
*.LOG_ARCHIVE_DEST_1= 'LOCATION=D:\oracle\product\10.2.0\flash_recovery_area\stan\ VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=stan'
*.LOG_ARCHIVE_DEST_2= 'SERVICE=prim LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=prim'
*.LOG_ARCHIVE_DEST_3= 'LOCATION=D:\oracle\product\10.2.0\flash_recovery_area\STAN2\ VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=stan'
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_3='ENABLE'
*.REMOTE_LOGIN_PASSWORDFILE='EXCLUSIVE'
*.LOG_ARCHIVE_MAX_PROCESSES=30
*.STANDBY_FILE_MANAGEMENT='AUTO'
*.FAL_SERVER='prim'
*.FAL_CLIENT='stan'
*.db_recovery_file_dest_size=9390363648
*.dispatchers='(protocol=TCP)'
*.job_queue_processes=10
*.nls_territory='INDIA'
*.open_cursors=300
*.pga_aggregate_target=202375168
*.processes=150
*.sga_target=609222656
*.shared_servers=1
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='D:\oracle\product\10.2.0/admin/stan/udump'
*.undo_retention=3600
*.dg_broker_start='TRUE'from
'D:\oracle\product\10.2.0/admin/stan/udump'
please change or replace the forward slash with backward slash in all file locations
to
eg:- 'D:\oracle\product\10.2.0\admin\stan\udump'
and create a spfile from pfile. -
Problem creating physical Standby database with RMAN
Hi All
I am trying to learn oracle dataguard and as part of the process learning creating standby database.
Platform : Sun-Fire-V250 Sparc, Solaris 10
Database Version - Oracle 11R2
I am creating standby database on same server, so directory structure is different.
Following the instructions on Oracle site I managed to create a functional physical standby database. But I am not able to create standby database using RMAN. These are the steps that I followed-
1.Set up all necessary parameters on primary database as done while creating physical standby database manually, eg setting force logging, creating standby logs etc.
2.Edited parameter file on primary database as done while creating manual pysical standby database creation. Some of the changes done are-
On Primary Database:
*.FAL_CLIENT='orcl11020' #Primary database unique name
*.FAL_SERVER='stdby_11' #Standby database unique name
db_file_name_convert='/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020'
log_file_name_convert='/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11/redo_mem','/<dir>/oradata/orcl11020/redo_mem'
standby_file_management=auto
*.log_archive_config='DG_CONFIG=(orcl11020,stdby_11)'
*.log_archive_dest_1='LOCATION=/<dir>/flash_recovery_area/ORCL11020/archivelog
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=orcl11020'
*.log_archive_dest_2='SERVICE=stdby_11 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=stdby_11'
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.LOG_ARCHIVE_FORMAT='%t_%s_%r.arc'
*.LOG_ARCHIVE_MAX_PROCESSES=30
Copied same pfile for standby database and modified following-
*.control_files='/<dir>/oradata/stdby_11/stdby_11.ctl','/<dir>/fra_stdby/stdby_11/stdby_11.ctl'
*.db_name='orcl1102'
*.db_unique_name='stdby_11'
*.FAL_CLIENT='stdby_11'
*.FAL_SERVER='orcl11020'
db_file_name_convert='/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11'
log_file_name_convert='/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020/redo_mem','/<dir>/oradata/stdby_11/redo_mem'
standby_file_management=auto
*.log_archive_dest_1='LOCATION=/<dir>/fra_stdby/STDBY_11/archivelog
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=stdby_11'
*.log_archive_dest_2='SERVICE=orcl11020 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
db_unique_name=orcl11020'
3. Add relevant information in tnsnames.ora and listener.ora files and then restart listener.
3. Created password file with same credential as primary database.
4.Up-to-date RMAN backup of primary database available.
5.Create standby controlfile with rman
While primary database s open (I tried with primary database in mount mode as well)-
$>rman catalog rman/paswd@rman target /
RMAN> BACKUP CURRENT CONTROLFILE FOR STANDBY;
6. Open a new terminal and startup standby database in nomount mode using parameter file created -
$>ORACLE_SID=stdby_11
$>export ORACLE_SID
$>sqlplus / as sysdba
SQL>STARTUP NOMOUNT pfile='<location/initfilename.ora'
SQL>quit
$> rman AUXILIARY / target sys/passwd@orcl11020 catalog rman/passwd@rman
RMAN>DUPLICATE TARGET DATABASE FOR STANDBY DORECOVER;
RMAN finishes without error but archive logs are not being tranported. Looking at the log, following caught my eye-
Error 1017 received logging on to the standby
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
returning error ORA-16191
FAL[client, ARC2]: Error 16191 connecting to orcl11020 for fetching gap sequence
Errors in file /<>dir>/diag/rdbms/stdby_11/stdby_11/trace/stdby_11_arc2_24321.trc:
ORA-16191: Primary log shipping client not logged on standby
Errors in file /<dir>/diag/rdbms/stdby_11/stdby_11/trace/stdby_11_arc2_24321.trc:
ORA-16191: Primary log shipping client not logged on standby
So on both primary and standby I confirmed
SQL> show parameter remote_login_passwordfile
NAME TYPE VALUE
remote_login_passwordfile string EXCLUSIVE
To make double sure that password files are same, I shutdown both databases, delete password files and recreated with same credentials.
Password files are called - orapworcl11020 and orapwstdby_11
Can someone guide me where thisngs are going wrong here please.Not sure if I understood it clearly.
SELECT * FROM V$ARCHIVE_GAP;
returns no rows so there is no gap.
But could you please explain me the result of the previous query. To catch up again, on standby when I check
SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG
SEQUENCE# APPLIED
75 NO
74 NO
76 NO
77 NO
I understand that though archive files have been copied across but they are not applied yet.
On primary when I give your query -
SELECT name as STANDBY,SEQUENCE#,applied, completion_time
2 FROM v$archived_log
3 where dest_id=2
4 and sequence# BETWEEN 74 and 80;
I get -
STANDBY SEQUENCE# APPLIED COMPLETIO
stdby_11 74 YES 28-JUN-11
stdby_11 75 YES 28-JUN-11
stdby_11 76 YES 29-JUN-11
stdby_11 77 YES 29-JUN-11
stdby_11 78 YES 29-JUN-11
stdby_11 79 YES 29-JUN-11
stdby_11 80 YES 29-JUN-11
stdby_11 75 NO 07-JUL-11
stdby_11 74 NO 07-JUL-11
stdby_11 76 NO 07-JUL-11
stdby_11 77 NO 07-JUL-11
stdby_11 78 NO 07-JUL-11
I have intentionally given
sequence# BETWEEN 74 and 80
because I know in the current incarnaion of the database, max sequence is 78.
So my understanding is, the rows between 28-29 June are from previous incarnation, correct me if I am wrong
Archive files of the current incarnation, since I successfully created standby database are shipped but yet to be applied - am I right?
Then my final question is, when will these archives be applied to standby database?
I am sorry to ask too many questions but I am just trying to understand how it all works.
Thanks for your help again -
Creating standby or logical standby database manually?
Hi,
I have to create 4 logical standby databases on a Linux Red Hat 64-bits server.
The primary databases reside on another Linux Red Hat 64-bits server.
The oracle database version is 10.2.0.3.
The question is as follows:
Should I create the logical standby databases manually or should I do it with the Oracle EM Grid Control?
I have read that the creation of standby databases with the Grid Control is very straightforward, but I really want to read of some of your experiences.
I have read that there are some problems in Grid Control with the test of Failover and Switchover.
Please advice.Hi,
It all depends.
I assume you don't backup your database to tape using RMAN.
Do you backup your database to disk using RMAN?
You would need to set up NFS links from your standby server to the primary server.
For this purpose, in 9i, I made sure my disk backup ended up in <directory>/backup/<nodename>, so I could easily set up a NFS link.
If you do it manually, you need to have made a full database RMAN backup first.
Probably Grid Control is taking care of this for you.
I have done it once using database control in 10g. It is really simple, and you just have to click a few buttons and sit back.
Doing it manually is slightly more work: you need to make sure parameters are correct and you need to write a (generic) script of less than 10 lines.
You probably do have more control over it, though RMAN's duplicate database command is robust and can be restarted easily.
I can't answer your last remark.
Hth
Sybrand Bakker
Senior Oracle DBA -
Problem While Creating Physical Standby Using RMAN
Hi Guru's
May be this incidence you all face while creating physical standby DB. I try to create Physical standby database Using RMAN Duplicate Command from one server
(pri machine) to Standby Machine.
The steps i followed to create the above are as follows:
Step 1:- Enable Forced Logging
SQL> ALTER DATABASE FORCE LOGGING;
Step 2:- Configure a Standby Redo Log
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 10
2> ('/oracle/dbs/log1c.rdo','/oracle/dbs/log2c.rdo') SIZE 500M;
Step 3:- Set Primary Database Initialization Parameters
SQL> create pfile='?/dbs/pfileorcl.ora' from spfile;
Edit the pfile to add the standby parameters, here shown:
db_unique_name='orcl'
LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,orcldr)'
LOG_ARCHIVE_DEST_2='SERVICE=orcldr LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcldr'
*.fal_server=orcldr
*.fal_client=orcl
*.standby_file_management=auto
Step 4:- Enable Archiving
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE ARCHIVELOG;
SQL> ALTER DATABASE OPEN;
Step 5:- Setup tnsnames for standby database
This should be done on primary database by altering tnsnames.ora or using NetCA command, and create it by the name orcldr
orcldr =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = standby-svr)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcldr)
Step 6:- Backup database and copy it to standby
This backup script should be run on primary and copied to standby on the same mount point, running this scripts using RMAN, all files under /rman_backup should be copied to /rman_backup on standby server.
$rman target /
RMAN> run
allocate channel c1 type disk;
allocate channel c2 type disk;
backup database format '/rman_backup/%U';
backup archivelog all format '/rman_backup /%U';
backup current controlfile for standby format '/rman_backup/%U';
Step 7:- Standby Database Steps
Installing Oracle Software
This should be same release and patchset with exactly same ORACLE_HOME mount point.
Setting Up listener
Create and start a listener on standby database using NetCA, or creating listener.ora in $ORACLE_HOME/network/admin
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = standby-svr)(PORT = 1521))
Step 8:- Set Standby Database Initialization Parameters
Copying the pfile created in primary database and renames it to initorcldr.ora, and changes these parameters:
db_unique_name='orcldr'
LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcldr,orcl)'
LOG_ARCHIVE_DEST_2='SERVICE=orcl LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl'
*.fal_server=orcl
*.fal_client=orcldr
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
Step 9:- Setup tnsnames for primary database
This should be done on standby database by altering tnsnames.ora or using NetCA command, and create it by the name orcl
orcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = primary-svr)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
Step 10:- Copy a Password File
A password file must be created on the Primary and copied over to the Standby site. The sys password must be identical on both sites. Copy orapworcl to $ORACLE_HOME/dbs and rename file to orapworcldr
Step 11:- Create mount points for Oracle
Mount point should be created on standby server with the same convention used in primary, this includes the location for controlfiles, redo logs, datafiles, archive log destination and alert logs.
$ mkdir -p /u01/app/oracle/oradata/orcl/
$ mkdir -p /u01/app/oracle/flash_recovery_area/
$ mkdir -p /u01/app/oracle/admin/orcl/adump
$ mkdir -p /u01/app/oracle/admin/orcl/bdump
$ mkdir -p /u01/app/oracle/admin/orcl/cdump
$ mkdir -p /u01/app/oracle/admin/orcl/udump
Step 12:- Use RMAN to restore backup and setup standby
Connect to RMAN and execute the following command to create standby database, this should be performed on standby server after copying backup and setting tnsnames.
$ export ORACLE_SID=orcldr
$ rman target sys/tiger@orcl auxiliary sys/tiger@orcldr
RMAN> duplicate target database for standby dorecover;
Here i am getting problem as :
While trying to connect to traget database and auxiliary database i notice that when RMAN is connect to both databases it shows
orcl ( DBID xyz)
orcl (not mounted)
Here in my view the second database must be standby database name or auxiiary db name is standby db name which in my case is orcldr
after this issue i am facing the second issues as :
in command
duplicate target database for standby dorecover;
After modifying the command to
RMAN> duplicate target database to "standby";
rman-05520 database name mismatch
Can u please let me know where i am mistakingok for pri:
db_name=orcl
db_unique_name=orcl
for standby:
db_name=orcl
db_unique_name=sbyorcl ( i change orcldr to sbyorcl later)for new testing
but now what i am getting on
Verify connectivity
On Primary Server:
C:\> lsnrctl stop LISTENERI (working fine)
C:\> lsnrctl start LISTENER (working fine)
C:\> tnsping orcl (working fine)
C:\> tnsping sbyorcl (working fine)
C:\> sqlplus sys/xxxxx@orcl (working fine)
C:\> sqlplus sys/xxxxx@sbyorcl (not working fine)
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
On Standby Server:
C:\>lsnrctl stop LISTENER
C:\> lsnrctl start LISTENER
C:\> tnsping orcl
C:\> tnsping sbyorcl
C:\> sqlplus sys/xxxxx@orcl
C:\> sqlplus sys/xxxxx@sbyorcl
My listner file for pri :-
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(SID_NAME = ORCL)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.129)(PORT = 1521))
tnsnames.ora file on pri is:
sbyorcl =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.128)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = sbyorcl)
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.129)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl)
and listener file on standby :
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(SID_NAME = orcl)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.128)(PORT = 1521))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
and tnsnames.ora file on standby:
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.128)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl)
sbyorcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.202.129)(PORT = 1521))
(CONNECT_DATA =
SERVICE_NAME = sbyorcl)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
Kinldy guide me where i am mistaking it's urgent -
Creating a new schema in a Logical Standby Database
Hi All,
I am experimenting with logical standby databases for the purpose of reporting, and have not been able to create a new schema in the logical standby database - one of the key features of logical standbys.
I have setup primary and logical standby databases, and they seem to be running just fine - changes are moved from the primary to the standby and queries on the standby seem to run ok.
However, If I try to create a new schema on the logical standby, that does not exist on the primary, I get "ORA-01031: insufficient privileges" errors when I try to create new objects.
Show below are the steps I have taken to create the new schema on the logical standby. Any help would be greatly appreciated.
SYS@UATDR> connect / as sysdba
Connected.
SYS@UATDR>
SYS@UATDR> select name, log_mode, database_role, guard_status, force_logging, flashback_on, db_unique_name
2 from v$database
3 /
NAME LOG_MODE DATABASE_ROLE GUARD_S FOR FLASHBACK_ON DB_UNIQUE_NAME
UATDR ARCHIVELOG LOGICAL STANDBY ALL YES YES UATDR
SYS@UATDR>
SYS@UATDR> create tablespace ts_new
2 /
Tablespace created.
SYS@UATDR>
SYS@UATDR> create user new
2 identified by new
3 default tablespace ts_new
4 temporary tablespace temp
5 quota unlimited on ts_new
6 /
User created.
SYS@UATDR>
SYS@UATDR> grant connect, resource to new
2 /
Grant succeeded.
SYS@UATDR> grant unlimited tablespace, create table, create any table to new
2 /
Grant succeeded.
SYS@UATDR>
SYS@UATDR> -- show privs given to new
SYS@UATDR> select * from dba_sys_privs where grantee='NEW'
2 /
GRANTEE PRIVILEGE ADM
NEW CREATE ANY TABLE NO
NEW CREATE TABLE NO
NEW UNLIMITED TABLESPACE NO
SYS@UATDR>
SYS@UATDR> -- create objects in schema
SYS@UATDR> connect new/new
Connected.
NEW@UATDR>
NEW@UATDR> -- prove ability to create tables
NEW@UATDR> create table new
2 (col1 number not null)
3 tablespace ts_new
4 /
create table new
ERROR at line 1:
ORA-01031: insufficient privileges
NEW@UATDR>
NEW@UATDR>HI Daniel,
I appreciate your quick response.
My choice of name may not have been ideal, however changing new to another name - like gav - does not solve the problem.
SYS@UATDR> connect / as sysdba
Connected.
SYS@UATDR>
SYS@UATDR> select name, log_mode, database_role, guard_status, force_logging, flashback_on, db_unique_name
2 from v$database
3 /
NAME LOG_MODE DATABASE_ROLE GUARD_S FOR FLASHBACK_ON DB_UNIQUE_NAME
UATDR ARCHIVELOG LOGICAL STANDBY ALL YES YES UATDR
SYS@UATDR>
SYS@UATDR> create tablespace ts_gav
2 /
Tablespace created.
SYS@UATDR>
SYS@UATDR> create user gav
2 identified by gav
3 default tablespace ts_gav
4 temporary tablespace temp
5 quota unlimited on ts_gav
6 /
User created.
SYS@UATDR>
SYS@UATDR> grant connect, resource to gav
2 /
Grant succeeded.
SYS@UATDR> grant unlimited tablespace, create table, create any table to gav
2 /
Grant succeeded.
SYS@UATDR>
SYS@UATDR> -- show privs given to gav
SYS@UATDR> select * from dba_sys_privs where grantee='GAV'
2 /
GRANTEE PRIVILEGE ADM
GAV CREATE TABLE NO
GAV CREATE ANY TABLE NO
GAV UNLIMITED TABLESPACE NO
SYS@UATDR>
SYS@UATDR> -- create objects in schema
SYS@UATDR> connect gav/gav
Connected.
GAV@UATDR>
GAV@UATDR> -- prove ability to create tables
GAV@UATDR> create table gav
2 (col1 number not null)
3 tablespace ts_gav
4 /
create table gav
ERROR at line 1:
ORA-01031: insufficient privileges
GAV@UATDR> -
Issue in creating the standby database from Active database using RMAN
Hi All,
I am facing issue in creating the standby database from Active database using RMAN and getting the below issue after i executed the duplicate command.
Version of Database:11g(11.2.0.1.0)
Operating System:Linux 5
Error:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/21/2012 17:26:52
RMAN-03015: error occurred in stored script Memory Script
RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Primary Database Entries:
Tnsentry:
SONYPRD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.131)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sonyprd.localdomain)(UR=A)
SONYPRDSTBY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.132)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sonyprdstby)(UR=A)
Listner Entry:
SID_LIST_SONYPRD =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtproc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = SONYPRD)
(GLOBAL_DBNAME = SONYPRD)
Auxiliary Details:
Tns Entry:
SONYPRD =
(DESCRIPTION =
# (ADDRESS = (PROTOCOL = TCP)(HOST = oracle11g.localdomain)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.131)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sonyprd.localdomain)
SONYPRDSTBY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.132)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sonyprdstby)(UR=A)
Listener Entry in auxiliary:
SID_LIST_SONYPRDSTBY =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = SONYPRDSTBY)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = SONYPRDSTBY)
TNSPING from Primary DB:
[oracle@oracle11g ~]$ tnsping sonyprdstby
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 21-DEC-2012 17:39:28
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.132)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = sonyprdstby)(UR=A)))
OK (0 msec)
TNSPING from Auxuliary server
[oracle@oracle11gstby ~]$ tnsping sonyprd
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 21-DEC-2012 17:40:19
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.131)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = sonyprd.localdomain)))
OK (10 msec)
Script Used for duplicate:
run {
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate auxiliary channel stby type disk;
duplicate target database for standby from active database
spfile
parameter_value_convert 'sonyprd','sonyprdstby'
set db_unique_name='sonyprdstby'
set db_file_name_convert='/sonyprd/','/sonyprdstby/'
set log_file_name_convert='/sonyprd/','/sonyprdstby/'
set control_files='/u01/app/oracle/oradata/control01.ctl'
set log_archive_max_processes='5'
set fal_client='sonyprdstby'
set fal_server='sonyprd'
set standby_file_management='AUTO'
set log_archive_config='dg_config=(sonyprd,sonyprdstby)'
set log_archive_dest_2='service=sonyprd ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=sonyprd'
Tried the script from both Primary and auxiliary but no luck
[oracle@oracle11gstby admin]$ rman target sys/welcome@sonyprd auxiliary sys/*****@sonyprdstby
Recovery Manager: Release 11.2.0.1.0 - Production on Fri Dec 21 17:26:24 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: SONYPRD (DBID=3131093559)
connected to auxiliary database: SONYPRD (not mounted)
Listener Status from primary:
[oracle@oracle11g ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 21-DEC-2012 18:08:56
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 20-DEC-2012 17:42:17
Uptime 1 days 0 hr. 26 min. 41 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "sonyprd.localdomain" has 1 instance(s).
Instance "sonyprd", status READY, has 1 handler(s) for this service...
Service "sonyprdXDB.localdomain" has 1 instance(s).
Instance "sonyprd", status READY, has 1 handler(s) for this service...
The command completed successfully
Listener Status from Standby when database bring to Nomount state:
[oracle@oracle11gstby admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 21-DEC-2012 18:11:54
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 21-DEC-2012 16:13:47
Uptime 0 days 1 hr. 58 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/oracle11gstby/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle11gstby)(PORT=1521)))
Services Summary...
Service "sonyprdstby" has 1 instance(s).
Instance "sonyprdstby", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
Please provide any work arounds to proceed further in creating the standby database.
Thanks,
Ram.Pl do not post duplicates - Issue in configuring Standby Database from Active database in 11g by RMAN
-
Creating triggers in a logical standby database
Does anyone know if its possible to create and enable a trigger in a logical standby database on a 'guarded' table? I've been able to create the trigger (as an after insert trigger) and it appears to be valid but it never seems to fire, despite inserts taking place. Are there any other steps involved to activate this, or is it just plain not possible in a logical standby? My primary and logical standby databases are 10.2.0.3
HI Daniel,
I appreciate your quick response.
My choice of name may not have been ideal, however changing new to another name - like gav - does not solve the problem.
SYS@UATDR> connect / as sysdba
Connected.
SYS@UATDR>
SYS@UATDR> select name, log_mode, database_role, guard_status, force_logging, flashback_on, db_unique_name
2 from v$database
3 /
NAME LOG_MODE DATABASE_ROLE GUARD_S FOR FLASHBACK_ON DB_UNIQUE_NAME
UATDR ARCHIVELOG LOGICAL STANDBY ALL YES YES UATDR
SYS@UATDR>
SYS@UATDR> create tablespace ts_gav
2 /
Tablespace created.
SYS@UATDR>
SYS@UATDR> create user gav
2 identified by gav
3 default tablespace ts_gav
4 temporary tablespace temp
5 quota unlimited on ts_gav
6 /
User created.
SYS@UATDR>
SYS@UATDR> grant connect, resource to gav
2 /
Grant succeeded.
SYS@UATDR> grant unlimited tablespace, create table, create any table to gav
2 /
Grant succeeded.
SYS@UATDR>
SYS@UATDR> -- show privs given to gav
SYS@UATDR> select * from dba_sys_privs where grantee='GAV'
2 /
GRANTEE PRIVILEGE ADM
GAV CREATE TABLE NO
GAV CREATE ANY TABLE NO
GAV UNLIMITED TABLESPACE NO
SYS@UATDR>
SYS@UATDR> -- create objects in schema
SYS@UATDR> connect gav/gav
Connected.
GAV@UATDR>
GAV@UATDR> -- prove ability to create tables
GAV@UATDR> create table gav
2 (col1 number not null)
3 tablespace ts_gav
4 /
create table gav
ERROR at line 1:
ORA-01031: insufficient privileges
GAV@UATDR> -
Problem building logical standby database
Hi all,
i am trying to build a logical standby database on platform Sun OS 10/Oracle 10gR2. I am following the Oracle document http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ls.htm#BEIGHEIA
I have created a physical standby database and converting it to a logical standby database. I ensured that my physical Standby is in Sync with primary.
Procedure DBMS_LOGSTDBY.BUILD executes successfully on primary.
The problem is that the command *'alter database recover to logical standby test;'* DOESN'T END. No error in archive log. I have identified the archived redo log that contains the LogMiner dictionary and the starting SCN and applied that archive log on standby. Still the the above command doesn't end.
Any Help is appreciated.SQL> alter database recover to logical standby m2test;
This command doesn't return an sql> prompt. Alert log says it is waiting for log sequence 25. The command is running is for more than 5 hours, but still not competed.
Alertlog:
Thu Feb 5 22:14:25 2009
alter database recover to logical standby m2test
Thu Feb 5 22:14:25 2009
Media Recovery Start: Managed Standby Recovery (mtest)
Thu Feb 5 22:14:25 2009
Managed Standby Recovery not using Real Time Apply
parallel recovery started with 2 processes
Media Recovery Waiting for thread 1 sequence 25
Document says :-
If a dictionary build is not successfully performed on the primary database, this command will never complete.
But the dictionary build on primary is successful.
SQL> execute dbms_logstdby.build;
PL/SQL procedure successfully completed.
I used the following queries and to find which archive log contains dictionary build and made sure that the log archive sequence 22 is applied on standby.
SQL> SELECT NAME FROM V$ARCHIVED_LOG
WHERE (SEQUENCE#=(SELECT MAX(SEQUENCE#)
FROM V$ARCHIVED_LOG
WHERE DICTIONARY_BEGIN = 'YES' AND STANDBY_DEST='NO')); 2 3 4
NAME
/oradata/mtest/archive/mtest_1_22_677975686.arc
SQL> SELECT MAX(FIRST_CHANGE#) FROM V$ARCHIVED_LOG
WHERE DICTIONARY_BEGIN='YES'; 2
MAX(FIRST_CHANGE#)
177407
SQL>
Edited by: user592715 on Feb 6, 2009 3:22 PM
Maybe you are looking for
-
Hi, I need to get only a summary log file that show me records by error. for example if the log file has 5000 error for datatype and 300 for PK violation and 2000 for not null value, the problem that the log will show me this error row by row. can I
-
Error opening images in PSE from Camera RAW
After opening RAW images in Camera Raw and clicking 'Open images' I often receive an error "Could not process request due to program error." On a second, third try I am usually able to open the images. Raw images are from Nikon D5100, Camera RAW vers
-
Viewing pages side by side and split screen
I'm using Pages 5.5.2 and I need to view pages side by side and also compare the content of pages by using a split screen - just like I can do in Word. Any help?
-
I have found two System folders in my document folder. They appear to be identical and add-up to over 13Gb of disk space. Is that where the main System folder should reside? I am trying to clear up space and worry about the fact I may have multiple S
-
How do i tell if i have itunes 32 or 64 bit?
I wanted to know how to tell if I have itunes 32 or 64 bit. I'm not sure how to do this. I started the task manager and it says "itunes.exe 32". Does this mean I have the 32 bit version?