newspapers database pending recovery isn't getting used

Hi guys,.

I use oracle 10g R2 on RHEL5.i have created a database of watch on the same host as my primary database.

all goes well, some time before, but suddenly the same error came

ORA-00341: log thread 5 1, fake newspaper # 1 in the header
ORA-00312: wire 5 1 online journal: ' / u01/app/standby/std_data/redo05.log'

How this error is I always get...

and also my standby redo logs also don't get used.when I run following command on primary I get following error:

SQL > select group #, sequence #, archived, status
2 from v$ standby_log;

# SEQUENCE # ARC STATUS GROUP
---------- ---------- --- ----------
5 0 UNASSIGNED YES
6 0 UNASSIGNED YES
7 0 UNASSIGNED YES
some time before everything is going well, but I turn on some primary newspapers.

What is the problem there?

I don't know what happening.the gud things I saw in the file logs are

-User is valid
Thu Jan 1 15:11:01 2009
RFS [8]: assigned to the RFS 27930 process
Thu Jan 1 15:11:01 2009
RFS [9]: assigned to the RFS 27951 process
Thu Jan 1 15:11:01 2009
Again shipping customer logged in as PUBLIC
Thu Jan 1 15:11:01 2009
Again shipping customer logged in as PUBLIC
Thu Jan 1 15:11:01 2009
-User is valid
Thu Jan 1 15:11:01 2009
RFS [10]: assigned to the RFS 27923 process
Thu Jan 1 15:11:01 2009
«RFS [8]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
-User is valid
Thu Jan 1 15:11:01 2009
Again shipping customer logged in as PUBLIC
Thu Jan 1 15:11:01 2009
RFS [11]: assigned to the RFS 27944 process
Thu Jan 1 15:11:01 2009
-User is valid
Thu Jan 1 15:11:01 2009
«RFS [11]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
RFS [12]: assigned to the RFS 27955 process
«RFS [10]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
Again shipping customer logged in as PUBLIC
Thu Jan 1 15:11:01 2009
Again shipping customer logged in as PUBLIC
Thu Jan 1 15:11:01 2009
-User is valid
Thu Jan 1 15:11:01 2009
-User is valid
Thu Jan 1 15:11:01 2009
RFS [13]: assigned to the process RFS 27965
Thu Jan 1 15:11:01 2009
RFS [14]: assigned to the RFS 27942 process
Thu Jan 1 15:11:01 2009
«RFS [13]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
«RFS [14]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
Again shipping customer logged in as PUBLIC
Thu Jan 1 15:11:01 2009
Again shipping customer logged in as PUBLIC
Thu Jan 1 15:11:01 2009
-User is valid
Thu Jan 1 15:11:01 2009
-User is valid
Thu Jan 1 15:11:01 2009
RFS [15]: assigned to the process RFS 27974
Thu Jan 1 15:11:01 2009
RFS [16]: assigned to the RFS 27936 process
Thu Jan 1 15:11:01 2009
«RFS [15]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
«RFS [16]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
-User is valid
RFS [17]: assigned to the RFS 27959 process
«RFS [17]: Type of database called a ' standby' physical «»
«RFS [12]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
-User is valid
RFS [18]: assigned to the RFS 27934 process
«RFS [18]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
-User is valid
Thu Jan 1 15:11:01 2009
-User is valid
Thu Jan 1 15:11:01 2009
RFS [19]: assigned to the process RFS 27953
Thu Jan 1 15:11:01 2009
RFS [20]: assigned to the RFS 27947 process
Thu Jan 1 15:11:01 2009
-User is valid
Thu Jan 1 15:11:02 2009
RFS [21]: assigned to the RFS 27972 process
Thu Jan 1 15:11:02 2009
«RFS [20]: Type of database called a ' standby' physical «»
«RFS [21]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
-User is valid
Thu Jan 1 15:11:02 2009
RFS [22]: assigned to the RFS 27970 process
«RFS [22]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
«RFS [3]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
«RFS [2]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:01 2009
«RFS [9]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:02 2009
«RFS [19]: Type of database called a ' standby' physical «»
Thu Jan 1 15:11:05 2009
RFS [8]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_11_674825865.arc'
Thu Jan 1 15:11:06 2009
RFS [17]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_19_674825865.arc'
Thu Jan 1 15:11:08 2009
RFS [2]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_2_674825865.arc'
Thu Jan 1 15:11:12 2009
RFS [10]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_3_674825865.arc'
Thu Jan 1 15:11:12 2009
RFS [19]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_15_674825865.arc'
Thu Jan 1 15:11:17 2009
RFS [5]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_22_674825865.arc'
Thu Jan 1 15:11:17 2009
RFS [6]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_17_674825865.arc'
Thu Jan 1 15:11:25 2009
RFS [9]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_21_674825865.arc'
Thu Jan 1 15:11:47 2009
RFS [7]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_9_674825865.arc'
Thu Jan 1 15:12:25 2009
RFS [14]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_12_674825865.arc'
Thu Jan 1 15:12:27 2009
RFS [11]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_20_674825865.arc'
Thu Jan 1 15:12:45 2009
RFS [21]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_7_674825865.arc'
Thu Jan 1 15:13:10 2009
RFS [12]: archived log: ' / u01/app/standby/std_data/stdarchive/1_16_674825865.arc'
Thu Jan 1 15:13:34 2009
RFS [3]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_8_674825865.arc'
Thu Jan 1 13:15:44 2009
RFS [13]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_18_674825865.arc'
Thu Jan 1 15:13:56 2009
RFS [18]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_14_674825865.arc'
Thu Jan 1 15:14:01 2009
RFS [20]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_13_674825865.arc'
Thu Jan 1 15:14:08 2009
RFS [16]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_10_674825865.arc'
Thu Jan 1 15:14:58 2009
CRAT: Controlfile unavailable enqueue
Thu Jan 1 15:14:59 2009
RFS [1]: Controlfile unavailable enqueue
Thu Jan 1 15:15:03 2009
Errors in the /u01/app/standby/std_data/bdump/standby_arct_27832.trc file:
ORA-16146: destination ensures control unavailable file enqueue
Thu Jan 1 15:15:03 2009
Errors in the /u01/app/standby/std_data/udump/standby_rfs_27919.trc file:
ORA-16146: destination ensures control unavailable file enqueue
Thu Jan 1 15:16:37 2009
Recovery Media Log /u01/app/standby/std_data/stdarchive/1_21_674825865.arc
Thu Jan 1 15:17:53 2009
Recovery Media Log /u01/app/standby/std_data/stdarchive/1_22_674825865.arc
Thu Jan 1 15:18:36 2009
Media, recovery waiting for thread 1 sequence 23
Thu Jan 1 15:18:43 2009
RFS [4]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_4_674825865.arc'
Thu Jan 1 15:18:46 2009
RFS [15]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_5_674825865.arc'
Thu Jan 1 15:18:46 2009
RFS [22]: Archived Log: ' / u01/app/standby/std_data/stdarchive/1_6_674825865.arc'
Thu Jan 1 15:23:07 2009
alter database open read only
Thu Jan 1 15:23:07 2009
ORA-1154 marked during: alter database open read-only...
Thu Jan 1 15:24:51 2009
ALTER database recover managed standby database cancel
Thu Jan 1 15:24:51 2009
MRP0: Background Media Recovery cancelled with status 16037
Thu Jan 1 15:24:51 2009
Errors in the /u01/app/standby/std_data/bdump/standby_mrp0_27859.trc file:
ORA-16037: user has requested the cancellation of the managed recovery
Recovery interrupted!
Thu Jan 1 15:24:53 2009
Waiting for pid MRP0 27859 to terminate
Thu Jan 1 15:24:53 2009
Errors in the /u01/app/standby/std_data/bdump/standby_mrp0_27859.trc file:
ORA-16037: user has requested the cancellation of the managed recovery
Thu Jan 1 15:24:53 2009
MRP0: Background Media Recovery process (standby)
Waiting for pid MRP0 27859 to terminate
Thu Jan 1 15:24:55 2009


Please help do not know what to do?

Thanks and greetings
VD

Hello
In your previous post I told you. Have you checked that?
Reset you the primary journal number.so sequence that does not match with your physical standby DB control sequence file number. Re-create the standby control file.

ORA-00341:
=================================
Cause: The internal information in an online log file does not match the control file.
Action: Restore the right file or search newspapers.
=================================

Kind regards!

Tags: Database

Similar Questions

  • Can we take a backup of database pending?

    Hello

    Can we take backup of database pending when the don't use no DataGuard? If Yes, can I restore that backup of my primary database?

    Oracle 11.2.0.3 Standard

    Kind regards

    Melo.

    Rafael Melo says:

    Jhon,

    Thank you for your quick response. I just did not understand clearly what that means "not being able to depend on RMAN to follow...» ». Please, can you explain that?

    OBS.: the first time that you intend to use on the eve of the database.

    Kind regards

    Melo - Br

    Think of the RMAN Repository. How one will distinguish between files that are part of the primary and which are part of the manual standby? In a Data Guard environment, he can, because you can save all db_unique_names. You do not have this feature with an old manual.

  • Crash when updates at shutdown lead Error message 'one of the files in the registry database had to be recovered by use of one newspaper or another copy. Recovery succeeded. »

    Yesterday, I was using my laptop at the farm level is critical. When I stopped him, 9 updates began to occur when closing. Unfortunately, the laptop ran out of battery before that update has been completed. When I rebooted the professional windows xp, an error message "one of the files in the registry database had to be recovered by use of one newspaper or another copy. Recovery succeeded. "came and this message constantly comes up whenever I start windows. I have no CD with me as the operating system has been installed by the IT Department of my employer and I do not want to reinstall windows. I do not know how to change, and then make the changes in the registry via regedit. If anyone know to solve this problem, I would appreciate your help. I never wait for windows updates could cause such problems.

    Hello

    • Your computer is on the field?
    If it is connected to a domain, then you can post your query in this link:
     
    If it is not then what is the error message in the history of the magazine update on the windows update site?

    See also fix it for windows updates.
     
  • Enterprise Manager for database pending?

    Hello

    Does make sense to have enterprise manager is installed on the server of database pending?

    I'm under 11 GR 2 on 64-bit Windows Server 2008R2. I have the primary database (pprd) on a server and backup server (pprd_dr0) on another server.

    I have not (yet) implemented grid control.

    After getting my database ensures working with protection data, there is no Enterprise Manager.  I have that sqlplus to administer it.  Is it wise for me to install the Business Manager on the standby database server? If I do this, wouldn't the patterns and then be out of sync from the primary database (sysman) for example, beating so part of the goal of having the database shall be identical to the primary?

    Or do people in general NOT install EM on the standby database server?

    Thank you

    Hello;

    "Does make sense to have enterprise manager is installed on the standby database server" No. you would only install the agent on the day before in most cases.  (After you commissioning EM of course if you want)

    If you are new to Data Guard running it with SQL for awhile and get the feel of it.

    Later, you can decide if you want to use Data Guard Broker or EM.

    Here's a query to analyze using SQL:

    http://www.Visi.com/~mseberg/data_guard/monitor_data_guard_transport.html

    Best regards

    mseberg

  • Recovery of the system using Backup automatic backup of XP program wants a disk is there a way to let him use a CD instead?

    Recovery of the system using Backup automatic backup of XP program wants a disk is there a way to let him use a CD instead?

    Name of the operating system Microsoft Windows XP Professional
    Version 5.1.2600 Service Pack 3 Build 2600
    Manufacturer of operating system Microsoft Corporation
    250GB_DRIVE system name
    System manufacturer HP Pavilion 061
    EG705AA-ABA M7265C system model
    System Type X 86-based PC
    Processor x 86 Family 15 Model 4 Stepping 4 GenuineIntel ~ 2800 Mhz
    Version/Date BIOS Phoenix Technologies, LTD 3.17, 20/04/2006
    SMBIOS Version 2.4
    Windows C:\WINDOWS directory
    System directory C:\WINDOWS\system32
    Boot Device \Device\HarddiskVolume2
    The local United States
    Hardware Abstraction Layer Version = "5.1.2600.5512 (xpsp.080413 - 2111).
    250GB_DRIVE\HP_Administrator user name
    Time zone Pacific Daylight Time
    Total physical memory 072,00 MB 3
    1.55 GB available physical memory
    Total virtual memory 2.00 GB
    Available virtual memory 1.96 GB
    Page file space 4.83 GB
    Paging file C:\pagefile.sys

    Hello

    The ASR (automated system recovery) tool must have a disk for restoration purposes. The best option, if you really want to use ASR, is a floppy of USB external as suggested by chrisamiller.

    You can also follow this procedure to create the ASR files without the floppy drive and then copy them to another location to create a floppy disk or, if you're lucky, your PC can boot from a USB key (I never tried to start ASR on a key, do not know if it will work or not, but it might be worth it) :

    "You can"trick"the ASR in the race without a floppy drive." When it gets to the point where he writes on the diskette to cancel it. He writes two files, which are used for recovery, in the Windows\Repair directory. After completing your ASR copy these two files (files asr.sif and asrpnp.sif) to a network location and then make the diskette also. Make sure you update your disk whenever you make a new ASR or your backup will be watered.

    Or, you can use a USB floppy drive. It is sometimes the only option, especially if you need to install SCSI or SATA drivers during the recovery. »

    a: when you start the backup, it may be in Wizard mode. Follow the link to the Advanced Mode.
    b. Backup tab.
    c. click on the box next to the drive you want to back up so that it has a blue box.
    d. backup media or file name: Browse.
    e. Select a new file name on your CD.
    f. start the backup.

  • I am unable to boot into windows vista 32-bit, so I downloaded the vista recovery disk and get an oxo error code what it means?

    Windows recovery disc 32-bit error code meaning version question

    Hello
    I hope someone can help me. I am unable to boot into windows vista 32-bit, so I downloaded the vista recovery disk and get an oxo error code what it means (thanks in advance)?

    You don't give any info on what was the original problem with the computer.

    You have set the Bios Setup to boot from the CD/DVD drive?

    At startup, it will say press F2 or delete key to go into Bios/Setup, or maybe F12 to go to the Start Menu.

    And have you tried also to tap F8 at startup and choose Safe Mode from the list of Boot Options?

    Use up arrow key to do this, press on enter.

    Browse your Hard Drive manufacturer's website, download software from here and test your hard drive for errors.

    See you soon.

    Mick Murphy - Microsoft partner

  • When I try to make the recovery discs I get 'Sonic PX.dll not found'

    I'm doing the recovery disc for my Windows Vista desktop.

    I check the box 'create a recovery disc for future use.

    On the next screen, I get the error message "Sonic: PX.dll not found."

    Help would be appreciated.

    Hello

    You will need to contact the manufacturer of your computer using the recovery disks do.

    Your computer manufacturer has implemented their own recovery discs manufacturing process, and is not a process of Microsoft Vista.

    You can, with some manufacturers still buy recovery discs.

    See you soon.

  • The fast recovery area cannot be used for log archiving?

    I use the version 11.0.2.3 for testing.  I read a line like below from the book of the OCP.

    If none of the LOG_ARCHIVE_DEST_n settings have been defined, then the transition

    the database in archivelog mode will define LOG_ARCHIVE_DEST_10 internally to the

    Flash zone recovery, if it has been configured.

    In my database, fast recovery already defined as below.

    SQL > show parameter db_recovery

    VALUE OF TYPE NAME

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

    db_recovery_file_dest string + FASTRECOVERY

    whole large db_recovery_file_dest_size 4248M

    So I thought that if I turn the database in log mode archive, the log_archive_dest_10 will be defined as the same value as db_recovery_dest.

    SQL > alter archivelog database;

    Database altered.

    SQL > alter database open;

    Database altered.

    SQL > show the log_archive_dest parameter

    VALUE OF TYPE NAME

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

    Log_archive_dest chain

    Log_archive_dest_1 chain

    LOG_ARCHIVE_DEST_10 string

    See archive of the database becomes, the log_archive_dest_10 always be empty.

    So is there something wrong with my understanding?

    It is quote an Oracle Press all-in-one exam guide of the I had a part in writing. Your problem is you are using 11.2.x,, but the book was written with 11.1.x. glance the relevant parameters in the docs for both versions, and you will see that the situation has changed.

    Uni Oracle validates the examinations against both versions, so avoid any question where the difference would matter, but in any case, with your attention to detail, I'm sure that tat will have no problem with the exams.

    --

    John Watson

    Oracle Certified Master s/n

  • Problem with the current SNA on the database pending...

    Hello;

    A day ago I went on our main database on the eve of database, everything went well. But today when I checked current SNA for the two database, I saw that the two were different. and current SNA did not change on the standby database. What can cause this problem?

    some exits here when I tried to find the problem...

    on the primary database.

    SQL> select thread#, max(sequence#) from v$archived_log group by thread#;       
       THREAD# MAX(SEQUENCE#)
    ---------- --------------
             1            156 
    on the database pending;
    SQL> select thread#, max(sequence#) from v$archived_log  where applied='YES' group by thread#;
    
       THREAD# MAX(SEQUENCE#)
    ---------- --------------
             1            156 
    standby mode
    SQL> select LAST_CHANGE#, STATUS from V$STANDBY_LOG;
    
    LAST_CHANGE# STATUS
    ------------ ----------
         2927636 ACTIVE
               0 UNASSIGNED
               0 UNASSIGNED
               0 UNASSIGNED 
    standby mode
    SQL> select current_scn from v$database;
    
    CURRENT_SCN
    -----------
        2916773 
    on primary
    SQL> select current_scn from v$database;
    
    CURRENT_SCN
    -----------
        2927809
    Published by: Ecimen on 01:36 18.Eki.2012

    Published by: Ecimen on 01:47 18.Eki.2012

    SQL > change database recovery managed standby database disconnect from the session.

    modify the recovery of database managed standby database disconnect from the session
    *
    ERROR on line 1:
    ORA-01153: an incompatible media recovery is active
    >

    Most likely you had missed the log files from the backup site. You can check in question "select max(SEQUENCE#) from v$ loghist. Most likely old log files has not yet delivered to the main site backup site. Another simple method that you can do is stop tio watch db, and then start it as a mode of editing if you have 11 GR 2 db which should be enough. Oracle will automatically synchronized between primary and standby for you. If you can't wait, you can start the editing for db in waiting mode, then run the command "recover the database sleep until cancel;

  • Archived newspapers and Flash recovery

    Hello
    in 10g R2, what is the relationship between archived newspapers and Flash recovery?
    I have logs archived here:

    P:\oracle\product\10.2.0\flash_recovery_area\MYDB\ARCHIVELOG\2008_11_02

    And also here:

    D:\base\MYDB\arch

    Are both the Sami? What is the difference? We need both of them?

    Here are my settings:
    SQL> archive log list
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     297
    Next log sequence to archive   299
    Current log sequence           299
    SQL> show parameter log_archive_dest_1
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    log_archive_dest_1                   string      LOCATION=D:\base\MYDB\arch
                                                      OPTIONAL REOPEN=300
    log_archive_dest_10                  string      LOCATION=USE_DB_RECOVERY_FILE_
                                                     DEST OPTIONAL REOPEN=300
    Thanks before.

    Newspaper Archives are written in several places because of parameter settings. However, if you look at the value, OPTIONAL string indicates that the archiving of these places is not mandatory. If the archiver is unable to create an archive to any of these places, instance always works without any problem.

    It is absolutely mandatory that the archiver must be able to create an archive in one of the locations (if there is not both).

    What is the value to LOG_ARCHIVE_MIN_SUCCEED_DEST (default is 1)?

    If you do not need two of them, you can stop archiving to a specific location with ALTER SYSTEM.

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14237/initparams100.htm#I1010086

    Published by: Sissi Kandi on November 2, 2008 21:38

  • Satellite A200-10 X - after recovery, I can't use FN keys

    Due to some bugs used recovery of my companion CD and lost all the options of "FN"-connected including key gamma\brightness amplify. "." How can I make it back to normal?
    Couse now it looks as if the battery is low: P

    Searched all over the options and still can not find how to restore its original luster...

    PS: Sorry for my poor English :)
    If there is a solution to my problem please post here or send me an Email: [[email protected]]
    THX 4 Help =)

    Recovery of a disc using another model is discouraged, it can cause all sorts of problems and instability.

    Did you install Vista? If Yes, then you must install the package of value added on the Toshiba site.

  • PC won't start at all, and when I try with the recovery cd, I get blue screen

    ORIGINAL TITLE: Help me please

    My toshiba satellite p200-123 moel is any commissioning and when I try with the recovery cd I get a blue screen, also I can't start safely mode.the error message I get is... the file is maybe corrupt.the the file header checksum does not match the checksum calculated... help pleasseeee

    Hello

    You are booting from the recovery disk?

    You need to change the Boot order to make the DVD/CD drive 1st in the boot order:

    How to change the Boot order in BIOS:

    http://pcsupport.about.com/od/fixtheproblem/SS/bootorderchange.htm

    If you continue to have problems with the help of Toshiba recovery disks, you will need to contact Toshiba.

    As you get a blue screen, you may have a hardware problem.

    Toshiba support:

    http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/home.jsp

    You can also try the free Toshiba Support Forums:

    http://forums.Toshiba.com/

    See you soon.

  • ORA-01157: cannot identify/lock data file error in database pending.

    Hello

    I have a back-end database and the base ensures (11.2.0.1.0) that runs in ASM with the names of different diskgroup. I applied an incremental backup on a standby database to solve the gap newspaper archive and generated a controlfile to standby in the primary database and restore the standby database controlfile. But when I started the MRP process his starts not and lift error in the alerts log ORA-01157: cannot identify/lock file. When I questioned the standby database file it shows the location on primary data filenames not the database pending.

    ******************************

    PRIMARY DATABASE

    *****************************

    SQL > select name from v$ datafile;


    NAME

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

    +Data/OraDB/datafile/system.256.788911005

    +Data/OraDB/datafile/SYSAUX.257.788911005

    +Data/OraDB/datafile/undotbs1.258.788911005

    +Data/OraDB/datafile/users.259.788911005

    ****************************************

    BACKUP DATABASE

    ****************************************

    SQL > select name from v$ datafile;


    NAME

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

    +STDBY/OraDB/datafile/system.256.788911005

    +STDBY/OraDB/datafile/SYSAUX.257.788911005

    +STDBY/OraDB/datafile/undotbs1.258.788911005

    +STDBY/OraDB/datafile/users.259.788911005

    The actual physical location of files of database Eve in ASM in the standby server is shown below

    ASMCMD > pwd

    + STDBY/11gdb/DATAFILE

    ASMCMD >

    ASMCMD > ls

    SYSAUX.259.805921967

    SYSTEM.258.805921881

    UNDOTBS1.260.805922023

    USERS.261.805922029

    ASMCMD >

    ASMCMD > pwd

    + STDBY/11gdb/DATAFILE

    I even tried to rename the data files in the database backup, but it throws error

    ERROR on line 1:

    ORA-01511: Error renaming data/log files

    ORA-01275: RENAME Operation is not allowed if management undo file is

    Automatic.

    Kind regards

    007

    You must specify the complete location

    *.db_file_name_convert='+data/OraDB/datafile/,'+STDBY/11gdb/DATAFILE /'

    and to rename the data file, your standby_file_management parameter must be set to MANUAL.

  • Reg: verification of users in the database pending

    I need to check the users in the database pending. In the primary database, I got the result by querying dba_users. But how to check standby db, without opening the database.
    Is it possible with any views?

    No, you can't.

    Assuming that physical standby, you can only query dynamic views of performance when it is in MOUNT.

    I like the answer of sb92075. Its a copy of the same database. We're in a mode where you can search for users, and we're in a mode where you can not.

    Make sure that your databases are synchronized and interrogate primary school.

    Best regards and thanks!

    mseberg

  • trying to get used to sql * more running and creating a simple procedure

    Hello all;

    I'm getting used to sql * more after using for a while using pl/sql developer.

    I am trying to create a simple procedure and run it. See my procedure below
    create or replace procedure test(t in varchar2(200), limit in number(30))
    begin
    select tbl_report.id from tbl_report where tbl_report.id like '|| t ||%' and rownum <= limit;
    end test;
    and then I type in run hr.test ("J", 10); to run this and then press ENTER, and it does nothing. How can I run and create a simple procedure in sql * more

    Hello

    In addition to all the good points, others have done:

    When you issue a SELECT statement in SQL * Plus (or any other front end) two things happen:
    (1) a result set, containing the results of your query, is produced, and
    (2) this result set is displayed.
    Given that these two things are always done together, it is easy to forget that they are two different things.
    In PL/SQL, you must explicitly do something to catch the result set, and you must explicitly do something else to view it (if you want to display it).

    A simple way to get the result set is to use a cursor FOR loop, to extract a line at a time and run code with this line in a record variable (called the country in the example below).
    View the results is to call dbms_output.put_line.

    Here is an example:

    CREATE OR REPLACE PROCEDURE     test
    (       t       IN      VARCHAR2
    ,     lmt      IN     NUMBER          -- LIMIT is an Oracle keyword; best not to use it as a variable name
    )
    IS
    BEGIN
        FOR  country  IN ( SELECT  country_name
                          FROM    hr.countries
                     WHERE   country_name     LIKE t || '%'
                     AND     ROWNUM          <= lmt
                   )
        LOOP
            dbms_output.put_line (  country.country_name
                        || ' = country_name'
                        );
        END LOOP;
    END test;
    /
    SHOW ERRORS
    

    You can use variables, such as t and lmt, in the query without using dynamic SQL, as long as the variables do not have the same names as the columns in the table. In this case, t and lmt are good names; country_name or region_id wouldn't. (In fact, t is a reputable insofar as it cannot be confused with a column in the table of the country. T is not a good reputation in the sense that it does not give much information about what contains the variable, or how it is used. Why not call the variable target_name or name_a_trouver?

    You can run the SQL procedure * more like this:

    SET     SERVEROUTPUT     ON
    
    EXEC  test ('I', 2);
    

    If you issue the SET SERVEROUTPUT ON command, then you will not see the output of dbms_output. You must only issue the command SET SERVEROUTPUT ON once per session, but nothing bad happens if you do it more than once.

    When I ran the procedure as stated above, I got this output:

    Israel = country_name
    India = country_name
    

    Notice that "The Italy" does not appear, because lmt has 2.

    Do not create your own procedures, tables or other objects in the HR schema, or among all the other patterns created by Oracle. Create your own schema and create procedures and other objects in it.

Maybe you are looking for