How to connect oracle database from solaris platform
I have installed oracle9i client on solaris8, how can I configure to connect other oracle database?
thanks for your assistance!!
If the database is remote you would need to setup a sqlnet.ora and a tnsnames.ora file. Their locations are platform dependent. On AIX the files are in /etc while on some platforms you find the files in /var/opt/oracle and on others $ORACLE_HOME/network/admin. We have a Sun Sparc running SunOS 5.6 that has them in /var/opt/oracle.
Configuation can be done through the installer as part of the install process, probably using a gui tool, or manually. We vote for manually.
See your install README files and the ORANET manuals for details. Or once you know where the files belong copy them from a platform that can access the db you want to reach and just remove unnecessary lines for other databases.
HTH -- Mark D Powell --
Similar Messages
-
How to connect oracle database from tuxedo
Hi,
How to connect oracle database from tuxedo.
If any one can help me.
Regards,it depends on configuration your going to choose, there are two ways--
- Using X/Open standards, for this
you have to make an entry of Resource manager in $TUXDIR/udataobj/RM file.
Then in UBBConfig file in GROUPS section u have to set Openinfo.
It also depend on which database you are going to use.
In your service now you need to call tpopen() API from tpsvrinit() function.
- Other possibility is, take an implicit connection using Pro*C or Pro*Cobol whatever platform you are using.
EXEC SQL Connect ... -
How to connect Oracle database from Active Server page
Hi
This is srinivas aluri
I have developed an application using ASP and MS-SQL7.
Now i want to port this application to Oracle 8i database
I have written my connection in seperate file called
connection.inc using SQL OLEDB provider
If i have to connect oracle database what will be my provider
and what is the exact code for this connection string
Here i am giving the code of SQL databse connection string
strcon= Provider=SQLOLEDB.1;Persist Security Info=False;User
ID=sa;Initial Catalog=prjdb;Data Source=servername
i have tried by changing the provider name from SQLOLEDB.1 to
OraOLEDB.oracle
but i could not able connect the database.
It is giving provider not found or not properly installed error.
But the same code is perfectly working from Visual Basic code.it depends on configuration your going to choose, there are two ways--
- Using X/Open standards, for this
you have to make an entry of Resource manager in $TUXDIR/udataobj/RM file.
Then in UBBConfig file in GROUPS section u have to set Openinfo.
It also depend on which database you are going to use.
In your service now you need to call tpopen() API from tpsvrinit() function.
- Other possibility is, take an implicit connection using Pro*C or Pro*Cobol whatever platform you are using.
EXEC SQL Connect ... -
How to Connect Oracle database from excel
I have installed oracle 11g on Windows 8 64 bit OS on my laptop. I have Microsoft excel 2013. I can connect to database from SQL and from TOAD. Now i want - from excel to connect to database.
Please guide me the steps.
ThanksBelow link may be helpful to you :
http://khalidali-oracledba.blogspot.in/2013/09/connection-between-ms-excel-to-oracle.html
And if you are getting 32 bit vs 64 bit ODBC driver issue then :
https://social.technet.microsoft.com/Forums/office/en-US/2234554e-e93c-438b-990a-6739df19da44/odbc-connection-problem-in-excel-2013-64-bit-windows-8-os-and-x64-processor-oracle-8i?forum=excel
And still you are not able then post the question in :
ODBC
Regards
Girish Sharma -
Moving an Oracle Database from Solaris to AIX
Hi all,
I have been asked to move an SAP system using an Oracle database from
Solaris to AIX (on an IBM P590).
Most of the move is straightforward, except the Oracle database
transfer. It would make my life so much easier if I could simply
restore the Oracle datafiles from an off-line backup of the Solaris
system and then link it to a clean install of the Oracle binaries on
the AIX system, rather than have to do an export and import.
Is this possible, after all the AIX Oracle binaries would be the same
patch level as the Solaris binaries and the file systems would be the
same. Also as it would be an offline backup we would not have to do
any recovery, so the archive logs and the original redo logs would not
be required.
Does anyone know if this is possible or has actually executed it
successfully, any hints and tips on the gotchas would be greatly
appreciated.
TIA
Chris aka BoobBooHello Chris,
unfortunately you didn't write anything about your oracle version or your backup mechanism like RMAN,etc..
I think you will use Solaris on a SPARC architecture and not on x86? (same endian)
If you have RMAN and 10gR2 then you can use the "Database Transport Across Same Endian Platforms":
http://download-uk.oracle.com/docs/cd/B19306_01/backup.102/b14191/wnbradv.htm
> RMAN now supports the CONVERT DATABASE command, which can prepare a whole database for transport to a new platform that uses the same endian format. Database transport across platforms provides a faster and easier way to move databases from one platform to another than previous solutions requiring the use of Data Pump.
Metalinknote #413586.1 has a FAQ and a step on step guide.
If you have created your tablespaces under Oracle 10g (no oracle upgrade from previous releases!!) you can use the "Transportable tablespace feature" and copy the database files. SAP has published note #1035051 for that.
Regards
Stefan -
How to connect Oracle database in VC++.06
How to connect Oracle database in VC++.06 please give me details
on the Insert command button and add the following code to the button click event:
try
string results = "";
OracleConnection con = new OracleConnection("DSN=Employee;uid=system;pwd=test");
con.Open();
..................................................................... -
How to connect oracle database using jsf
how to connect oracle database using javaserver faces with connection pooling
Here is one way...
http://jakarta.apache.org/commons/dbcp/ -
How to connect oracle database with JAVA
how to connect oracle database with JAVA....
using j2sdk and Jcreator . which connector to use .. what are the code for that ..PLEASE .... Ask in an Oracle Java forum.
And read the documentaiton. There is a whole document devoted to doing that. http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/toc.htm has examples.
PLEASE ... do not ask product questions in a forum which clearly has a title saying it is devoted to assisting with download problems. -
How to connect oracle database into VC?GIve step by step.
Hi Experts,
Please help
How to connect oracle database into VC?
I need step by step.
what shall i do the first to connect via jdbc or something else.
whether we have to create dsn name or using jdbc connections?which one to use?
Please give the basic steps.Its very urgent.
Thanks and Regards,
NutanHi ,
all information are in the following document:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6209b52e-0401-0010-6a9f-d40ec3a09424">How to Configure a Business Intelligence JDBC System for Visual Composer</a>
Rgds,
Karim -
How to connect informix database from informatica through JDBC instead of ODBC
How to connect informix database from informatica through JDBC instead of ODBC.
Hi mate,
You may get fast reply for this in informatica forums.
Thanks
http://mkashu.blogspot.com -
How to Connect Oracle Database without using TNS entry
Hi,
i need to connect Oracle Database server from my pc without using the TNS entry. How to do that?
Regards,
007You have marked the question as answered, so it means you can answer my questions:
1.How do i check that i can make easy connect to the server or not, I mean is it configured on Server ?
2.Can I make connection with easy connect without having Net Services software installed on the client ?
3.What if I am not able to access sqlnet.ora ?
4.Is there any difference in connect string, which is based upon OS for easy connect ?
5.How do i use global database name, if it is configured ?
6.What are pros and cons of using easy connect ?
7....
20....
I think this are those 20 questions which John is talking about.
Regards
Girish Sharma -
Moving oracle database from Solaris 10 to 9
Hi all,
Good day,
I am looknig for perfect steps on moving an oracle database from one server to another server.
Below are the details,
From:
SunOS sacsun134 5.10 Generic_142909-17 sun4u sparc SUNW,SPARC-Enterprise [Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit]
To:
SunOS sacsun120 5.9 Generic_122300-54 sun4u sparc SUNW,Sun-Fire-V890 [Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit]
Any metalink ID would also be helpful.
Many Thanks...To clone your ORACLE_HOME binaries, see 300062.1 (How To Clone An Existing RDBMS Installation Using OUI).
To clone your database, see 458450.1 (Steps to Manually Clone a Database)
To re-link the ORACLE_HOME binaries (because of the OS change), see 444595.1 (Is It Necessary To Relink Oracle Following OS Upgrade?)
HTH
Srini -
How to connect Oracle database into Visual basic 6.0
Hi. I am using Oracle I Enterprise version 9.2.0.1, I have a problem for connecting oracle database into VB. I use a ODBC to connect oracle database with VB. By testing connection. Message tells me that "connection successfully", but I can not have a record display in VB. It tells me that can not publish a connection with ODBC. Please tell me why
Are you using the Oracle ODBC driver? If so, which version?
Are you writing your own VB application? What API are you using-- ADO? Can you post the code that's making a connection and the exact text of the error message?
Justin -
How to connect oracle database using DSN from jsp
hello, can any know how can i connect to[b] oracle database using DSN name from jsp .I am using oracle 9i and Tomcat 5
Using odbc tool i have created the dsn name but ithe connection does not make .here is the code that i have tried
Connection connection = null;
try
Class.forName("oracle.jdbc.driver.OracleDriver");
catch(ClassNotFoundException Exception)
out.println("error occoured during loading the driver ");
try
out.println("getting the connection");
connection = DriverManager.getConnection("jdbc:oracle:deepak","scott","tiger");
out.println("connection getted");
catch(Exception exception1)
out.println("error occoured ");
pls help as soon as possible
Sorry, for my englishyou are actually using JDBC so the DSN entry does not matter.
2 things.
Make sure that your oracle database driver is in your classpath on your tomcat server.
I.E. copy the file classes12.jar into your common/lib folder of tomcat, or into your WEB-INF/lib folder of your application. and RESTART your server. classes12.jar can be found on the internet or more easily somewhere within your oracle installation. just search for it.
Make sure your jdbc url is correct. I believe it goes like this.... fill in the blacks
connection conn = DriverManager.getConnection("jdbc:oracle:thin:scott/tiger@MyOracleHost:1521:MyDB");Note how the username are passed in the first string there fore there is no need to pass additional parameters. This method may be depriciated, but if so, just take out the user and pass from the string and continue to pass them as 3 seperate strings.
connection conn = DriverManager.getConnection("jdbc:oracle:thin:MyOracleHost:1521:MyDB","scott","tiger");That should get your connection. if not, post your errors. -
Hi All,
How to connect the Oracle database using C/C++ on Mac OS X? I have used Instant Client library "instantclient-basic-macosx-10.1.0.3" provided by the Oracle but could not be success. I'm using PowerPC G4, Mac OS X 10.4.9, and XCode version 2.4.1.
Specially Mr Oscar Armanini has done this in C on Mac OS X. Please let me know. I would be very thankful to you.
Thanks,
GhufranHi Ghufran
there are two Metalink Notes on using Instant Client with PowerPc Mac:
https://metalink.oracle.com/metalink/plsql/showDoc?db=NOT&id=316497.1
How to Install, Configure and Test Oracle 10g Instant Client Basic,
SQL*Plus and SDK Packages for Mac OS X
(Runs OCI sample code - cdemo81.c)
https://metalink.oracle.com/metalink/plsql/showDoc?db=NOT&id=332588.1
How to Install, Configure and Test Oracle 10g Instant Client Basic,
SQL*Plus and SDK Packages for Mac OS X
(Runs OCCI sample code - occidml.cpp)
The first Metalink Note uses an OCI examples and it is pasted here below,
in case you don't have a Metalink ID.
The second Metalink Note uses an OCCI example.
I have never used Instant Client (neither on Os X or on other platform),
but I was successful on compiling C programs (no GUI involved) using the
Full Client installed on my PowerBook G4.
I'm a DBA, but I was a developer years ago (about when Oracle 7.3
was considered a giant step forward): I installed the Oracle 10.1 db
(a complicated job for a developer) and I got the Full Client
installed as well, for free, so I was happy to compile one of the demo C sources
(those that you can find in the Oracle Pro*C manuals:
by the way, Oracle Pro*C manuals are really worth reading).
Good luck
Oscar
Applies to: Oracle Server - Enterprise Edition - Version: 10.1.0.3
Apple Macintosh PowerPC
Goal
This article will show you how to install and configure your 10g Instant Client (IC) Software for the Mac.
It will install the following packages:
the Basic package
the SQL*Plus package and
the SDK package
and then test its connectivity to an Oracle database using SQL*Plus.
It will also show you how to setup and test a sample program, cdemo81.c, that uses the Oracle Call Interface (OCI)
to connect to the database.
The sample program is located under the <Instant_Client>/sdk/demo directory.
Solution1. Download the following three (3) files from the Oracle Technology Network (OTN) website.
You will need an account to do this.
Macintosh OS X 10g Instant Client Software
a. instantclient-basic-macosx-10.1.0.3.zip (32,395,622 bytes)
b. instantclient-sqlplus-macosx-10.1.0.3.zip (326,740 bytes)
c. instantclient-sdk-macosx-10.1.0.3.zip (293,913 bytes)
NOTE: The above three (3) files will be updated as new patches are released for the 10g Instant Client software. 10.1.0.3 or later versions (10.1.0.x) of these files may be used similarly with this article.
2. Save the following text into a file called tnsnames.ora:
# If you receive an
# ORA-12154: TNS:could not resolve the connect identifier specified
# error when running the setup script and attempting to connect to Oracle
# from SQL*Plus then the name of your SERVICE NAME (i.e. ORCL) may require
# that you include the DOMAIN (i.e. US.ORACLE.COM) in order to connect successfully.
# To obtain the DOMAIN of your environment, type "hostname" from your shell
# and it should report this information back to you. Configure your SERVICE
# NAME to look like Example 2.
# Example 1
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = database_machine.us.oracle.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = orcl)
# Example 2
#ORCL.US.ORACLE.COM =
# (DESCRIPTION =
# (ADDRESS = (PROTOCOL = TCP)(HOST = database_machine.us.oracle.com)(PORT = 1521))
# (CONNECT_DATA =
# (SERVER = DEDICATED)
# (SID = orcl)
3. Save the following text into a file called sqlplus_script.sql:
SELECT user FROM dual;
SELECT sysdate FROM dual;
SELECT 'successful ' AS TEST_RESULTS FROM dual;
exit;
4. Save the following text into a file called setup1:
# ===========================================
# MAC OS X INSTANT CLIENT 10g SCRIPT - SETUP1
# ===========================================
# DESCRIPTION
# ===========
# This script will install and configure your 10g Instant Client (IC) Software
# for the Mac. It will install the Basic, SQL*Plus and SDK (OCI/OCCI) packages
# and then test its connectivity to an Oracle database using SQL*Plus.
# Once this script has completed, you will need to run the script SETUP2 to build
# and run the CDEMO81.C sample application located under the <IC>/sdk/demo folder
# in your newly installed Instant Client home.
# NOTE: In order for this script to run successfully, you MUST perform any
# necessary actions required under the SETUP section below.
# SETUP
# =====
# (1) You MUST be in a directoy with ALL of the following files
# BEFORE running this script:
# 1 - instantclient-basic-macosx-10.1.0.3.zip
# 2 - instantclient-sqlplus-macosx-10.1.0.3.zip
# 3 - instantclient-sdk-macosx-10.1.0.3.zip
# 4 - tnsnames.ora (configured properly)
# 5 - sqlplus_script.sql (connectivity test)
# 6 - setup1 (this file)
# 7 - setup2 (will run this file later)
# (2) Edit the TNSNAMES.ORA file and update it with the necessary information
# to connect to a database on your network. Be sure to note the comments
# in this file. You will have to change the following information:
# SERVICE NAME (orcl or orcl.us.oracle.com)
# HOST (database_machine.us.oracle.com)
# PORT (1521)
# SID (orcl)
# (3) Go to the end of this scrip and modify the following line:
# ./instantclient10_1/sqlplus scott/tiger@orcl @sqlplus_script.sql
# Replace "orcl" with the SERVICE NAME you used in step (2) above.
# (4) To run this script use the command: ". setup1"
# BEGINNING OF SCRIPT
# output this file to your shell
echo
echo MAC OS X INSTANT CLIENT 10g SCRIPT - SETUP1
echo
#more setup1
# output the TNSNAMES.ORA file to your shell
echo TNSNAMES.ORA FILE
echo
more tnsnames.ora
# remove the instantclient10_1 directory should it exist
echo
echo CHECKING FOR instantclient10_1 DIRECTORY...
echo WILL REMOVE DIRECTORY IF IT ALREADY EXISTS
echo
rm -d -f -R instantclient10_1
# extract the instantclient software (basic, sql*plus & sdk)
echo
echo
echo INSTALLING SOFTWARE...
echo
echo BASIC
echo
unzip instantclient-basic-macosx-10.1.0.3.zip
echo
echo SQL*PLUS
echo
unzip instantclient-sqlplus-macosx-10.1.0.3.zip
echo
echo SDK
echo
unzip instantclient-sdk-macosx-10.1.0.3.zip
# set the following environment variables
# Uncomment if you want a way to find the Instant Client (IC) home quickly
#export IC=$PWD/instantclient10_1
# Dynamic Library path required to use the Instant Client (IC) software
export DYLD_LIBRARY_PATH=$PWD/instantclient10_1
# TNS_ADMIN is required if using the TNSNAMES.ORA file (recommended)
export TNS_ADMIN=$PWD/instantclient10_1
# display the modified environment variables
echo
echo SETTING ENVIRONMENT VARIABLES
echo
echo DYLD_LIBRARY_PATH
echo $DYLD_LIBRARY_PATH
echo
echo TNS_ADMIN
echo $TNS_ADMIN
# display all environment variables
#echo
#echo ALL ENVIRONMENT VARIABLES
#echo
#env
# copy the TNSNAMES.ORA to the instantclient directory
echo
echo COPYING TNSNAMES.ORA TO INSTANT CLIENT [IC] DIRECTORY
echo
cp tnsnames.ora ./instantclient10_1/tnsnames.ora
# list the contents of the IC directory to see what has been installed
echo
echo INSTANT CLIENT [IC] DIRECTORY
echo
ls ./instantclient10_1
echo
# SQL*Plus Connectivity Test
# To connect to the database specified in your TNSNAMES.ORA file change the
# SERVICE NAME (i.e. orcl) below to the name of the entry in your TNSNAMES.ORA
# file designating the specific database in which you want to connect to
echo
echo SQL*PLUS CONNECTIVITY TEST
./instantclient10_1/sqlplus scott/tiger@orcl @sqlplus_script.sql
# Alternately, you can connect from SQL*Plus to Oracle without using a TNSNAMES.ORA
# file. You can embed the NAME-VALUE pair of the SERVICE NAME from the TNSNAMES.ORA
# file directly into the connection string making sure to use the proper HOST, PORT
# and SID like so:
#./instantclient10_1/sqlplus scott/tiger@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=database_machine.us.oracle.com)(PORT=1521)))(CONNECT_DATA=(SID=orcl)))
5. Save the following text into a file called setup2:
# ===========================================
# MAC OS X INSTANT CLIENT 10g SCRIPT - SETUP2
# ===========================================
# DESCRIPTION
# ===========
# This script will build and run the OCI sample application CDEMO81.C inside
# your Instant Client (IC) software located under the <IC>/sdk/demo folder.
# NOTE: In order for this script to run successfully
# (A) you MUST have already run the script SETUP1 successfully
# and
# (B) you MUST perform any necessary actions required under the SETUP
# section below.
# SETUP
# =====
# (1) You need to edit the CDEMO81.C application PRIOR to running this script to
# change the connection information. By default, the application will attempt
# to connect as user SCOTT with password TIGER to a local Oracle database using
# the BEQ-LOCAL network protocol. This will not work.
# (A) You need to make sure you have the SCOTT/TIGER schema created in your database.
# If not, have your DBA create it by running the script "SCOTT.SQL" from your
# <ORACLE_HOME>/rdbms/admin folder.
# (B) You need to modify the CDEMO81.C application to connect to the database
# you have configured inside your TNSNAMES.ORA file.
# (i) Open the CDEMO81.C file located under the <IC>/sdk/demo folder.
# (ii) Find the following line of code:
# (void) OCIServerAttach( srvhp, errhp, (text *)"", strlen(""), 0);
# and change the two empty strings to the SERVICE NAME you are using like so
# (void) OCIServerAttach( srvhp, errhp, (text *)"ORCL", strlen("ORCL"), 0);
# (iii) Save the file.
# (2) You MUST be in the initial directory where you copied all of the files listed
# in script SETUP1. In this same location you will find SETUP2. Run SETUP2 from
# this location.
# (3) To run this script use the command: ". setup2"
# BEGINNING OF SCRIPT
# output this file to your shell
echo
echo MAC OS X INSTANT CLIENT 10g SCRIPT - SETUP2
echo
#more setup2
# output the TNSNAMES.ORA file to your shell
echo TNSNAMES.ORA FILE
echo
more tnsnames.ora
# output the username, password and service name from CDEMO81.C file to your shell
echo
echo USERNAME, PASSWORD AND SERVICE NAME INFO FROM YOUR OCI cdemo81.c FILE
echo
#more ./instantclient10_1/sdk/demo/cdemo81.c
grep -i "*username" ./instantclient10_1/sdk/demo/cdemo81.c
grep -i "*password" ./instantclient10_1/sdk/demo/cdemo81.c
grep -i OCIServerAttach ./instantclient10_1/sdk/demo/cdemo81.c
# display the required environment variables
#env
echo
echo REPORTING REQUIRED ENVIRONMENT VARIABLES
echo
echo DYLD_LIBRARY_PATH
echo $DYLD_LIBRARY_PATH
echo
echo TNS_ADMIN
echo $TNS_ADMIN
# move to the sdk/demo directory
cd ./instantclient10_1/sdk/demo
echo
echo CHANGING TO [IC]/SDK/DEMO DIRECTORY
echo
ls
# run demo application
echo
echo ATTEMPTING TO RUN APPLICATION
echo
echo BUILDING APPLICATION USING PROVIDED MAKE FILE, [IC]/sdk/demo/demo.mk...
echo
make -f demo.mk
echo
echo
echo INSTANT CLIENT [IC] DIRECTORY...
echo
ls ../..
echo
echo CREATING links FOR REQUIRED LIBRARIES IN INSTANT CLIENT [IC] FOLDER...
echo
echo - libclntsh.dylib
echo - libocci.dylib
ln ../../libclntsh.dylib.10.1 ../../libclntsh.dylib
ln ../../libocci.dylib.10.1 ../../libocci.dylib
echo
echo INSTANT CLIENT [IC] DIRECTORY WITH links CREATED...
echo
ls ../..
echo
echo
echo EXECUTING APPLICATION...
echo
cdemo81
echo
echo
# TROUBLE-SHOOTING
# If you receive the following error messages:
# Error - ORA-24327: need explicit attach before authenticating a user
# Error - ORA-03114: not connected to ORACLE
# Then you did not modify the CDEMO81.C application with proper SERVICE NAME
# information. See step 1B under the SETUP section in this script to resolve
# this error.
6. Take all seven (7) files and move them into the same directory on your OS where you want to install the Instant Client software from:
1 - instantclient-basic-macosx-10.1.0.3.zip
2 - instantclient-sqlplus-macosx-10.1.0.3.zip
3 - instantclient-sdk-macosx-10.1.0.3.zip
4 - tnsnames.ora
5 - sqlplus_script.sql
6 - setup1
7 - setup2
7. Open the file tnsnames.ora. Be sure to review the comments in this file. You will have to change the following information to connect to a database on your network:
SERVICE NAME (orcl or orcl.us.oracle.com)
HOST (database_machine.us.oracle.com)
PORT (1521)
SID (orcl)
Save the file.
8. Open the file setup1, go to the end of this script and modify the following line:
./instantclient10_1/sqlplus scott/tiger@orcl @sqlplus_script.sql
Replace orcl with the SERVICE NAME you used in Step 7 above. Save the file.
9. You are now ready to install the 10g Instant Client software for Mac OS X. From the location where your seven (7) files reside, issue the following command:
[macosx]/oracle> . setup1
NOTE: Be sure to include the period "." and a space " " before the word "setup1" so all environment variables persist for the current session.
This will install the Instant Client Basic and SQL*Plus software and connect to the database specified in the tnsnames.ora file.
10. Here is the sample output of a successful execution of the setup1 script:
[macosx]/oracle> . setup1
MAC OS X INSTANT CLIENT 10g SCRIPT - SETUP1
TNSNAMES.ORA FILE
# If you receive an
# ORA-12154: TNS:could not resolve the connect identifier specified
# error when running the setup script and attempting to connect to Oracle
# from SQL*Plus then the name of your SERVICE NAME (i.e. ORCL) may require
# that you include the DOMAIN (i.e. US.ORACLE.COM) in order to connect successfully.
# To obtain the DOMAIN of your environment, type "hostname" from your shell
# and it should report this information back to you. Configure your SERVICE
# NAME to look like Example 2.
# Example 1
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gbednars-pc.us.oracle.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = orcl)
# Example 2
#ORCL.US.ORACLE.COM =
# (DESCRIPTION =
# (ADDRESS = (PROTOCOL = TCP)(HOST = gbednars-pc.us.oracle.com)(PORT = 1521))
# (CONNECT_DATA =
# (SERVER = DEDICATED)
# (SID = orcl)
CHECKING FOR instantclient10_1 DIRECTORY...
WILL REMOVE DIRECTORY IF IT ALREADY EXISTS
INSTALLING SOFTWARE...
BASIC
Archive: instantclient-basic-macosx-10.1.0.3.zip
inflating: instantclient10_1/classes12.jar
inflating: instantclient10_1/libclntsh.dylib.10.1
inflating: instantclient10_1/libnnz10.dylib
inflating: instantclient10_1/libocci.dylib.10.1
inflating: instantclient10_1/libociei.dylib
inflating: instantclient10_1/libocijdbc10.dylib
inflating: instantclient10_1/ojdbc14.jar
SQL*PLUS
Archive: instantclient-sqlplus-macosx-10.1.0.3.zip
inflating: instantclient10_1/README_IC.htm
inflating: instantclient10_1/glogin.sql
inflating: instantclient10_1/libsqlplus.dylib
inflating: instantclient10_1/sqlplus
SDK
Archive: instantclient-sdk-macosx-10.1.0.3.zip
creating: instantclient10_1/sdk/
creating: instantclient10_1/sdk/demo/
inflating: instantclient10_1/sdk/demo/cdemo81.c
inflating: instantclient10_1/sdk/demo/demo.mk
inflating: instantclient10_1/sdk/demo/occidemo.sql
inflating: instantclient10_1/sdk/demo/occidemod.sql
inflating: instantclient10_1/sdk/demo/occidml.cpp
creating: instantclient10_1/sdk/include/
inflating: instantclient10_1/sdk/include/nzerror.h
inflating: instantclient10_1/sdk/include/nzt.h
inflating: instantclient10_1/sdk/include/occi.h
inflating: instantclient10_1/sdk/include/occiAQ.h
inflating: instantclient10_1/sdk/include/occiCommon.h
inflating: instantclient10_1/sdk/include/occiControl.h
inflating: instantclient10_1/sdk/include/occiData.h
inflating: instantclient10_1/sdk/include/occiObjects.h
inflating: instantclient10_1/sdk/include/oci.h
inflating: instantclient10_1/sdk/include/oci1.h
inflating: instantclient10_1/sdk/include/oci8dp.h
inflating: instantclient10_1/sdk/include/ociap.h
inflating: instantclient10_1/sdk/include/ociapr.h
inflating: instantclient10_1/sdk/include/ocidef.h
inflating: instantclient10_1/sdk/include/ocidem.h
inflating: instantclient10_1/sdk/include/ocidfn.h
inflating: instantclient10_1/sdk/include/ociextp.h
inflating: instantclient10_1/sdk/include/ocikpr.h
inflating: instantclient10_1/sdk/include/ocixmldb.h
inflating: instantclient10_1/sdk/include/odci.h
inflating: instantclient10_1/sdk/include/oratypes.h
inflating: instantclient10_1/sdk/include/ori.h
inflating: instantclient10_1/sdk/include/orid.h
inflating: instantclient10_1/sdk/include/orl.h
inflating: instantclient10_1/sdk/include/oro.h
inflating: instantclient10_1/sdk/include/ort.h
inflating: instantclient10_1/sdk/include/xa.h
SETTING ENVIRONMENT VARIABLES
DYLD_LIBRARY_PATH
/oracle/instantclient10_1
TNS_ADMIN
/oracle/instantclient10_1
COPYING TNSNAMES.ORA TO INSTANT CLIENT [IC] DIRECTORY
INSTANT CLIENT [IC] DIRECTORY
README_IC.htm libocci.dylib.10.1 sdk/
classes12.jar libociei.dylib* sqlplus*
glogin.sql libocijdbc10.dylib* tnsnames.ora
libclntsh.dylib.10.1* libsqlplus.dylib*
libnnz10.dylib ojdbc14.jar
SQL*PLUS CONNECTIVITY TEST
SQL*Plus: Release 10.1.0.3.0 - Production on Fri Aug 19 15:26:08 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options
USER
SCOTT
SYSDATE
19-AUG-05
TEST_RESULTS
successful
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options
IF THE SQL*PLUS CONNECTIVITY TEST WAS SUCCESSFUL
READ SETUP2 TO CONFIGURE AND RUN THE OCI cdemo81.c SAMPLE
[macosx]/oracle>
11. Once you have obtained a successful execution of the setup1 script, you are ready to configure cdemo81.c to connect to the database you have configured inside your tnsnames.ora file.
Open the cdemo81.c file located under the <Instant_Client>/sdk/demo folder. Find the following line of code:
(void) OCIServerAttach( srvhp, errhp, (text *)"", strlen(""), 0);
Change the two (2) empty strings to the SERVICE NAME you used in Step 7 above.
(void) OCIServerAttach( srvhp, errhp, (text *)"ORCL", strlen("ORCL"), 0);
Save the file.
12. You are now ready to run cdemo81.c. You MUST issue the following command from the initial directory where you copied all of the files in Step 6:
[macosx]/oracle> . setup2
NOTE: Be sure to include the period "." and a space " " before the word "setup2" so all environment variables persist for the current session.
This script will configure your environment, build and run the OCI sample code connecting to the database specified in the tnsnames.ora file.
13. Here is the sample output of a successful execution of the setup2 script:
[macosx]/oracle> . setup2
MAC OS X INSTANT CLIENT 10g SCRIPT - SETUP2
TNSNAMES.ORA FILE
# If you receive an
# ORA-12154: TNS:could not resolve the connect identifier specified
# error when running the setup script and attempting to connect to Oracle
# from SQL*Plus then the name of your SERVICE NAME (i.e. ORCL) may require
# that you include the DOMAIN (i.e. US.ORACLE.COM) in order to connect successfully.
# To obtain the DOMAIN of your environment, type "hostname" from your shell
# and it should report this information back to you. Configure your SERVICE
# NAME to look like Example 2.
# Example 1
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gbednars-pc.us.oracle.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = orcl)
# Example 2
#ORCL.US.ORACLE.COM =
# (DESCRIPTION =
# (ADDRESS = (PROTOCOL = TCP)(HOST = gbednars-pc.us.oracle.com)(PORT = 1521))
# (CONNECT_DATA =
# (SERVER = DEDICATED)
# (SID = orcl)
USERNAME, PASSWORD AND SERVICE NAME INFO FROM YOUR OCI cdemo81.c FILE
static text username = (text ) "SCOTT";
static text password = (text ) "TIGER";
(void) OCIServerAttach( srvhp, errhp, (text *)"ORCL", strlen("ORCL"), 0);
REPORTING REQUIRED ENVIRONMENT VARIABLES
DYLD_LIBRARY_PATH
/oracle/instantclient10_1
TNS_ADMIN
/oracle/instantclient10_1
CHANGING TO [IC]/SDK/DEMO DIRECTORY
cdemo81.c* demo.mk occidemo.sql occidemod.sql occidml.cpp
ATTEMPTING TO RUN APPLICATION
BUILDING APPLICATION USING PROVIDED MAKE FILE, [IC]/sdk/demo/demo.mk...
rm -rf SunWS_cache
rm -rf ../../libclntsh.dylib
rm -rf ../../libocci.dylib
rm -rf cdemo81 cdemo81.o occidml occidml.o
/usr/bin/gcc -c -I../include -I/rdbms/public/ -I/oracore/include -I/oracore/publ
ic -I/oracore/port/include -I/nlsrtl/include -I/plsql/public -I/plsql/include -I
/network/public -I/network/include -I/otrace/public -I/otrace/include/ -I/precom
p/public -I/precomp/include/ -I/slax/include -I/ordts/public -I/ordts/include -I
/javavm/include -I/javavm/include/osds/unix/solaris -I/ctx/public -I/ordvir/publ
ic -I/ordvir/include -idirafter . -g -DRE_ENTRANT -DOCCI_NO_WSTRING=1 -DMAC_O
SX -D_GNU_SOURCE -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS -D_BCER
T_API_ -DRSA_PLATFORM=RSA_PLATFORM_MAC_PPC_DARWIN -DNTEV_USE_POLL -DNTEV_USE_GE
NERIC -DNET_USE_LDAP -DOCCI cdemo81.c
ln ../../libclntsh.dylib.10.1 ../../libclntsh.dylib
ln ../../libocci.dylib.10.1 ../../libocci.dylib
/usr/bin/g++ -o cdemo81 cdemo81.o -L../../ -locci -lclntsh -lpthread
rm -rf ../../libclntsh.dylib
rm -rf ../../libocci.dylib
/usr/bin/g++ -c -I../include -I/rdbms/public/ -I/oracore/include -I/oracore/publ
ic -I/oracore/port/include -I/nlsrtl/include -I/plsql/public -I/plsql/include -I
/network/public -I/network/include -I/otrace/public -I/otrace/include/ -I/precom
p/public -I/precomp/include/ -I/slax/include -I/ordts/public -I/ordts/include -I
/javavm/include -I/javavm/include/osds/unix/solaris -I/ctx/public -I/ordvir/publ
ic -I/ordvir/include -idirafter . -g -DRE_ENTRANT -DOCCI_NO_WSTRING=1 -DMAC_O
SX -D_GNU_SOURCE -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS -D_BCER
T_API_ -DRSA_PLATFORM=RSA_PLATFORM_MAC_PPC_DARWIN -DNTEV_USE_POLL -DNTEV_USE_GE
NERIC -DNET_USE_LDAP -DOCCI occidml.cpp
In file included from ../include/occi.h:43,
from occidml.cpp:11:
../include/occiData.h:411: warning: use of `long double' type; its size may
change in a future release
../include/occiData.h:411: warning: (Long double usage is reported only once
for each file.
../include/occiData.h:411: warning: To disable this warning, use
-Wno-long-double.)
ln ../../libclntsh.dylib.10.1 ../../libclntsh.dylib
ln ../../libocci.dylib.10.1 ../../libocci.dylib
/usr/bin/g++ -o occidml occidml.o -L../../ -locci -lclntsh -lpthread
rm -rf ../../libclntsh.dylib
rm -rf ../../libocci.dylib
INSTANT CLIENT [IC] DIRECTORY...
README_IC.htm libocci.dylib.10.1 sdk/
classes12.jar libociei.dylib* sqlplus*
glogin.sql libocijdbc10.dylib* tnsnames.ora
libclntsh.dylib.10.1* libsqlplus.dylib*
libnnz10.dylib ojdbc14.jar
CREATING links FOR REQUIRED LIBRARIES IN INSTANT CLIENT [IC] FOLDER...
- libclntsh.dylib
- libocci.dylib
INSTANT CLIENT [IC] DIRECTORY WITH links CREATED...
README_IC.htm libnnz10.dylib libsqlplus.dylib*
classes12.jar libocci.dylib ojdbc14.jar
glogin.sql libocci.dylib.10.1 sdk/
libclntsh.dylib* libociei.dylib* sqlplus*
libclntsh.dylib.10.1* libocijdbc10.dylib* tnsnames.ora
EXECUTING APPLICATION...
Enter employee name (or CR to EXIT): LARRY
Enter employee job: CEO
Enter employee salary: 10000
Enter employee dept: 40
LARRY added to the OPERATIONS department as employee number 7974
Enter employee name (or CR to EXIT):
Exiting...
[macosx]/oracle/instantclient10_1/sdk/demo>
14. If you have any problems running this script please open a Service Request (SR) with Oracle Support for further assistance and be sure to upload the output from the script to the SR.
ReferencesNote
332588.1 - How to Install, Configure and Test Oracle 10g Instant Client Basic, SQL*Plus and SDK Packages for Mac OS X (Runs OCCI sample code - occidml.cpp)
Errors
ORA-3114 "not connected to ORACLE"
ORA-24327 need explicit attach before authenticating a user
ORA-12154 "TNS:could not resolve service name"
Maybe you are looking for
-
Remote not working - system files...?
hi, sorry for the longish post, gonna detail what i've been doing and the other problems i've dealt with, for background. think the only problem left now tho is with the remote. i coincidentally used my apple remote for the first time yesterday, and
-
In iMessage I'm trying to use my phone number but my phone number is greyed out and won't let me use it. What do I do?
-
Can't open period-GLOOAP try to create ccid with Seg1 invalid by Sec Rules
Hi, 12 months ago, we done a accounting recoding (by legal changes) in two portuguese company which belong our business group. We only change segment1 (17 value by 10... value 10 was desactived by security rules) and we create new ccid's by changing
-
Can't connect to Report Server via Management Studio
Hi, I have a local installation of SQL Server 2005 (Developer Edition) on XP Professional SP2, with Reporting Services, Integration Services, and Analysis Server installed. I can connect to Integration Services and Analysis Server via the SQL Server
-
How to make free size in undotablespace
how to make free size in undotablespace how to remove expiried values in undotablespace?? Edited by: user10896195 on Mar 4, 2011 11:23 AM