Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle unknown host specified solution

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Today, when we restore oracle 11G to oracle 10G, there is a version mismatch first.

This problem can be resolved using the workaround in http://hundage.blog.51cto.com/3779401/1285465.

After resolving the problem of failed header file validation, executing the restore command always prompts the user that it does not exist.

The result returned by typing cmd > sqlplus / nolog > conn sys/manager as sysdba; > conn user/password; in the run dialog box is connected.

Thinking about whether there is a problem with creating users, we use oracle em (http://ip:1158/em) to create tablespaces and users.

As a result, there was a problem with unknown host specified "java.lang.Exception: Exception in sending Request:: null" in em login, and there was a problem that em could not be used, so I chose to avoid it and use the command line to restore data.

The steps are as follows:

-- create tablespaces

CREATE SMALLFILE TABLESPACE "test_data_CW" DATAFILE'D:\ ORACLE\ PRODUCT\ ORADATA\ ORCL\ test_data_cw' SIZE 100m AUTOEXTEND ON NEXT 50m MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO

CREATE SMALLFILE TABLESPACE "test_data_BLOB" DATAFILE'D:\ ORACLE\ PRODUCT\ ORADATA\ ORCL\ test_data_blob' SIZE 100m AUTOEXTEND ON NEXT 50m MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO

-- create users

CREATE USER "test_data" PROFILE "DEFAULT" IDENTIFIED BY "test_data" DEFAULT TABLESPACE "test_data_CW" TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK

GRANT "CONNECT" TO "test_data"

-Authorization

GRANT ALTER ANY INDEX TO "test_data" WITH ADMIN OPTION

GRANT ALTER ANY PROCEDURE TO "test_data" WITH ADMIN OPTION

GRANT ALTER ANY TABLE TO "test_data" WITH ADMIN OPTION

GRANT CREATE ANY INDEX TO "test_data" WITH ADMIN OPTION

GRANT CREATE ANY TABLE TO "test_data" WITH ADMIN OPTION

GRANT CREATE ANY VIEW TO "test_data" WITH ADMIN OPTION

GRANT CREATE PROCEDURE TO "test_data" WITH ADMIN OPTION

GRANT DROP ANY INDEX TO "test_data" WITH ADMIN OPTION

GRANT DROP ANY PROCEDURE TO "test_data" WITH ADMIN OPTION

GRANT DROP ANY TABLE TO "test_data" WITH ADMIN OPTION

GRANT DROP ANY VIEW TO "test_data" WITH ADMIN OPTION

-- modify the quota

ALTER USER "test_data" QUOTA UNLIMITED ON "test_data_BLOB" QUOTA UNLIMITED ON "test_data_CW"

And then execute

Imp test/test@orcl fromuser=testA touser=test_data full=y file='d:\ oracle\ backup\ testA.dmp' ignore=y log='d:\ oracle\ backup\ testAlog.log' is not successful, prompt ORA-01435.

The problem of searching on the Internet is caused by the non-existence of users. I went to'D:\ ORACLE\ PRODUCT\ ORADATA\ ORCL' to find the test_data_CW.DBF file I created, and it exists.

Wondering why the user is still prompted not to exist, the tablespace is deleted with the following command:

DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES

The user I created was deleted using DROP USER test_data;.

There is still a problem with re-executing the above create command and then restoring it.

Then execute select name from vault database; query the current data

Select instance_name from instance; query the current database instance

It is found that neither the database nor the database instance is the orcl I used to restore.

Go to the services panel, find the oracle-related services OracleServiceOrcl and listener, and restart the service.

It was always unsuccessful, and then it turned out that there was another monitor.

And then rebooted the machine.

This time decided how to create em users, to solve the error of unknown host specified, and then through Baidu to get the solution is to modify the time zone. The specific practices are as follows:

① modifies $ORACLE_HOME\ 10.2.0\ db_1\ KEVIN_orcl\ sysman\ config\ emd.properties (where KEVIN_orcl is the directory name on my computer: servername_sid, if it is a custom $ORACLE_HOME, please change it yourself) [you can also search emd.properties directly under the installation directory of oracle]

② opens emd.properties with notepad. The default agentTZRegion is GMT, and you can change it to your time zone, for example:

AgentTZRegion=Asia/Shanghai

Restart the machine or OracleDBConsole service

Now that you can log in using http://ip:1158/em, I use em to create tablespaces > users > Authorization > execute restore commands.

This successfully restores oracle11G to oracle10G.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report