Oracle 12c migration data and issues encountered

Source: Internet
Author: User

Because you want to switch servers, re-install Oracle, you want to use the latest 12c. It took a whole day to record the process and problems as follows.

First, download Oracle 12c:

Half of the 12.1.0.2.0 on the official web site is really down, with the hundred-gigabit fiber is also to half of the failure. So you can only download 12.1.0.1.0.

II. installation? Oracle 12c:

After downloading the first part of the decompression, according to previous experience, two parts of the compressed package together, it will be extracted together. So I did not go to check, and then the sad urge, loaded for a long time said can't find the file, failed. so we must remember to check, or waste a lot of time. If you find that the second part is not unpacked, you can extract it separately, and then cut the Database\stage\components directory of the folder to the first part of the corresponding directory. Intermediate installation options are not introduced, Chinese, to see their own needs to choose. If the first time like me failed to install, the installation to half of the directory to kill all, otherwise will not cover the installation, waste a few grams of space.

Third, create users and give permission?

The installation is complete, and CMD executes sqlplus login to the system user. Then create user username identitfied by password, creating users to import old data. Grant Create Session,create table,unlimited tablespace to username; gives the newly created user the ability to create a session, create a table, and use any of the table spaces. You can then wait for the DMP of the old database to be imported directly.

? iv. installation of PL/SQL

The PL/SQL Visual Management database is indeed a lot more convenient and must be installed. Because PL/SQL has only 32 bits, you need to do some extra action. Download Instantclient-basic-nt-12.1.0.1.0.zip ( must be 32-bit, do not make the wrong version, the Oracle website is downloaded ), unzip it to the Oracle installation directory of product (my is: E : \app\orcl\product). Copy the Database Network/admin directory (E:\app\orcl\product\12.1.0\dbhome_2\NETWORK\ ADMIN) Tnsnames.ora and Listener.ora files to the extracted Instantclient_12_1 directory (E:\app\orcl\product\instantclient_12_1). Download plsql+developer10.0.5.1710 and its Chinese patches are installed separately. Find your Plsql_developer installed directory (my: E:\PLSQL Developer), create a new Start.txt document with the following: @echo off

Set Path=e:\app\orcl\product\instantclient_12_1

Set Oracle_home=e:\app\orcl\product\instantclient_12_1

Set Tns_admin=e:\app\orcl\product\instantclient_12_1

Set Nls_lang=american_america. Al32utf8

Start Plsqldev.exe

Modify the suffix named Bat, and then execute this start.bat, this bat sets the TEMP environment variable and starts Plsqldev, and if you do not set the system environment variable, you will need to start from this bat later . Note the values of the three environment variables are modified to correspond on their own computers. At this point, it is possible to pop up a dialog box that lacks a DLL, to download the DLL on the internet and put it in the directory . After opening the Plsql_developer, cancel the login and enter the main interface. 1. Click--Tools--preferences--Connect:

2. Change the above cancellation to submit

The 3.OCI library is changed to a path with instantclient_10_2.

4. Apply--OK--close the Plsql_developer and re-run it.

??????? Five, the old database export

Stop the related application of the old database, close the Foreign Key association of the table that needs to be exported ( if not closed, all foreign key associated rows will be rejected because the associated entity is not found ) CMD execution exp is followed by the Chinese interactive, the main settings export file name, export mode, whether export data and so on. Specific own Baidu.

Vi. Import of new databases

The DMP files are copied to the new server, CMD is executed on the new server, and is also interactive in Chinese, mainly set import mode, import file, import data, etc. My mode is User mode, import the entire user data, because IMP is insert way import, if previous import failed, be sure to delete old table or old record . After the import is complete, open the PL to reopen the association for both the old database and the new database.

Vii. Migrating Tomcat applications

? My application does not know why, with the intranet IP can not connect to the database, reported IO exception: The Network Adapter could not establish the connection. So can only be replaced with localhost, but this can not be debugged, good pit. My URL string is: Jdbc:oracle:thin: @localhost: 1521:ORCL. The above exception resolved, also reported:Ora-28040:no matching authentication protocol. There are two ways to solve the problem on the Web, update the JDBC driver and modify the sqlnet.allowed_logon_version.

I ended up anyway by adding the following statement to the E:\app\orcl\product\12.1.0\dbhome_2\NETWORK\ADMIN\sqlnet.ora:

? Sqlnet. Allowed_logon_version=8

Sqlnet. Allowed_logon_version_server=8

Sqlnet. Allowed_logon_version_client=8

To solve, specific is not as long as one of the sentences, too lazy to try, have to know the friend can say.

I was trying first. Update the JDBC driver OJDBC6 or 7 is not possible before you start modifying sqlnet.allowed_logon_version. Then from the 12,11,10,9,8,7 or put all the braces up and try it over. Modify sqlnet.allowed_logon_version do not have to restart the database or monitoring, do not restart the application, start should try this, hey. ?

I ended up with the entire app state: The app is compiled with jdk1.6, OJDBC7, and runs under tomcat7.0. My previous JDBC version is Ojdbc14, is not with the JDBC version is not closed and do not try, a verified friend can say. What else on the Internet to modify Tnsnames.ora? and Listener.ora inside the host, and then to restart monitoring, completely wasted my time.

Oracle 12c migration data and issues encountered

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.