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.
Thanks

Not 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.

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 advance

    Hi,
    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

  • 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.

  • 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.

  • 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>

  • 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>

  • Creating new tables in Logical Standby database

    Hi
    I have a requirement to create new tables in logical standby database. These tables will not be present on primary database. Is it possible to do this ?
    I have a new schema already created which has the privilege to CREATE new table.
    I have stopped the logical standby apply.
    When I am now trying to create a new table but it is failing with error : insufficient privileges.
    When I am trying to run below statement on new schema it is also failing with error of insufficient privileges.
    alter session disable dataguard;
    Please help.

    user8819121 wrote:
    Thanks Mahir,
    I was able to create the table after logging in as sysdba.
    But I need my user on that table to execute DML statements. My user has privileges to insert,delete and update any table.
    I tried the following statements to disable the guard but it is sill not working
    ALTER DATABASE GUARD STANDBY.
    Do I need to skip the tables created using dbms_logstdby package to not making it part of SQL Apply ? I guess not since the table is not in primary database.
    Amit
    You can skip only on primary, your created schema on Standby is not in primary.
    Then you must change Status of data guard to NONE. NONE is means is not any security on your data.
    In Guard status NONE can change all schema data.
    Please check link: http://docs.oracle.com/cd/E11882_01/server.112/e10700/manage_ls.htm#CHDGFGHG
    Following tests on user created before guard status is change from ALL to STANDBY.
    C:\Users\Administrator>sqlplus / as sysdba
    SQL> conn test/test
    Connected.
    SQL> select table_name from user_tables;
    TABLE_NAME
    T
    SQL> insert into t values(22);
    insert into t values(22)
    ERROR at line 1:
    ORA-16224: Database Guard is enabled
    SQL> conn / as sysdba
    Connected.
    SQL> select guard_Status from  v$database;
    GUARD_S
    ALL
    SQL> alter  database guard standby;
    Database altered.
    SQL> conn test/test
    Connected.
    SQL> insert into t values(1);
    insert into t values(1)
    ERROR at line 1:
    ORA-16224: Database Guard is enabled
    SQL> conn / as sysdba
    Connected.
    SQL> select guard_Status from  v$database;
    GUARD_S
    STANDBY
    SQL> alter  database guard none;
    Database altered.
    SQL> select guard_Status from  v$database;
    GUARD_S
    NONE
    SQL> conn test/test
    Connected.
    SQL> insert into t values(1);
    1 row created.
    SQL> commit;
    Commit complete.And Now I want share with you new tests :)
    Now user creating when after guard status change
    SQL> drop  user test cascade;
    User dropped.
    SQL> select guard_status from v$database;
    GUARD_S
    STANDBY
    SQL> create user test identified by test;
    User created.
    SQL> grant create session,  resource, create table to test;
    Grant succeeded.
    SQL> conn test/test
    Connected.
    SQL> create table t (n number);
    Table created.
    SQL> insert into t values(1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>It means when guard status is ALL then all of user created guarding.
    When you changed status to STANDBY then Logical Standby guard only primary schema and created schema before change.
    NONE is not guard any schema. it means you can delete standby schema data too.
    Regards
    Mahir M. Quluzade
    Edited by: Mahir M. Quluzade on Apr 19, 2013 4:07 PM

  • Create an Object in Logical standby database in Oracle 10G

    Hi,
    I have logical standby database in oracle 10g R2 for reporting purpose.Now i want to create procedure in logical standby which is use to create new temp table in logical standby and contained data generated from select operation on existing table.
    Can i create a new user in logical standby database,add new tablespace in logical standby which can insert,update and delete data in standby database base table?
    kindly provide me the steps to implement all this.What will be effect if i set guard_Status in v$database is NONE in logical standby?
    Thanks,
    Shital Patel

    Hi Shital,
    Guard_status protects the data from being changed.
    ALL- By default it is not possible for a non-privileged user to modify data on a data guard SQL apply database. This is because the database guard is automatically set to ALL.
    With this level of security, only SYS user can modify the data.
    STANDBY- When you set this level of security, users are able to modify data that is not maintained by the Logical apply engine.
    NONE permits any users to access the standby database as long as they have correct privileges. This is the normal security for all data in the database.
    You can change the guard status value from ALL to NONE in order to allow non-privileged users to modify data and Yes you can create user and extra tablespace in logical standby database..this is what the one of advantage of using Logical standby database.
    SQL> ALTER DATABASE GUARD NONE;
    Thanks

  • Create table on Logical Standby Database

    Dear DBAs,
    here is my situation;
    1. My primary database (where the tables' owner is "ICC" having a DBA) is used for insert/update transactions.
    2. The logical stdby DB (dataguard structure with MAX availability) is used to generate reports, after updating some tables owned by the same user "ICC". note that these tables are excluded from the replication.
    3. The developers might need to create this kind of tables to generate another kind of reports.
    The issue is that when the standby apply is enabled or disabled, the user ICC is not able to create a new table, it gives ORA-01031: insufficient privileges. note that it's not practical to ask the DBA to disable the "APPLY" at any table creation.
    Do you have an idea about how to resolve.
    My database is 10gR2 path.10.2.0.4.0 on Windows 2003
    Thank you in advance

    If you stop applying log on the logical standby you can easily create a table over there. See oracle docs. The following list shows >how to re-create a table and restart SQL Apply on that table:
    >
    Stop SQL Apply:
    SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;
    Ensure no operations are being skipped for the table in question by querying the DBA_LOGSTDBY_SKIP view:
    SQL> SELECT * FROM DBA_LOGSTDBY_SKIP;
    ERROR STATEMENT_OPT OWNER NAME PROC
    N SCHEMA_DDL HR EMPLOYEES
    N DML HR EMPLOYEES
    N SCHEMA_DDL OE TEST_ORDER
    N DML OE TEST_ORDER
    Because you already have skip rules associated with the table that you want to re-create on the logical standby >database, you must first delete those rules. You can accomplish that by calling the DBMS_LOGSTDBY.UNSKIP >procedure. For example:
    SQL> EXECUTE DBMS_LOGSTDBY.UNSKIP(stmt => 'DML', -
    schema_name => 'HR', - object_name => 'EMPLOYEES');SQL> EXECUTE DBMS_LOGSTDBY.UNSKIP(stmt >=> 'SCHEMA_DDL', -
    schema_name => 'HR', - object_name => 'EMPLOYEES');
    Re-create the table HR.EMPLOYEES with all its data in the logical standby database by using the >DBMS_LOGSTDBY.INSTANTIATE_TABLE procedure. For example:
    SQL> EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE(shema_name => 'HR', -
    object-_name => 'EMPLOYEES', -
    dblink => 'BOSTON');
    Start SQL Apply:
    SQL> ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;Regards.

  • Steps on Creating a Logical Standby Database

    Hi,
    I want to create a Logical Standby Database using 9.2.0.6. Anybody having steps of creating the same?
    Regards,
    Tushar

    A good start from here
    http://download-uk.oracle.com/docs/cd/A97630_01/server.920/a96653/createls.htm
    Cheers
    http://fiedizheng.blogspot.com/

  • 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

  • Logical Standby Database in NOARCHIVE Mode

    Hi,
    I have configured a Logical Standby Database for Reporting purposes. A Physical Standby Database is running for MAA. i.e. in case of Role Transition (switch/Failover) the Physical Stdby Db will get the role of the Primary.
    The logical standby database is creating a lot of Archive Redologs files, nearly every minute. Redolog files are 50MB and there is no work done in db during the time. I'm NOT using Standby Redolog files.
    Is there a need for logical standby database to be in NOARCHIVELOG mode? The Primary is definatley in ARCHIVELOG mode.
    Thanks for any responses.
    regards
    Sahba

    hi,
    well there are two things to the above:-
    1. there was an archive file nearly every minute:
    this is due to a db recovery. for some reason, the db was in inconsistent state, after a sudden shutdownof the OS. I was on a test environment, on windows vista, unfortunately. unimportant ... a reboot solved it.
    2. Logical standby db in NOARCHIVE MODE when setup for the purpose of Reporting.
    As long as the MAA configured for the primary db, such as physical standby db, and a second, the logical standby db setup purely for the purpose of reporting, which then can run with NOARCHIVELOG mode, after converting the physical standby db to logical.
    logical standby db uses Streams architecture, so this method brings cost, time and performance advantages to the customer.
    regards
    Sahba

Maybe you are looking for

  • Cannot download movies using "Check for Available Downloads"

    I was downloading a few movies to watch when iTunes crashed. After starting it back up again, I tried to use the Store->Check for Available Downloads option. I keep getting the error message "Unable to check for available downloads. The network conne

  • Listing all users in a group

    Hi guys, I need to write some code that returns a list of Users that belong to a particular group, using pt 5. This has been asked in lots of different posts but no answer has been given. There must be a way to do this somehow. Should I be doing an I

  • Xorg.conf ---good file required

    Just newly installed OELinux4.7 & dispaly is very big, trying to set it if someone has good xorg.conf or fix this can help.... [root@ora-lab2 /]# cd /etc/X11 [root@ora-lab2 X11]# cat xorg.conf # Xorg configuration created by system-config-display Sec

  • IChat, Photo Booth, FaceTime camera not working

    Upgraded to Lion, waited for the update.01.  Camera is not working in any program.  Tryed the SMU reset with no effect.

  • Checking Network Configuration Requirements - Not Executed

    DBAs, My server runs on RHEL4. I have configured eth0 after installation of RHEL with a static IP and my server is not on network. While installing the oracle10g R2 network configuration check is not executed. if i check the box and continue, install