The following articles mainly describe how to use Oracle databases for enterprise development, that is, the actual application of error troubleshooting and the actual operations on Character Set problems. The following describes the specific content, I hope it will help you in this regard.
Troubleshooting
Too many programs are written, and errors are inevitable. Oracle databases are no exception. Errors are not terrible. You only need to find the correct solution in time.
Some practices of recording OracleSQL statements have been mentioned above. When SQL is run, Oracle database generally reports a ora error, such as ora-00600, and gives a brief description, however, the description text is not too detailed.
How can we locate the problem based on the clues? If your database server is located on a unix or linux server, you need to telnet to log on to the server. The system provides an oerr command line tool to conveniently find out the specific meaning of the error, for example, oerr ora 600. If your Oracle database server is on a Windows server, you can only view the help documentation without such a tool.
Although you can see the details of the Error Using the oerr tool, after a period of trial, you will find that the prompts provided by the oerr tool are relatively simple, and some even cannot be seen, in this case, other solutions will be used:
1. GOOGLE and other search engines
This is a very cost-effective solution. Based on the powerful features of search engines, you can find a lot of relevant information. Maybe someone has the same problem as you, and the following is the solution.
2. Metalink
This is a paid website officially provided by Oracle. Users can find massive amounts of data on the website, with a large amount of information). If you cannot find a solution, you can also ask questions, oracle experts will answer the question. This is an authoritative solution to Oracle problems, but the disadvantage is that if you do not have an account, it will be equal to zero.
You can ask DBA for help with some error prompts that you cannot understand, because some error prompts may be SQL problems on the surface, but they may be caused by the database itself. If you can see from the error information such as "cannot expand", "table space is full", or "rollback segment is too old" and other errors that are clearly unrelated to OracleSQL, you can directly seek DBA help.
If you are deploying a bsschema system, you may find that when you use a client tool to connect to the server, everything is normal, but the WEB program cannot connect to the Oracle database, and the error "OCI requires 8.1.7 or later" is reported. This is an ambiguous error message. Obviously, all the clients we have installed have met its requirements. What is the problem? The problem is that you need to assign a permission to the Oracle ora92 directory, for example:
If you try this authorization, you will find that this user already exists and has been authorized! But why not? Here, we need a technique to remove the check box "read and run", select the check box, and then "OK", that is, re-assign permissions. Depending on the machine performance, it may take a few seconds or minutes.
After the above ups and downs, we can do it. If the access is still unavailable, restart the WEB server instead of the database server.
If you do not have this directory for Oracle10g, You can authorize the entire installation directory of Oracle.
Character Set Problems
If the Oracle database server is installed in a Chinese environment and the client is also running in a Chinese environment, you will not need to read this part. However, if the installation is complex, especially when the server needs to support multiple languages and multi-character sets, how the client works together becomes a problem.
To know how the client is configured, you need to know what standards the server is arranged based on. You can use the following OracleSQL to query:
- select * from database_properties
Here, NLS_CHARACTERSET refers to the server-side character set. For example, if the result displayed on the server is ZHS16GBK, the client needs to be configured according to this standard. For our developers, the client is generally a Windows platform. This configuration needs to be modified in the registry. The Registry path is: My computer \ HKEY_LOCAL_MACHINE \ SOFTWARE \ ORACLE \ HOME0 \ NLS_LANG
For example, the key value of my machine is SIMPLIFIED CHINESE_CHINA.ZHS16GBK, which indicates the Chinese Character Set of SIMPLIFIED Chinese. From the character set perspective, the server and the client are currently matched. If the character set matches, the queried content will not be garbled; otherwise, you will see a lot of text that you don't want to see.
Generally, to achieve multi-language support, the character set is set to UTF8, which can support multiple types of text. If the character set on the server and the client is inconsistent, a problem may occur, but the problem is mainly displayed, which does not affect the system much. For example, if a local language name is entered in Russia, it may not be displayed in the Chinese system.
How many character sets Does Oracle Support? I haven't counted them. If the ZHS16GBK doesn't work, just try UTF8. There is also an exception. Some earlier versions of Oracle only support the Western European character set. It is a single-byte character set, and the high byte is empty.
This character set is incompatible with ZHS16GBK. In this case, you must set the client to the Western European character set. Character sets have an inclusive relationship. As long as they conform to this inclusive relationship, there is no difference between the two ends. For example, ZHS16GBK and UTF8 are inclusive.
The above content is an introduction to enterprise development solutions using Oracle databases. I hope you will have some gains.