Connect to Oracle using OLEDB with windows authentication - oracle

I have an Active Directory account "Contoso\SomeWinAccount" which I need to use for connecting to Oracle database. When I run a command prompt as a user Contoso\SomeWinAccount, I can successfully connect to Oracle like this:
sqlplus.exe [OracleUserName]#myTnsName
SELECT user FROM dual; returns OracleUserName. This works fine and this is exactly what I need.
The problem is, I need to achieve the same using PowerShell and OLEDB. With this connection string I can connect, but SELECT user FROM dual returns SomeWinAccount:
Provider=OraOLEDB.Oracle;User Id=/;Data Source=myTnsName;OSAutent=1;
What do I need to change in order to be able to act as OracleUserName when connected? Is it even possible with OLEDB provider?
Version: Oracle 12.2

Related

cant open oracle enterpise manager on oracle database 21c

I have problem with login in enterprise manager. I have windows 10 Education.Database successfully installed but still unable to log into http.
Po wydaniu polecenia lsnrctl:
lsnrctl status | findstr HOST
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DESKTOP-M3MIGG3)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESKTOP-M3MIGG3)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=DESKTOP-M3MIGG3)(PORT=5500))(Security=(my_wallet_directory=C:\APEX\APEX\DB\admin\orcl\xdb_wallet))(Presentation=HTTP)(Session=RAW))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESKTOP-M3MIGG3)(PORT=9000))(Presentation=HTTP)(Session=RAW))
when i try to connect in: localhost:9000 I need to enter a username and password, but neither match, I tried to create a user in the database as well, but it also doesn't work
Query select dbms_xdb_config.gethttpsport() looks like:
SQL> select dbms_xdb_config.gethttpsport() from dual;
DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
5500
Can someone help me what should i do? And what could be the problem?
I had the same problem the credentials are not working

ERROR: First connection sqldeveloper username and password

I have already installed sqldeveloper and i can launch SQLdeveloper client on my Linux Ubuntu 16.04 system.
The problem occurs during the first attempt of the new oracle connection from the client.
Error returned:
"I/O: The Network Adapter could not establish the connection"
I have already tryed several times to connect at the database but i still missing the username and password.
Is it possible to configure username and password for SYS/SYSTEM(or who else) user after installation?
Full stop.
You don't have a database.
Installing SQL Developer is just giving you a client you can use to work with an existing Oracle Database, which we often refer to as the 'server.'
SQL Developer is not a database.
So you need to get one.
Then you can use SQL Developer.
You have a few options. I talk about them in detail here.
SQL developer is just like the Key for Safe lock. And Database is the Safe.
So right now you have the key for Safe but doesn't have Safe.
Please get the safe first.
SQL Developer is not the Database. So Installing SQL developer will not give access to DB
Instead SQL Developer is the client side tool to retrieve the data or to do the modification on Database.
To get the database you need to download oracle DB from below link
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle12c-windows-3633015.html

How to create local connection in SQL Developer

I only have SQL Developer installed. What other programs do I need to install to create a local database. Please provide links.
SQL Developer is a client that access to a database server to extract data.
You need a database server.
If you operate with SQLDeveloper probably you like to install Oracle. There is a simplified version of Oracle that is called Oracle-XE. Search it over google and download the right version for your operating system.
Give the username and password of the user you created. You can specify localhost in Host name. If you haven't modified the port on which Oracle works then give 1521. If you haven't changed SID as well then give XE. You might be able to connect with DB.

ora 12560 tns protocol adapter error- while connecting to oracle

I have oracle 9i already installed in my machine. I am trying to connect to the oracle but while connection i am getting "ora 12560 tns protocol adapter error" type of error. i have tried it with the default pass scott/tiger , system/manager..
When i tried to connect to the oracle using default credentials i am getting the above error.
is it the problem with the username and password ? if so how can i get the username and password which is already set ?
IME, ORA-12560 means the Oracle Universal Installer messed up your listener configuration.
Assuming you have an Oracle 9i Server installed on your computer, here's a list of things to check.
does "lsnrctl status" show your database instance?
does "tnsping my_service_name" work?
do tnsnames.ora and listener.ora contain entries for your database? Are the hostname / port etc. correct?
If the configuration is wrong, your best bet is to start netca, remove your existing listener configuration and re-configure it.
One question, though: Why do you want to run Oracle 9i? Do you have to support some kind of legacy application / database? (Oracle 11gR2 is so much nicer than 9i)
Start -> Run -> services.msc
Select the oracle service name and right click on it then select start.

Oracle Client set oracle home

In the Windows, I have issues in Oracle client driver, so Toad and Sql developer can't login. how to create an oracle home ? which bin path I should point to ? how to set up toad home and should point to which oracle bin ?
here is my oracle structure.
--oracle
---- client
--- 11.2.0.1
---- product
---- 10.2.0
---- 11.1.0.6
Thanks
SQL developer is self contained and comes with it's own Oracle drivers. An Oracle client is not necessary in order to make a connection.
Open the program
click on the green plus sign on the left side to create a new connection
Enter a connection name which can be anything you want
enter the username and password
select a Basic connection type to use the built in drivers
enter the machine name, port and database name in SID or service name depending on how your database was configured
click test to confirm and you are good to go
Have you tried making a new Basic connection from SQL Developer as outlined above? Visual Studio should not affect SQL developer and I'm doubtful that it would affect the database name or port.

Resources