16 June 2014

3 reasons to change a job!

The three major reasons to make a job change are opportunity, money and location. It’s critical that you understand their importance and never forget their consequences upon your career decision to change jobs. Always stay focused on opportunity during the interview. These three reasons must be accepted as gospel because they’re proven through many years of experience.


1. OPPORTUNITY
Opportunity should be your prime reason to accept a new job and override all other reasons. This should be 60 percent of your consideration. When considering a job change the #1 rule in the selection process is opportunity, opportunity, opportunity. It should not be money or location. If the opportunity’s not right, the rest doesn’t matter. The key questions to evaluate the opportunity are: does the company believe in…commitment to building brand equity; an entrepreneurial environment; a culture that values risk-taking; commitment to pushing the decision-making down? And when it comes to the IT industry in India, consider asking, if you are going to be allocated to a project or you are part of mass intake for their pipeline projects. To know this, most of the projects have client rounds too, if you are having an additional client round of interview also, consider it as half done, you might be absorbed into a project directly. Else, spend your time in free pool/Bench pool and waste your valuable time and knowledge.


2. MONEY
Money means the money package. This consists of the base salary, incentives, bonuses, commissions, stock options, stock grants, health benefits, savings plan, a company car, a car allowance, an entertainment allowance, club memberships, relocation allowance and retirement programs.
The money and benefits should not be your first reason for acceptance. Don’t let money get in your way of accepting a truly exceptional opportunity. Money should be about 20 percent of your consideration.


3. LOCATION
Accepting a job because of its location is the weakest reason. It should be about 10 percent of your consideration. Choosing location is choosing for your lifestyle preferences, not for your career equity. Before you interview with any company, you must accept the home-office location. Even if the opening doesn’t require relocation, you must be willing to relocate to the home-office city in the future. If you are unwilling to relocate to the home office, your career will be limited. In order to stay in your current location and to move up, you will have to change companies.

In the early stages of your career, opportunity must override your desires for more money and a better lifestyle. In your middle years, job movement just for the money can make sense. Taking a lateral position for a bigger paycheck can be a smart move. During your later years, choosing a location for a stable lifestyle can be the best choice.

The pitfalls of career building can be choosing money or location too early in your career. Poor decisions can lead to job-hopping to stay in one location or to increase your income. In a very short time, your career progress will appear weak. During an interview, you say that you are relocatable, but you don’t get a job offer because you were not believable. The location of the job and future locations must be accepted by you. Companies can change the job title, increase the money package, but they cannot change their home-office location. If you are unwilling to relocate there, why bother with a short-term career move?
ORACLE SID

The Oracle System ID (SID) is used to uniquely identify a particular database on a system. For this reason, one cannot have more than one database with the same SID on a computer system. When using RAC, all instances belonging to the same database must have unique SID's.

Switching between databases

Set the ORACLE_SID environment variable (or ORA_SID on VMS systems) to work on a particular database. Remember that the SID is case sensitive in Unix / Linux environments.

How to set the variable on Windows:
set ORACLE_SID=orcl

How to set the variable on Unix/ Linux:
export ORACLE_SID=orcl

Below are some of the script files which are yet to be tested, to set the ORACLE_SID, will upload them soon!

Download SIDsid script file

Download sample SIDsid script file

Download sample oraarc111 script file

Download sample setpath script file
ORACLE_BASE, ORACLE_HOME and ORACLE_SID
 *********************************************************************************
ORACLE BASE

ORACLE_BASE is an environment variable used as base directory for an Optimal Flexible Architecture installation.

On Unix systems, this is usually
/app/oracle or /u01/app/oracle

How to set the environment on Windows:
set ORACLE_BASE=C:\oracle

How to set the environment on Unix/ Linux:
export ORACLE_BASE=/app/oracle
 *********************************************************************************
ORACLE HOME

ORACLE_HOME refers to either:
a directory where the Oracle software is installed
or
an environment variable pointing to the directory where the Oracle software is installed.

Windows
How to check current value on Windows:
echo The current ORACLE_HOME is %ORACLE_HOME%

How to set the ORACLE_HOME environment variable:
set ORACLE_HOME=C:\oracle\ora11.2

On Windows, the ORACLE_HOME may also be stored in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ALL_HOMES
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Unix & Linux
How to check current value on Unix/ Linux:
env | grep ORACLE_HOME

How to set the ORACLE_HOME environment variable (valid for bash and ksh):
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
 *********************************************************************************
Click on the below link for more details on Oracle SID:

ORACLE SID



08 June 2014

Basic Linux Commands for a DBA

Find the commands below, few more editing to come with time, until then use them.

1. ls -l
For listing the files as well as directories those are kept in the particular working directory.
Syntax: [root@info root]#ls -l

2. ls -la
Shows the hidden files.
Syntax: [root@info root]#ls -la

3. ls -li
Shows us the inode number of each and every file.
An inode stores all the information about a regular file, directory except its data and name.
Syntax: [root@info root]#ls -li

4. ls
Using this command we can see only file name nothing else.
Syntax: [root@info root]#ls

5. clear
It will clear the screen(short cut ctl+l).
Syntax: [root@info root]#clear

6. exit
To end a current session as well current terminal logging.
Syntax : [root@info root]#exit

7. touch
To create a new empty file.
Syntax : [root@info root]#touch

8. cd
To change the present working directory.
Syntax : [root@info root]#cd /home/share

9. cat
To view the contents of a file and it is also used for creating a new file with some contents.
Syntax : [root@info root]#cat

10. mkdir
To make a new directory.
Syntax : [root@info root]#mkdir newdirname

11. rm
To remove an empty file.
Syntax : [root@info root]#rm filename


12. rmdir
To remove a empty directory.
Syntax : [root@info root]#rmdir directoryname

13. rm [-i/-r/-f]
To remove a directory with its subdirectories as well as its files that is to remove a directory which already contains some files in it.
Syntax : [root@info root]#rm -i directory/filename
-i stands for interactively
-r stands for recursively
-f stands for forcefully

14. cp
To copy something in a destination file or directory.
Syntax : [root@info root]#cp sourcepath destinationpath

15. mv
To move one file or directory from one place to another place, it is also used for renaming adirectory or file.
Syntax : [root@info root]#mv
[root@info root]#mv oldfilename newfilename [to change the file name]

16. man
To view the manual page of commands for syntax.
Syntax : [root@info root]#man

17. info
To view the information about any command.
Syntax : [root@info root]#cat info
Shows information about cat command.

18. --help
To view the help documents of a command.
Syntax : [root@info root]#command name --help

19. dir
To view the subdirectories and files under the directory.
Syntax : [root@info root]#dir

20. su
To become a super user.
Syntax : [mango@info mango]$su -

21. who
Shows the user name and their ip addresses who have loged in on your server.
Syntax : [root@info root]#who

22. whoami
Shows your current logged in terminal user name.
Syntax : [root@info root]#whoami

23. who am i
This command shows you the logged in terminal number and user name and more detailed information.
Syntax : [root@info root]#who am I

24. pwd
To view the present working directory.
Syntax : [root@info root]#pwd

25. rpm
-ivh to intall a rpm package.
Syntax : [root@info root]#rpm -ivh packagename.rpm
rpm stands for 'red hat package manager'
-i stands for install
-v stands for verbose mode
-h stands for with hash sign(#)

26. rpm -q
To query about any rpm package.
Syntax : [root@info root]#rpm -q

27. pm -e
To uninstall an rpm package.
Synatx : [root@info root]#rpm -e package

28. find / -name
To find any file or directory in linux file system.
Syntax : [root@info root]#find / -name

29. su username
To switch from one user to another users home directory.
Syntax : [root@info root]#su oracle

30. su - username
To switch from one user to another user users home directory directly.
Syntax : [root@info root]#su – oracle

31. useradd
To create a new user.
Synatx : [root@info root]#useradd

32. passwd
To give a password of a user.
Syntax : [root@info root]#passwd

33. userdel
To remove a user from Linux.
Syntax : [root@info root]#userdel

34. groupadd
To add a new group.
Syntax : [root@info root]#groupadd

35. gruopdel
To delete a group.
Syntax : [root@info root]#groupdel

36. chown
To change the ownership of a file or directory.
Syntax : [root@info root]#chown

37. chgrp
To change the group ownership of a file or directory.
Syntax : [root@nettec root]#chgrp

38. chmod
To change the permission of a file or directory.
drwxrw-rw- 2 root root 4096 Mar 21 1:13 kkk
(permission) (ownr) (grpownr) (size) (name) IN
OCTAL VALUE
d stands for directory READ=4
r stands for read only permission WRITE=2
w stands for write only permission EXECUTE=1
x stands for execute only permission

Syntax : [root@nettec root]#chmod value fileordirectoryname

Update:
ls -1| wc -l
This command will display the count of files in the current directory.



rm -rf `ls -lt | grep 'Dec 21' | awk '{print $9}'`
remove files in the current directory matching the date

find /dbdrlarc/oradata/savdrlpr/archive/*.arc -mtime +2 -exec rm {} \;
remove the files in the above directory and ending with arc extension and files older than 2 days.


CourtesyInformation Center

Tasks of a Database Administrator

Tasks of a Database Administrator

Apart from the normal health-checks and monitoring the databases on a regular basis, the following tasks present a prioritized approach for designing, implementing, and maintaining an Oracle Database, these tasks are discussed below:

Task 1: Evaluate the Database Server Hardware

Evaluate how Oracle Database and its applications can best use the available computer resources. This evaluation should reveal the following information:

  • How many disk drives are available to the Oracle products
  • How many, if any, dedicated tape drives are available to Oracle products
  • How much memory is available to the instances of Oracle Database you will run (see your system configuration documentation)

Task 2: Install the Oracle Database Software

As the database administrator, you install the Oracle Database server software and any front-end tools and database applications that access the database. In some distributed processing installations, the database is controlled by a central computer (database server) and the database tools and applications are executed on remote computers (clients). In this case, you must also install the Oracle Net components necessary to connect the remote machines to the computer that executes Oracle Database.

Task 3: Plan the Database

As the database administrator, you must plan:

  • The logical storage structure of the database
  • The overall database design
  • A backup strategy for the database

It is important to plan how the logical storage structure of the database will affect system performance and various database management operations. For example, before creating any tablespaces for your database, you should know how many datafiles will make up the tablespace, what type of information will be stored in each tablespace, and on which disk drives the datafiles will be physically stored. When planning the overall logical storage of the database structure, take into account the effects that this structure will have when the database is actually created and running. Consider how the logical storage structure of the database will affect:

  • The performance of the computer executing running Oracle Database
  • The performance of the database during data access operations
  • The efficiency of backup and recovery procedures for the database

Plan the relational design of the database objects and the storage characteristics for each of these objects. By planning the relationship between each object and its physical storage before creating it, you can directly affect the performance of the database as a unit. Be sure to plan for the growth of the database.

In distributed database environments, this planning stage is extremely important. The physical location of frequently accessed data dramatically affects application performance.

During the planning stage, develop a backup strategy for the database. You can alter the logical storage structure or design of the database to improve backup efficiency.

It is beyond the scope of this book to discuss relational and distributed database design. If you are not familiar with such design issues, please refer to accepted industry-standard documentation.

Task 4: Create and Open the Database

After you complete the database design, you can create the database and open it for normal use. You can create a database at installation time, using the Database Configuration Assistant, or you can supply your own scripts for creating a database.

Task 5: Back Up the Database

After you create the database structure, carry out the backup strategy you planned for the database. Create any additional redo log files, take the first full database backup (online or offline), and schedule future database backups at regular intervals.

Task 6: Enroll System Users

After you back up the database structure, you can enroll the users of the database in accordance with your Oracle license agreement, and grant appropriate privileges and roles to these users.

Task 7: Implement the Database Design

After you create and start the database, and enroll the system users, you can implement the planned logical structure database by creating all necessary tablespaces. When you have finished creating tablespaces, you can create the database objects.

Task 8: Back Up the Fully Functional Database

When the database is fully implemented, again back up the database. In addition to regularly scheduled backups, you should always back up your database immediately after implementing changes to the database structure.

Task 9: Tune Database Performance

Optimizing the performance of the database is one of your ongoing responsibilities as a DBA. Oracle Database provides a database resource management feature that helps you to control the allocation of resources among various user groups.

Task 10: Download and Install Patches

After installation and on a regular basis, download and install patches. Patches are available as single interim patches and as patchsets (or patch releases). Interim patches address individual software bugs and may or may not be needed at your installation. Patch releases are collections of bug fixes that are applicable for all customers. Patch releases have release numbers. For example, if you installed Oracle Database 10.2.0.0, the first patch release will have a release number of 10.2.0.1.

Task 11: Roll Out to Additional Hosts

After you have an Oracle Database installation properly configured, tuned, patched, and tested, you may want to roll that exact installation out to other hosts. Reasons to do this include the following:

  • You have multiple production database systems.
  • You want to create development and test systems that are identical to your production system.

Instead of installing, tuning, and patching on each additional host, you can clone your tested Oracle Database installation to other hosts, saving time and eliminating inconsistencies. There are two types of cloning available to you:

  • Cloning an Oracle home—Just the configured and patched binaries from the Oracle home directory and subdirectories are copied to the destination host and "fixed" to match the new environment. You can then start an instance with this cloned home and create a database.
You can use the Enterprise Manager Clone Oracle Home tool to clone an Oracle home to one or more destination hosts. You can also manually clone an Oracle home using a set of provided scripts and Oracle Universal Installer.
  • Cloning a database—The tuned database, including database files, initialization parameters, and so on, are cloned to an existing Oracle home (possibly a cloned home).

You can use the Enterprise Manager Clone Database tool to clone an Oracle database instance to an existing Oracle home.

Learn and become a DBA online!

Friends and fellow aspiring DBA's,

I hope to start posting regularly on the blog from today, things related to become an Oracle DBA online, yes, you read that right, BECOME AN ORACLE DBA ONLINE.

The basic and the most important assumption I will have is that, you should have:

"The desire to become a DBA!!!!"

After you have the above thing set in your mind, you are half way through to the GOAL you want to achieve, Oracle Database Administrator

And the other assumptions and prerequisites as below:

  • Prior knowledge of basic SQL
  • Ability to use and operate a PC
  • Basic knowledge of UNIX or Linux a plus, but not necessary
  • Study, practice, study, and then practice some more

Apart from my new blog posts, I intend to teach Oracle DBA courses online too. You can attend my demo lectures on weekends(online), the schedule can be confirmed as per convenience.

Looking ahead in creating lot many more successful Oracle Database Administrators in near future.

For training related queries, please leave a comment below or email me:
learndbaonline@gmail.com

Good Luck folks!