Rename an Oracle Database Server

Source: Internet
Author: User
A server dedicated to oracle database is prepared for work, and the windows2003 operating system is installed on the server. The computer name is not specified in the installation system,

For work, we have prepared a server dedicated to oracle databases and installed windows 2003 on the server. The computer name is not specified in the installation system,

In the case of network transformation, You need to modify the name or IP address of the database server. This will affect the normal operation of the Oracle database, because the listener and many database tools need the correct machine name or IP address to work properly.

For work, we have prepared a server dedicated to oracle databases and installed windows 2003 on the server. The computer name is not specified in the installation system, after the oracle database is installed, the database server name is found to be WIN-GFBYHSJZSU5, and the address to access the OEM: https: // WIN-GFBYHSJZSU5: 5500/em. Obviously, it is not intuitive. You have to change the server name to oracleserver. Of course, you must restart the computer to modify the computer name. After restarting the computer, open the "service" window and find that the OracleOraDb11g_home1TNSListener and OracleDBCConsoleORCL services cannot be started normally.

1. Enable OracleOraDb11g_home1TNSListener.

OracleOraDb11g_home1TNSListener is the listening service and cannot be started properly. The listening configuration contains the name information of the database server. when the name of the database server changes, the listener cannot listen on the basis of the original configuration.

The listener Configuration file is saved in the $ ORACLE_HOME \ NETWORK \ ADMIN directory. First, open listener. ora. You can see that the value of the host parameter is still the original computer name WIN-GFBYHSJZSU5 and change it to the new computer name oracleserver. Open tnsnames. ora and change the WIN-GFBYHSJZSU5 to oracleserver. After the modification, the listening service can be started.

2. The OracleDBCConsoleORCL service can be started normally.

OracleDBCConsoleORCL is an Oracle Database Console service. If you do not start this service, you cannot access Enterprise Manager. You can use the emca command to reconfigure the Enterprise Manager.

Emca command syntax: emca [operation] [mode] [database type] [tag] [parameter]

First, execute emca-deconfig dbcontrol db-repos drop to delete the Enterprise Manager Database.

Emca. bat is saved in the $ ORACLE_HOME \ bin directory. Before executing the preceding command, switch the current directory to the $ ORACLE_HOME \ bin directory. After the command is executed, enter the database SID, listener port number, sys user password, and system User Password. After entering the information, the emca tool prompts you whether to continue. Press Y to delete the EM database. This operation takes time. Next, you need to manually delete some junk data in the EM database. If the data is not deleted, an error will occur when you recreate the EM database.

Sqlplus "as/sysdba"

Drop public synonym setemviewusercontext;

Drop public synonym mgmt_target_blackouts;

Drop role mgmt_user;

Drop user mgmt_view cascade;

Drop user sysman cascade;

Run the DELETE command above to exit SQL * plus.

Run the following command to re-create the EM Database: emca-config dbcontrol db-repos create

After the command is executed, enter the database SID, listener port number, sys user password, and system User Password. After entering the information, the emca tool prompts you whether to continue. Press Y to re-create and configure the EM database. This operation takes time. After the configuration is complete, the browser successfully accesses https: // oracleserver: 5500/em.

Related reading:

Rename a Data file in Data Gurad physical backup mode

ORA-26563 error while renaming Oracle table

Rename the Oracle 11g Interval Partition

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.