Jump to Navigation

234 - Build packages from sorce codes

The rpmbuild command is used to build RPM package. The syntax for rpmbuild is :

# rpmbuild -[b|t]stage [build-option] spec-file ....

Specify -b to build a package directly from a spec file, or -t to open a tarred gzipped file and use its spec file.

1. You need to have the rpmbuild package in Linux server.

Linux:

233 - Resize or Recreate Online Redo log

One of the best ways to resize or recreate online redo log files and keep the current sequence is to perform it online. In this example,
we will resize all online redo logs from 100MB to 300MB while the database is running and use SQL*Plus to drop/recreate them in stages.

1. Check the logs information, files and status.

SQL> SELECT a.group#, a.member, b.bytes FROM v$logfile a, v$log b WHERE a.group# = b.group#;

232 - diff and patch for Linux

The commands diff and patch form a powerful combination. They are widely used to get differences between original files and updated files in such
a way that other people who only have the original files can turn them into the updated files with just a single patch file that contains only the differences.

1. Create a patch

The most simple way of using diff is getting the differences between two files, an original file and an updated file.

Shell Script:

231 - ORA-01033 when you login

When you try to login, you are getting the following error :

 ORA-01033: ORACLE initialization or shutdown in progress

It seems like one of the dbf files is broken or unreadable at this moment. You should check the recovery file.

Oracle:

230 - nagios statuswrl.cgi problem

When I click the "3-D Status Map" link in nagios web UI, the browser tries to download and save the statuswrl.cgi file.

This will happen if you do not have a VRML client / plugin installed for your web browser.
Installing a VRML plugin should resolve this issue.

The folowing plug-in is good for a windows client.

http://www.cortona3d.com/Products/Viewer/Cortona-3D-Viewer.aspx

229 - 7zip

7-Zip is an amazing compression program. Compression ratio results are very dependent upon the data used for the tests. Usually,
7-Zip compresses to 7z format 30-70% better than to zip format. And 7-Zip compresses to zip format 2-10% better than most of
other zip compatible programs.

1. You can search rpm if you want

 URL- http://rpm.pbone.net/

2. Copy the link and use it to rpm comand with "-ivh"

Linux:

228 - What is /proc/kcore?

None of the files in /proc are really there. They're all, "pretend," files made up by the kernel,
to give you information about the system and don't take up any hard disk space.

/proc/kcore is like an "alias" for the memory in your computer. Its size is the same as the amount of RAM you have,
and if you read it as a file, the kernel does memory reads.

 

Linux:

227 - Oracle Memory Usage & Health Check

In terms of memory configuration on DB, you check your applications aspect.

* Sort and Hash join --> Need to increase PGA.
* Multiple & Variety SQLs --> Need to increase SGA.

< SGA >

1. Check if Buffer hit ratio > 95% or not

226 - tune2fs utility

tune2fs is a useful tool that allows users to adjust ext2 / ext3 filesystem options. Chances are that the amount of times Linux does a fsck disk scan
on boot is too frequent, or the default %1 reserved space on the file system is amounting to a significant portion of the hard drive. Using tune2fs,
you can change these settings using tune2fs.

To check block size on the file system :

# tune2fs -l /dev/sdd1 | grep -i 'block size'

225 - adrci (Automatic Diagnostic Repository Command Interpreter)

Starting with 11gR1, we have a new way to deal with Oracle Errors & Tracefiles: There is now a special command line utility
dedicated for that purpose called adrci.

This posting is intended to show you the (in my view) essential commands, a DBA ought to know in order to use it. We will look at

    1. Viewing the alert.log
    2. The relation between incident & problem
    3. Creation of Packages & ZIP files to send to Oracle Support
    4. Managing, especially purging tracefiles

Available Options :

Oracle:

Pages

Subscribe to LAMP, Database and Cloud Technical Information RSS


Main menu 2

by Dr. Radut