Posts Tagged ‘Oracle’

Oracle : Install Oracle Developer Suite 10g on Windows 7

January 2nd, 2013, posted in Microsoft, Oracle
Share

Install Oracle Developer Suite 10g

When you try to install Oracle Developer Suite on your windows Vista or Windows 7 PC but it’s failing giving an error message

Checking Operating system version must be 5.0, 5.1 or 5.2….. Actual 6.0 or 6.1 – Failed

What will you do ??

Don’t worry, simply follow the following steps, and it will works.
Before installation, right click on setup.exe then click properties, from the tab select compatibility and select windows xp service pac3/pac2 from compatibility mode settings.

Click okay !

And now try to install… it works

Oracle Developer 10g on windows 7

Share

Oracle : Oracle Database Connection Strings in PHP

December 29th, 2012, posted in Oracle
Share
It’s easy to get confused as to how to specificy your Oracle database connection string, and there’s a handy new feature in Oracle 10g that makes this a whole lot easier. So here’s a little rundown of the three ways to connect to Oracle databases. You can use the:
  • tnsnames.ora file
  • Full connection string
  • Easy connect string
These examples show how to specificy an Oracle connection string using the new OCI8 functions in PHP.


tnsnames.ora File

The tnsnames.ora file is a client side
file that maps an alias used by client programs to a database service. It is used to connect to a non-default database. Here you have to have an entry in the tnsnames.ora file, and
reference the alias to that entry in your connection code.
PHP code:
oci_connect($un, $pw, ‘MYDB’);
tnsnames.ora entry
MYDB = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)
(HOST = mymachine.mydomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = MYDB.AU.ORACLE.COM)) )


Full Connection String

The full connection string does not require the use of a tnsnames.ora file.
You need to enter the full connection string when you connect to the database in your code.
PHP code:
oci_connect($un, $pw,
‘(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mymachine.mydomain)(PORT=1521))
(CONNECT_DATA=(SERVER=DEDICATED)
(SERVICE_NAME = MYDB)))’);


Easy Connect String

This is one Oracle 10g feature that I use daily. As I constantly connect to so many different databases in my day, this has saved me so much time as I don’t have to configure anything, just know the machine name and the database alias and I’m off.
The easy connect string does not require the use of a tnsnames.ora file, and is an abbreviated version of the full connection string. you must have the Oracle 10g client-side libraries to use the easy connect string.
PHP code:
oci_connect($un, $pw, ‘//mymachine.mydomain:port/MYDB’);
Share

Oracle : Oracle Error Code

December 4th, 2012, posted in Oracle
Share

This is the link which would really help you at the time of need. It will help you to find your oracle error code for you :

Link : http://psoug.org/oraerror.htm

Share

Basic LINUX Commands That a DBA Should Know

May 26th, 2012, posted in Oracle, Solaris
Share

Basic LINUX commands that a DBA should know

groupadd
This is the command used to create new group. At OS level group is used to give and take  pivillages.
Syntax : groupadd <group name>
Ex : [root@rac5 ~]# groupadd group1
View : [root@rac5 ~]# cat /etc/group  -This command used to view which user belongs to which group.
Output: group1:x:607:

useradd
This is the command used to create a new user in a group.
Syntax : useradd -g <group name> <user name>
Ex : [root@rac5 ~]# useradd -g group1 user1

passwd
This is the command used to give password for create use or to update the password.
Syntax : passwd <user name>
Ex: [root@rac5 ~]# passwd user1
Output :
[root@rac5 ~]# Changing password for user soufir.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

date
a. This is the command used to view the current system date.
Syntax : date
Output : Wed Oct 27 21:55:36 IST 2010
b. In order to update the date we can give :
Syntax : [root@rac5 ~]# date -s “2 OCT 2010 14:00:00″  OR
[root@rac5 ~]# date –set=”27 OCT 2010 21:56:00″
Output : Sat Oct  2 14:00:00 IST 2010

cal
This command shows the calender of current year or any.
Ex : [root@rac5 ~]#  Cal
Output : [root@rac5 ~]#    October 2010
Su Mo Tu We Th Fr Sa
1  2
3  4  5  6  7  8  9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

pwd
This command is to view the present working directory.
Ex : [root@rac5 ~]# pwd
Output : [root@rac5 ~]# /root.

cd
a.This is the command used to change a directory
Ex : [oracle@rac5 ~]$ ls
authorized_keys  file   file2  oraInventory  stand.ora
authorized-keys  file1  file3  soufir
[oracle@rac5 ~]$ cd soufir
[oracle@rac5 soufir]$
b.This is used to go back to parent directory
Ex : cd ..
mkdir
This command is used for make a new directory.
Ex : mkdir dir1
rmdir
This commad is used for remove a directory.
Ex : rmdir dir1
rm -rf
This command is used to forcefully remove a direcory.
Ex : rm -fr dir1

man
This command is used to show the online manual pages of related commands
Ex : man ls

ls
This command is used to list all contents of directories
Ex : ls

ls -lt
This command is used to list lot of information about contents of directories
Ex : ls -lt
The permissions are the first 10 characters of the line (-rwxrwx—) and can be broken down as follows.
rwx
r–
r–
1
root
root
765
Apr 23
file.txt
File type
Owner
Group
All
Links
Owner
Group
Size
Mod date
Filename

touch

This command is used create an empty file
Ex : touch file1

cat
This command is used to create and view files of directories
Ex : cat file1
cat file1 > newfile   // owerwrite newfile with file1
cat file1 >> newfile  // append newfile the contents with file1

cp
This command is used to copy a file from one to another
Ex : cp file1 filenew

mv
This command is used to rename the name of a file to other
Ex : mv file1 filenew

su
This command is used to switch one user to other. it doesnot change the current working directory. so you cant access the /usr/sbin  directories.
Ex : su soufir

su –
This command is used to switch one user with changing current working directory.
Ex : su – soufir

*********************************************************************************************************************
Note : Please not do make backups before using these queries and also confirm them yourself or by aother means as
 well.
*********************************************************************************************************************
Share