ORA-01506: Missing or illegal Database Name Fault Analysis Case Study

Source: Internet
Author: User

Today in the RAC-DG experiment, encountered a lot of problems, this problem occurs in the operation of the use of pifle to create spifle

Most people prefer to directly use alter system set xxx = 'xxx. XXX' scope = spfile When configuring RAC-DG master database parameters;

Because I don't want to repeat the command, I first create a pifle with the master database parameters, then modify the pfile, add the required DG configuration parameters, and then write the pfile back to the spfile parameter file, use spfile to start the RAC Database

The procedure is as follows:

1. Run:

SQL> Create pfile = '/rmanbackup/initora11dg. ora' from spfile;

File Created.

2. modify the content of the generated pfile parameter file to add the following content:

# Original parameters after GI assembly
*. Audit_file_dest = '/u01/APP/Oracle/admin/ora11rac/adump'
*. Audit_trail = 'db'
*. Cluster_database = true
*. Compatible = '11. 2.0.0.0'
*. Control_files = '+ Data/ora11rac/controlfile/current.260.823440203', '+ backupdg/ora11rac/controlfile/current.256.823440203'
*. Db_block_size = 8192
*. Db_create_file_dest = '+ data'
*. Db_domain =''
*. Db_name = 'ora11rac'
*. Db_recovery_file_dest = '+ backupdg'
*. Db_recovery_file_dest_size = 4558159872
*. Diagnostic_dest = '/u01/APP/Oracle'
*. Dispatchers = '(Protocol = TCP) (Service = ora11racxdb )'
Ora11rac2. instance_number = 2
Ora11rac1. instance_number = 1
*. Memory_target = 838860800
*. Open_cursors = 300
*. Processses = 150
*. Remote_listener = 'zlm-cluster-Scan: 8080'
*. Remote_login_passwordfile = 'clusive'
Ora11rac2. Thread = 2
Ora11rac1. Thread = 1
Ora11rac2. undo_tablespace = 'undotbs2'
Ora11rac1. undo_tablespace = 'undotbs1'

# The following content is added for configuring DG:
*. Db_unique_name = 'ora11rac'
*. Log_archive_config = 'dg _ Config = (ora11rac, ora11dg )'
*. Log_archive_dest_1 = 'location = use_db_recovery_file_dest valid_for = (all_logfiles, all_roles) db_unique_name = ora11rac'
*. Log_archive_dest_2 = 'service = ora11dg valid_for = (online_logfiles, primary_role) db_unique_name = ora11dg'
*. Log_archive_dest_state_1 = Enable
*. Log_archive_dest_state_2 = Enable
*. Log_archive_format = 'arc _ % T _ % S _ % R. arc'

# Parameters set for switchover or failover
*. Fal_server = ora11dg
*. Standby_file_management = 'auto'
*. Db_file_name_convert = '/u01/APP/Oracle/oradata/ora11dg/datafile', '+ Data/ora11rac/datafile ', '/u01/APP/Oracle/oradata/ora11dg/datafile',' + Data/ora11rac/tempfile'
*. Log_file_name_convert = '/u01/APP/Oracle/oradata/ora11dg/datafile',' + Data/ora11rac/onlinelog ', '/u01/APP/Oracle/oradata/ora11dg/datafile',' + backupdg/ora11rac/onlinelog'

3. After saving and exiting, run the following command:

SQL> Create spfile = '+ Data/ora11rac/spfileora11rac. ora' from pfile;

File Created.

I thought this would have done my scheduled goal-> modifying spfile with pfile, but when I started the database again, the ORA-01506 error was reported

SQL> startup force
ORA-01506: Missing or illegal Database Name

This error is literally because the database name is lost, that is, the parameter does not contain db_name or the configuration is incorrect.

This error occurs because the pfile path is not specified in the previous spfile creation statement. In fact, it is different from the local path of a single instance (it is okay to directly execute create spifle from pfile in a single instance environment, because these two files are stored in the $ ORACLE_HOME/DBS path ), if pfile does not specify a path, only initora11rac1 under DBS is used by default. ora generates a spfile. in ASM, this file is used to point to the storage path of the spfile file in ASM. The content only contains a sentence "+ Data/ora11rac/spfileora11rac. ora ", knowing the problem, then modify the above statement for creating spifle as follows:

SQL> Create spfile = '+ Data/ora11rac/spfileora11rac. ora' from pfile = '/rmanbackup/initora11rac. ora ';

File Created.
SQL> startup
Oracle instance started.

Total system global area 835104768 bytes
Fixed size 2232960 bytes
Variable Size 578817408 bytes
Database buffers 251658240 bytes
Redo buffers 2396160 bytes
Database mounted.
Database opened.
SQL> show parameter spfile

Name type value
-----------------------------------------------------------------------------
Spfile string + Data/ora11rac/spfileora11rac.
Ora
Start with spfile and solve the problem.

Conclusion: do not be confused when you discover the problem. Based on the Oracle error prompt, consider the cause of the Error. If you cannot make a valid judgment, you can use some methods, such as Google, A lot of ora-XXXXX errors can be searched to produce many results. Although the causes and solutions are different, I would like to say that it can provide you with a way of thinking. In many cases, the methods that others can use and the commands that can be executed are OK, but they are not necessarily the same in their own environments.

The above problem is actually caused by the fact that I am a beginner and I am not familiar with the RAC environment of ASM. If you know that DBS use the pfile rule by default, it is easy to find the problem, and this is also a process of experience accumulation. If you encounter a problem, you can solve it. In time, you will become a master of truble shooting.

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

By mongoon8219 chinaunix blog: http://blog.chinaunix.net/uid/24612962.html

For Original article reprinted, please specify the link. Thank you!

Http://blog.csdn.net/aaron8219/article/details/10030523

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.