Operation and Maintenance
Linux Operation and Maintenance
Solution to Oracle Chinese garbled code in Linux
The root cause of the garbled code problem is the modification of the character set. Let's take a look at the solution to Oracle Chinese garbled code in Linux.
Check the client’s language encoding settings:
Configuration in the configuration file: cat ~/.bash_profile
Pay attention to modifying the configuration information:
export PATH
export ORACLE_HOME=/usr/lib/oracle/11.2/client64/
export LD_LIBRARY_PATH=:$ORACLE_HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH:.
export TNS_ADMIN=$ORACLE_HOME
export PATH=$PATH:$ORACLE_HOME/bin:
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
After configuration, check whether the configuration is successful, sql statement: select userenv('language' ) from dual
View the encoding used by the database: modify the default language of the linux oracle database
linux The default language for installing oracle is:
AMERICAN_AMERICA.WE8MSWIN1252
The Chinese display in this language is garbled.
After logging in to the Linux system through oracle, perform the following operations:
Modification method (taking changing to UTF8 as an example)
Log in to sqlplus with system DBA authority
$ sqlplus / as sysdba; select userenv('language') from dual;
For example: AMERICAN_AMERICA.WE8MSWIN1252
Modify:
SQL> shutdown immediate; SQL> startup mount; SQL> alter system enable restricted session; SQL> alter system set job_queue_processes=0; SQL> alter database open; SQL> alter database character set internal_use AL32UTF8; 或者 ALTER DATABASE character set INTERNAL_USE ZHS16GBK; SQL> shutdown immediate; SQL> startup SQL>alter system disable restricted session;
Free video tutorial sharing: linux video tutorial
The above is the detailed content of Solution to Oracle Chinese garbled code in Linux. For more information, please follow other related articles on the PHP Chinese website!
How to use loops in bash for whileJul 24, 2025 am 12:47 AMIn Bash scripts, for and while loops have applicable scenarios: 1. For is more suitable for cases where the number of loops is known, such as traversing a list or range; 2. While is more suitable for continuous execution according to conditions, such as waiting for the state to change; 3. The two can also be used in combination to improve script flexibility. The For loop is implemented through the "variable in list" structure, which is suitable for tasks such as printing numbers and processing files; the While loop is based on conditional judgment and is often used to read input or poll status; when used in mixed use, while can control the process, for can process data, such as reading line by line and traversing the skill list. When writing, you need to pay attention to avoiding dead loops and test small samples first to ensure the logic is correct.
How to check filesystem integrity fsckJul 24, 2025 am 12:33 AMfsck is a tool for checking and repairing file system integrity, suitable for a variety of file systems, running when the system is started or suspected of file corruption. Before use, make sure that the partition is not mounted in read-write state, and it is recommended to operate in single-user mode or LiveCD/USB. Common options include -t specifying the file system type, -n only viewing reports, -y automatic repair, and -f mandatory check. When encountering error messages such as duplicate data blocks, you can choose to repair or skip; if it cannot be repaired automatically, you need to manually analyze the log or use professional tools. It is recommended to run fsck during abnormal shutdown, file access exceptions, mount errors, or regular maintenance, but SSDs and modern file systems do not need to be used frequently. When using it, you should pay attention to permission issues, and usually add sudo.
How to analyze system performance dataJul 24, 2025 am 12:26 AMThe core of analyzing system performance data is to identify bottlenecks and guide optimization. Key metrics include CPU usage, memory footprint, disk IO, network latency, and response time. For example, a CPU above 80% for a long time may mean tight resources, insufficient memory will lead to frequent swaps, and high disk IO imply storage problems. Different systems have different concerns, such as the web server pays attention to request delay and the number of concurrent connections, while the database pays attention to query response time and lock waiting. When viewing trends, you need to combine historical data, use monitoring tools to draw a trend chart, compare normal and abnormal periods, and associate multiple indicators with comprehensive analysis. When encountering sudden problems, you can quickly troubleshoot them by following the steps: first use top/htop to view the CPU occupancy process, free-m to check the memory and swap, io
How to write Puppet manifestsJul 24, 2025 am 12:10 AMThe key to writing a Puppet list is modular structure, resource relationship management, flexible application of variable conditions and standardized grammar style. 1. Use a modular structure to split the functions into modules and store them in directories, place the main class init.pp, and respond to different scenarios through subclasses to improve reusability; 2. Reasonably declare resources and manage dependencies, use before, require, and notify to control the execution order, and ensure that the service restart is triggered after the configuration file is modified; 3. Use variables and condition judgments to improve flexibility, select paths according to the system type, and manage configuration data in combination with Hiera; 4. Pay attention to the code style, unify naming specifications, align indentation, add clear annotations, and use the PuppetLint tool to ensure the correct format
How to restore Linux system from backupJul 23, 2025 am 12:25 AMTo successfully restore Linux system from backup, you must first clarify the backup type and follow the steps. 1. Confirm the backup type, such as complete system image, file-level backup or package list plus configuration files, and select the corresponding recovery method according to the type, such as decompressing data with rsync or tar. 2. Enter the recovery environment through LiveUSB, mount the root partition and backup location, and use the command to copy data. 3. When restoring user data and configuration, check permissions, ownership and hidden files, and reinstall GRUB if necessary. 4. Pay attention to details such as excluding special directories, version compatibility, and non-obvious configuration storage locations. Testing and preparation in advance is the key to ensuring a smooth recovery.
How to use the `lsmod` commandJul 23, 2025 am 12:13 AMlsmod is a command in Linux to view loaded kernel modules, and display module information in a more readable way by reading /proc/modules file. Its output contains three columns: Module (module name), Size (size, bytes), and Usedby (number of references). Combined with grep, specific modules can be filtered, such as lsmod|grepusb is used to find USB-related modules. Dependencies can be identified by Usedby columns, for example, snd\_usbmidi\_lib is dependent on snd\_usb\_audio. To view dependencies in depth, modinfomodule\_name is available. Common operations include using sudomod
How to unmount a filesystemJul 23, 2025 am 12:06 AMTo uninstall the file system, you must first confirm the mount point path and use the umount command to operate. If you encounter "deviceisbusy", you must handle the occupied process. 1. Use df-h or mount|grep/dev to confirm the mount point; 2. Execute sudoumount [mount point] uninstall; 3. If the device is prompted to be busy, close the relevant programs or use lsof to check the process and kill; 4. Use sudoumount-l to delay uninstall; 5. When uninstalling NFS, you can add the -f parameter to force uninstall. Be careful to ensure that there is no program dependency before operating to avoid exceptions.
How to manage system logs remote syslogJul 23, 2025 am 12:06 AMThe configuration steps for remote management of logs include: 1. Configure the local client to send logs, modify the rsyslog configuration file and transmit using the TCP protocol; 2. Set up the remote server to receive logs, enable network modules, and set up log classification storage; 3. Strengthen security, restrict access through firewalls, TLS encryption and log filtering; 4. Troubleshoot common problems and check port monitoring, connectivity, service status and security policies. Following the above steps can ensure the stable operation of the log system.


Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Atom editor mac version download
The most popular open source editor

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),






