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

The solution of ora-12899 error in Oracle Database

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

Share

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

This article uses easy-to-understand examples to introduce the solution to ora-12899 errors in Oracle database. The content of the article is compact step by step. I hope you can get something according to this article.

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.

PS: what is the purpose of * .ora files in oracle?

Why is there no * .ora file in 10g?

Is * .ora in 9i equal to * .dbf in 10g?

When creating a tablespace

DATAFILE is used to specify the specific location and size of the data file. But I see some articles that use

* .ora files, such as DATAFILE'd:\\ ORACLE\\ ORADATA\\ ORA92\\ LUNTAN.ora' SIZE 5m, some

Then use a * .dbf file, such as DATAFILE'D:\\ ORACLE\\ ORADATA\\ ORA92\\ LUNTAN.dbf' SIZE 5m.

The term on the Internet is .dbf-data file, .tmp-temporary file, .log-redo log file (redo log file), .ctl-control file

.ora-parameter file, .dat-Oracle system file

It's just that the file type is identified by the extension, and it's the same for the data file, whether it's ora/dat/dbf, and there's no difference. Personally, I think it's the same. I wonder what members' opinions are.

The above is the solution to the ora-12899 error in the Oracle database, and you need to use it yourself in order to understand the details. If you want to know more about it, welcome to follow the industry information channel!

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