Hello,
I apologize for asking a basic , trivial question regarding the connection to Oracle database through Power Shell Script.
I am not sure if I have to set up a data source on my Window PC in order to connect to Oracle so I would like to seek your helps.
In my window PC , I already had my Oracle Client 12c stores at %Oracle_HOME% and tnsname.ora stores at %ORACLE_HOME%\admin\bin.
Since I am new to window Power Shell , May I ask if I need to set up a data source name for me to connect to Oracle?
The reason I am asking because I see this line of code in the Power Shell said:
$objConnection.Open("Provider=MSDAORA;Data Source=$($domain)1;User Id = test;Password =test")
Please correct me if I am wrong about MSDAORA. I looked it up on Google which said that MSDAORA is short form for “Microsoft OLE DB Provider for Oracle” and it is in the Oracle Client.
So if it is already in my Oracle Client 12 , and I don't need to download anything . Is it a correct statement?
About Data source, I am not sure if I need to set up data source on my window machine. If I need to set it up, will the following instruction work ?
To configure and locate an ODBC data source:
From the Start menu, click Settings, and then Control Panel.
Select Administrative Tools, and then Data Sources (ODBC).
At the top of the "ODBC Data Source Administrator" window, select the System DSN tab, and then click Add....
From the list, select Oracle in OraClient10g_home1, and then click Finish.
I took it from the university web site (https://kb.iu.edu/d/awqf)
Many Thanks for all of the helps.
[Updated on: Fri, 07 February 2020 17:37]
Report message to a moderator