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

What if there is an ora-12899 error in the Oracle database

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail what to do when there are ora-12899 errors in the Oracle database. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

In the process of using ORACLE, there will be all kinds of problems and errors, among which ORA-12899 is the problem that I have been having when importing data into my local machine some time ago. But fortunately, this problem has been solved, and now let's share the solution.

The emergence of ORA-12899 is caused by the character set. Chinese accounts for 3 bytes in UTF-8 and 2 bytes in ZHS16GBK. The character set of the source dmp file is the data poured out from the ZHS16GBK library, and now it needs to be imported into the library with the target character set of UTF-8, so ORA-12899 will appear.

In fact, this problem can be well solved by modifying the character set of ORACLE.

But when I changed the character set, I found that I forgot the password of my sys account, which was a tragedy, so I had to change the password of the sys user first.

There are several ways to change passwords, so let me list them one by one:

First, forget the login password of users except SYS and SYSTEM users.

Log in as a SYS (or SYSTEM) user.

CONN SYS/PASS_WORD AS SYSDBA

Use the following statement to change the user's password.

ALTER USER user_name IDENTIFIED BY newpass

Note: passwords cannot be all numbers. And it cannot be the beginning of a number. Otherwise, there will be: ORA-00988: password missing or invalid

Forget the password of the SYS user or the SYSTEM user.

If you forget the password of the SYSTEM user, you can log in as the SYS user. Then use the ALTER USER password

Change the password.

CONN SYS//PASS_WORD AS SYSDBA; ALTER USER SYSTEM IDENTIFIED BY newpass

If you forget the password of the SYS user, you can log in as the SYSTEM user. Then use the ALTER USER password

Change the password.

CONN SYSTEM//PASS_WORD; ALTER USER SYSTEM IDENTIFIED BY newpass

Third, if the SYS,SYSTEM user's password is forgotten or lost.

This one is particularly important.

You can use the ORAPWD.EXE tool to change the password.

Start menu-> run-> enter 'CMD', to open a command prompt window and enter the following command:

Orapwd file=D:/oracle/product/10.2.0/db_1/database/pwdctcsys.ora password=newpass

This command regenerates the password file for the database. The password file is located in the ORACLE_HOME directory

Under the / database directory of

This password is to change the password of the sys user. The passwords of users other than sys and system will not be changed.

After changing the password, you can change it as dba. If not dba, you will be prompted to have insufficient permissions when you execute the change command.

Start-- > run-- > cmd, then enter: "sqlplus sys/oracle@192.168.0.1/orcl as SYSDBA"

If you can't enter it normally, you need to enter your user name and password manually. After entering, there will be a prompt of "SQL >". Just follow the commands given below.

SQL > SHUTDOWN IMMEDIATESQL > STARTUP MOUNTSQL > ALTER SYSTEM ENABLE RESTRICTED SESSION;SQL > ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;SQL > ALTER SYSTEM SET AQ_TM_PROCESSES=0;SQL > ALTER DATABASE OPEN;SQL > ALTER DATABASE CHARACTER SET ZHS16GBK; ALTER DATABASE CHARACTER SET ZHS16GBK*ERROR at line 1:ORA-12712: new character set must be a superset of old character set

It is reported that the character set is incompatible, so the INTERNAL_USE instruction does not check the character set superset:

SQL > ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16GBK;SQL > SHUTDOWN IMMEDIATESQL > STARTUP

At this time, the ORA-12899 has been completely solved, and the data can be imported.

This is the end of the article on "what to do if there are ora-12899 errors in the Oracle database". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

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

Database

Wechat

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

12
Report