Sqlplus/as SYSDBA output by using the Linux strace command to track the Bdump directory's X permission loss

Source: Internet
Author: User
Tags lstat







In the previous article, we said that the X permission for the Bdump directory was missing, resulting in an Oracle database exception.
The following is the Linux strace command to track the Bdump directory when the X permission is lost, Sqlplus/as SYSDBA will have what kind of output:
The Strace command is derived from the following command: Using Strace in Linux to Debug hang Type problems (Doc ID 1391746.1)




Strace-fe verbose=all-e write=all-e Read=all-o/u02/app/output7.txt/u02/app/oracle/product/11.2.0.4/db_1/bin/ Sqlplus/as SYSDBA




When the above strace command finishes executing, the size of the Output7.txt is:





[root@rhel63single app]# pwd
/u02/app
[root@rhel63single app]# du -sh output7.txt
54M     output7.txt




In the file, you have the following information:




5774 stat("/u01/app/oracle/diag", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
5774 stat("/u01/app/oracle/diag/rdbms", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
5774 stat("/u01/app/oracle/diag/rdbms/test", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
5774 stat("/u01/app/oracle/diag/rdbms/test/test", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
5774 stat("/u01/app/oracle/diag/rdbms/test/test/trace", {st_mode=S_IFDIR|0650, st_size=49152, ...}) = 0 --->Here is the description of the bdump directory The permission is 650
5774 mkdir("/u01/app/oracle/diag/rdbms/test/test/trace", 0775) = -1 EEXIST (File exists) ----->Here, we need to create the bdump directory with 755 permissions, but The creation failed because the directory already exists.




And when the Bdump directory has x permissions, the Strace trace of Sqlplus/as sysdba is as follows:



6451 stat("/u01/app/oracle", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
6451 getrlimit(RLIMIT_NOFILE, {rlim_cur=64*1024, rlim_max=64*1024}) = 0
6451 open("/proc/self/fd/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5
6451 fcntl(5, F_GETFD) = 0x1 (flags FD_CLOEXEC)
6451 getrlimit(RLIMIT_FSIZE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
6451 stat("/u01/app/oracle/diag", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/trace", {st_mode=S_IFDIR|0750, st_size=49152, ...}) = 0 ---> The bdump privilege is 750
6451 stat("/u01/app/oracle/diag/rdbms/test/test/alert", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/incident", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/metadata", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/metadata_pv", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/metadata_dgif", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/hm", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/ir", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/incpkg", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/sweep", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/lck", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/cdump", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/stage", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/metadata", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
6451 lstat("/u01/app/oracle/diag/rdbms/test/test/metadata/ADR_CONTROL.ams", {st_mode=S_IFREG|0640, st_size=65536, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/metadata/ADR_CONTROL.ams", {st_mode=S_IFREG|0640, st_size=65536, ...}) = 0
6451 lstat("/u01/app/oracle/diag/rdbms/test/test/metadata/ADR_INVALIDATION.ams", {st_mode=S_IFREG|0640, st_size=65536, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/metadata/ADR_INVALIDATION.ams", {st_mode=S_IFREG|0640, st_size=65536, ...}) = 0
6451 lstat("/u01/app/oracle/diag/rdbms/test/test/metadata/INC_METER_IMPT_DEF.ams", {st_mode=S_IFREG|0640, st_size=65536, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/metadata/INC_METER_IMPT_DEF.ams", {st_mode=S_IFREG|0640, st_size=65536, ...}) = 0
6451 lstat("/u01/app/oracle/diag/rdbms/test/test/metadata/INC_METER_PK_IMPTS.ams", {st_mode=S_IFREG|0640, st_size=65536, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/metadata/INC_METER_PK_IMPTS.ams", {st_mode=S_IFREG|0640, st_size=65536, ...}) = 0
6451 lstat("/u01/app/oracle/diag/rdbms/test/test/metadata/INCIDENT.ams", {st_mode=S_IFREG|0640, st_size=65536, ...}) = 0
6451 stat("/u01/app/oracle/diag/rdbms/test/test/metadata/INCIDENT.ams", {st_mode=S_IFREG|0640, st_size=65536, ...}) = 0
6451 brk (0xd867000) = 0xd867000
6451 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 6
6451 bind(6, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
6451 close(6) = 0
6451 access("/u02/app/oracle/product/11.2.0.4/db_1/network/admin/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
6451 stat("/u02/app/oracle", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
6451 stat("/u02/app/oracle/diag", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
6451 stat("/u02/app/oracle/diag/clients", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
6451 uname({sys="Linux", node="rhel63single", ...}) = 0
6451 getuid() = 500
6451 socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 6
6451 connect(6, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
6451 close(6) = 0
6451 socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 6
6451 connect(6, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
6451 close(6) = 0
6451 open("/etc/nsswitch.conf", O_RDONLY) = 6
6451 fstat(6, {st_mode=S_IFREG|0644, st_size=1688, ...}) = 0
6451 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe94438c000
6451 read(6, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1688


Sqlplus/as SYSDBA output by using the Linux strace command to track the Bdump directory's X permission loss

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.