Solution to Oracle Database ORA-12899 errors

Source: Internet
Author: User

ORA-12899 appears, is caused by character set, Chinese occupies 3 bytes in the UTF-8, zhs16gbk occupies 2 bytes, and the source DMP file character set is zhs16gbk inverted data, now to import to the target character set for the UTF-8 library, so there will be a ORA-12899, in fact, as long as you modify the Oracle character set can be a good solution to this problem; but when modifying the character set, I found that I forgot the password of the sys account. This is a tragedy, so I had to change the password of the Sys user first.

Changing the password is also divided into several situations. Let me list them one by one:
1. Forget the logon password of a user except sys and system.
Log On As A sys (or system) user.
Conn sys/pass_word as sysdba;
Use the following statement to modify the user password.
Alter user user_name identified by newpass;
Note: The password cannot be full of numbers. It cannot start with a number. Otherwise: ORA-00988: Password missing or invalid
2. Forget the password of the Sys user or the System user.
If you forget the password of the System user, you can use the Sys user to log on. Then, use the alter user password command.
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 use the System user to log on. Then, use the alter user password command.
Change the password.
Conn system // pass_word;
Alter user system identified by newpass;
3. If the passwords of SYS and system users are forgotten or lost.
This is particularly important.
You can use orapwd. EXE to change the password.
Start Menu-> Run-> enter 'cmd', open the 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 re-generates the Database Password File. The password file is located in the ORACLE_HOME directory.
/Database directory.
This password is used to change the password of the Sys user. The password of other users except sys and system will not change.
After the password is changed, you can change it as a DBA. If it is not a DBA, you will be prompted to have insufficient permissions when executing the modification command.
Start --> Run --> cmd, then enter: "sqlplus sys/oracle@ as sysdba"
If it cannot be accessed, You need to manually enter the user name and password.
"SQL>" prompt,
Execute the following commands in sequence,
SQL> shutdown immediate
SQL> 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;
Alter database character set zhs16gbk
* Error at line 1:
ORA-12712: new character set must be a superset of old Character Set
SQL> shutdown immediate
SQL> startup

SQL> startup Mount

SQL> alter database character set zhs16gbk;

The internal_use command does not check the character set superset:

SQL> alter database character set internal_use zhs16gbk;

At this time, this ORA-12899 has been completely resolved, You can import data...

Related Article

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: 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.