DBA should pay attention to some operations in the Linux environment

Source: Internet
Author: User

DBAs should pay attention to the operating DBA's dependency on OS in Linux, which is no less than DB, especially for Oracle DBAs, and the increasing feelings of DB and OS, and the high coupling between them. for example, Oracle, fault diagnosis, performance tuning, and OS-layer apps may directly drag down databases, for example: okay, I admit, I want to emphasize the OS's feelings for the database, and those who are constantly cutting and worrying. (1) use music videos, music videos, and mix and match the two elements with caution. m kidding, whose utility is like its name, has 2: ① mobile file ② rename a file multiple functions (mv psychological monologue: rely on, I only two functions, more? Not many !) This is its advantage and disadvantage. Think about it. If I operate it: # mv. SQL. /B. My intention is to put. the SQL statement is moved to the current directory B, but the SQL statement is retained, the silly B is not in the current directory, or the silly B is incorrectly written as a silly X. After the SQL statement is completed, the operation is changed to rename. the hope of Qian Kun's great migration will become 72 miles, and rename it. No data loss, no big fuss, no fear. However, please refer to the following: scenario: a. SQL B. SQL c. move the SQL statement to the current directory abc: [plain] # find. -type f | awk '{print "mv" $1 """. /abc "} 'mv. /c. SQL. /abc mv. /. SQL. /abc mv. /B. SQL. /abc # find. -type f | awk '{print "mv" $1 """. /abc "} '| sh # ls abc day, 55 5555 what about my data ?? Why is there an abc ?? This is not scientific. Oh, I must have been burned. Lessons learned: when music videos are moved, insurance points, absolute paths are used to ensure that the current path of the object is available, and do not make any mistakes. (2) use rm Server with caution and find that the space is insufficient. Therefore, you want to delete some temporary logs the space thought that it was already in the log directory, and did not look at it carefully, it directly ran the rm result to clear many very critical scripts in the system, and it was very busy, it took another afternoon to restore the deleted files. Lessons learned: 1. backup, backup, or backup; 2. use it with caution or alias rm = 'rm-I 'or do not use the rm command; 3. before the operation, keep a clear mind and know what you are doing. (3) Chinese characters show the third point. In fact, it is quite common. Many people ask questions on the Forum. Why is it wrong for my OEM to open it? The Chinese characters cannot be displayed. The common causes are as follows: ① chinese Character Library not installed, yum install fonts-chinese ② encoding problem, use doc2unix conversion, this usually occurs in windows file copy directly open in Linux ③ LC_ALL is not set to LC_ALL = zh_CN.GBK; export LC_ALL, this will overwrite the LANG variable, and NLS_LANG is the environment variable related to the database. (4) How can I block the disk space when I expdp halfway through? Please explain, reward points 100, and immediately close the post. If I see it, I will occasionally start, go, and check the disk space. Yes, it should be like this, the disk space is insufficient, and the APP is often suspended. then, when the fault occurs, what should we do? If you are interested, refer to the previous two articles: Find a large file that occupies the hard disk in GNU/Linux and click the open link. http://www.bkjia.com/os/201304/201384.html How to delete massive data files in seconds click to open the link http://www.bkjia.com/os/201304/203155.html Mongochmod 777 people are inert, easy to figure, 777 up, especially for junior DBAs, finished, Pat ass, kgego go up, however, this and DB authorized operation "grant DBA what is the difference between to sb? SO, you are not finished. You have shared things and shared things. Lessons learned: chmod g + w filename; although troublesome (PS: Actually not troublesome) A lot of security, sleeping at night, can be directly snoring, escape, catch, hurry, we often encounter some files or directories, clearly visible, but not editable, as if it is mocking you: you can't see me. You can't see me... My grass, this is a fire in the stomach [plain] Case 1: you cannot access or delete the nail directory. You should have noticed that there is no NB between NA and NC. [root @ temp Desktop] # ls is separated by spaces. na nc [root @ temp Desktop] # cd na nc bash: cd: NA: there is no such file or directory [root @ temp Desktop] # rm-rf na nc [root @ temp Desktop] # ls na nc. This is an annoying escape and contains many spaces., line feed, carriage return, and so on. At this time, we must consider writing these operations between \ and, in this way, Linux can become the Sage of the book, the more familiar the stranger, the more dangerous the command you are to remember this sentence, because it is what a great man said, and this great man is me- _-! For example: uname-a and hostname are impulsive in the Unix environment. Originally, they wanted to uname-a, result miles, and typed as hostname-a. After I ran it, I directly changed the host name. in Linux, it's okay.-a just shows the host alias. This is just a simple example. I just want to emphasize and be careful with the commands you are familiar!! There is a scenario in which the growth of the volume virtual space is like this: You find that the disk space is full, but you cannot find large files in any way? You don't know why the space is full and cannot solve the problem. This is an example of the so-called growth of virtual space: at some time, a program constantly writes data to a file due to a certain exception. However, if the file is accidentally deleted due to the program not exiting, the write action is still in progress ...., at this time, the space will keep increasing, but we cannot find this large file. The reason is very simple. If it is deleted, it cannot be found unless the process is found and forcibly killed, the space with increased virtual resources will be immediately released. Otherwise, the space will not be able to solve the problem when it is full. Lessons learned: When deleting files (especially in the production environment), you should do one more step: observe the action of a process. If the process that references a file has not stopped, do not delete the file temporarily.

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: info-contact@alibabacloud.com 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.