ODBC Data Source with Oracle 11g - oracle

I am trying to connect to a Primavera P6 Database hosted on my network with driver Oracle in OraDb11g_home1. I currently have readonly access via the frontend, which I can successfully navigate records this way.
However, every attempt I have made to connect with a DSN has failed. I'm assuming that if I can connect to the frontend (even if readonly) that I should be able to connect via DSN with the same credentials?
The farthest I have gotten leaves me with an invalid username/password error. Here are the connection details:
in tnsnames.ora:
CHPPRIPA.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xamxilux002)(PORT = 1521))
)
(CONNECT_DATA =
(SID = CHPPRIPA)
)
)
I have similarly tried connecting using JDBC Driver (using a connection string) with the same username and password where
driver = "oracle.jdbc.driver.OracleDriver"
and
db_url = "jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=ramxilux002)(PORT=1521)))(CONNECT_DATA=(SID=CHPPRIPA)))".
username = "csdba" # (Central Services Database Admin);Level 1 - P6 Client - View Only
I still get the same invalid username/password error.
Am I wrong in believing that the same credentials should get me the same access in both places? Anyone experience this problem?

The user interface known as P6 Professional or P6 Web uses different login credentials than what you need to get into the database. Only the DBA can give you those credentials.
Additionally, I would like to ask why you feel you need access to the database. This will impact how you connect to the database and which schema to use.
The SID you are showing is not typical of the "stock" installer/upgrader for Oracle databases running Primavera P6.
There are FIVE schemas in the Primavera P6 database. It is strongly recommended that you not attach to any except the extended schema for reporting.

Related

Oracle database 12c networking between client and server machine using TNS

I followed the instructions in the link: https://m.youtube.com/watch?v=ONGz9czAikE
And got to the point of testing a Local Net Name Configuration(8:30) when i got to the point of preforming the test it seems like the window is stuck, same thing happens when i try to connect to the server db with Sql developer there i get a socket timeout error after waiting few minutes.
I'm trying to avoid downloading the oracle client software because of a company long security verification protocol.
What am i missing? Any help will be appreciated.
From here:
Oracle 12c server cannot be accessed from remote computer using the .Net provider
Try using an external IP instead of hostname like so:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.30.50.90)(PORT = 1521))
)
)

I install oracle client 11g on my machine .I am not give any username and password of course I am not get that window at initialisation time

How connect to the db .I am tried with the following username and passwords system/manager ,scott/tiger etc .But no luck I am still not connected to the db.And also I am getting TNS:Protocol adapter error. I am not understanding why? I also gone through the services for start/restart But there is no at least one single Oracle service file.How I am getting this oracle services as well as how I connect to the db.Please some body help me. My system operating system windows XP.. I am installing oracle client 11g on windows Xp operating system.
Oracle client is software that allows a remote computer to talk to Oracle. If you were to write a piece of software that communicated with the database, you would use the Oracle Client to facilitate that communication.
If you need oracle database in your machine you can go for Oracle database version like Express edition and Enterprise, standard edition. You can't create any database using the oracle client software.
Note : While installing oracle client(any version) it won't ask any username and password.
Steps to connect Oracle client to Oracle database
Consider your oracle server tnsname like below
ORA11 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORA11)
)
)
Place above tnsname text into your tnsname.ora file (C:\app\oracle\product\network/admin/tnsnames.ora)
After that check your sql*plus prompt like
tnsping databasename
sample output
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=gracelan)
(PORT=1525)) (CONNECT_DATA= (SID=GRA901m)))
OK (80 msec)
connect username/password#dbname
can you please provide your tnsname ping output.
Use your server Name like tnsping orcl in cmd.exe
When ever you want to connect dbserver from dbclient we must know the username and password.That are all knows to the who install the Database server not Database client. From where ever we want to connect to the db we must and should know the username and password .i.e either from dbserver or dbclient.IN OTHER words when installing oracle client we don't enter any username and passwords.Because in client there is no database .we just connect the server db only.The password and username knows whose install DB server not client.From client we connect the server by using server username and server passwords...

How to connect Oracle 11G database using SQL developer from another computer in a LAN connection

I am very new in database and learning Oracle 11G. So, I do not have deep knowledge on it.
I have several computers in my lab connected via LAN. Oracle 11G is installed in computer-A(192.18.100.115). Now I want to use the database from other computers in my Lab via SQL Developer that is installed into all Computers.
Would you please explain
What I need to do in Computer-A for granting access from other Computers?
What I need to do in other computers for getting access from computer-A?
I will be grateful if any one gives me a proper solution.
What I need to do in Computer-A for granting access from other Computers?
You need to make sure the LISTENER is up and running to accept remote connection requests. Listener.ora is a SQL*Net configuration file used to configure Oracle Database Listeners. You will usually find that in ORACLE_HOME\NETWORK\ADMIN directory.
For example,
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0)
(SID_NAME = ORCL)
)
)
As you mentioned your host 192.18.100.115, you need to put it in the hostname.
What I need to do in other computers for getting access from computer-A?
You just need to install Oracle database client. If you only want to connect to the remote DB server, you could install only Instant client.
If you are using SQL Developer, then you could use:
Basic connection type
Or,
TNS connection type
In basic connection type, you need to provide all the connection details in the connection properties itself. For using TNS connection type, you need to configure the tnsnames.ora file present in ORACLE_HOME\NETWORK\ADMIN directory.

Error with ODBC MS ACCESS - Oracle 9i

I want connect MS Access with Oracle 9i. In Oracle I have a few table and in MS Access I want make a new reccords.
Now I have a problem with ODBC I got error:
"[Microsoft][ODBC driver for oracle][Oracle]ORA-12514: TNS: nasłuchowi nie udało się rozstrzygnąć SERVICE_NAME podanego w deskryptorze połączenia (#12514)..........."
In configuraton file DSN I have only:
[ODBC]
DRIVER=Microsoft ODBC for Oracle
and after that I must write login, password and server (I writing example data 192.168.1.1)
my TNSNAMES.ORA
BAZA_AAA =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxxx)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = BAZA_AAA))
)
Others program example SQL Server , TOAD, windows console writing my database but not access
please help me
Instead of IP of server try to use TSN name: BAZA_AAA.
Also this was the 1st time I used MS driver for Oracle. I have always used drivers by Oracle. Do you have them installed? Have you tried them? They have 'TNS Service Name' field and 'Test Connection' button :-)

Can't create Database Link to remote DB in Oracle-DB

We have a CRM system in our company, which uses an Oracle 11g database. It is developed by a third party vendor.
We do not have access to the server which runs the CRM system. But nevertheless, we have working DBA login data available to us (SYS user). It consists of:
server IP: 172.1.2.3
port: 1521
SID: abc
user: sys
password: *
We can use this to access the DB with Oracle SQL Developer 3.1 (Connections >> Properties)
Now parts of the data must be copied out of the CRM-database into an other Oracle database, which resides on another server.
To my understanding, I'd need to create a database link in my target database. I tried something like this:
CREATE PUBLIC DATABASE LINK xxx CONNECT TO sys IDENTIFIED BY ***** USING 'MYTNSENTRY'
My tnsnames.ora is as follows:
MYTNSENTRY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.1.2.3)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = abc)
)
)
.... and my listener.ora look like this:
MYLISTENER=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=172.1.2.3)(PORT=1521))
))
SID_LIST_MYLISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=MYTNSENTRY)
(ORACLE_HOME=C:\somepath) # path to Oracle home of target DB
(PROGRAM=extproc)))
Is PROGRAM=extproc the right choice? There are a couple of other programs to pick. I couldn't even start the listener with lsnrctl because it could not "verify the user" or something. Ironically, the listener-setup and database link to a MS SQL server work smoothly.
Now despite lacking some vital information about the CRM DB system, one can still connect to the DB in SQL Developer. Shouldn't it also be possible to make a connection between two Oracle DBs? Please help me with the setup and the creation of the database link.
----- EDIT: --------
Alex Poole's hint helped me get it to work. I used
show parameters service_names;
to get the full service name. It has the form abc.def, with def being the domain. Thusly, I added the domain name to the TNS alias in tnsnames.ora:
MYTNSENTRY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.1.2.3)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = abc.def)
)
)
The connection can be tested with tnsping MYTNSENTRY on the command prompt of the target DB server. The tnsnames.ora is local. However, I deleted all changes to the "local" listener.ora, since the listener indeed resides on the CRM server.
The SQL command is mostly unchanged, but now the connection works:
CREATE PUBLIC DATABASE LINK xxx CONNECT TO some_user IDENTIFIED BY ***** USING 'MYTNSENTRY'
You've said the SID is abc, but in your tnsnames.ora you've got the SERVICE_NAME in the CONNECT_DATA section. They are not always the same thing - see this question, or this Ask Tom entry. You haven't actually said what error you're getting, but just changing that to SID = might make a difference.
The listener.ora, and indeed the listener, are on the server that hosts the CRM database, not on the one that hosts your 'target' database. As you can connect from SQL Developer that is apparently already configured. The tnsnames.ora does need to be local.
But if you do know the service_name for the CRM database you can skip that and use the EZCONNECT syntax to define everything in the link:
CREATE PUBLIC DATABASE LINK xxx
CONNECT TO non-sys IDENTIFIED BY *****
USING '//172.1.2.3:1521/service_name';
Check your SQL Developer configuration to see if that is already using the service name, rather than SID, and if not you'll need to discover it. If you had access to the CRM server you could use lsnrctl to find the service names that are registered, but as you don't seem to you will need to connect to the database and run show parameters service_names or select value from v$parameter where name = 'service_names';.
You need more privileges to create a public link than a private one, and public is potentially less secure as it exposes your CRM database to anyone on your target one. So I'd only make it public if really needed, and either way connect to a read-only account if you're able to create one.
Also note that if your target database has global_names set to true the database link name has to match the remote service name.
Not only should you NOT connect as SYS unless necessary, you CANNOT connect as SYS over a database link.

Resources