From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help setting up labview to work with oracle

Hello,

 

I am a newbie in both Oracle and Labview and I need step-by-step instructions on how to properly configure a connection.

 

I have looked at the Labview Database Toolkit manual but, since I am a beginner, did not help me too much.

 

Any help would be appreciated.

 

Thanks

0 Kudos
Message 1 of 11
(5,708 Views)

It's been a while since I did this, but hopefully this will help you get started.  These are the steps I used to connect to oracle.  First, I'm assuming you’re using Windows.  If so, you need to go to the control panel, then select Administrative Tools.  Then you need to select Data Source (ODBC).  This will pop open an ODBC Data Source Administrator window.  Under the Drivers tab you need to verify you have the Microsoft ODBC for Oracle drivers installed on your system.  If not, you need to get these drivers installed. 

 

Then under the System DSN you need to "add" a system data source.  You need to give it a name, description if you like, user name that has access to the db, and the server where the db is located.  Click OK and then OK again to close the administrator window. 

 

In order to open a connection to the db using the Database Connectivity Toolset you will need to create an *.udl (universal data link) file.  See this link for directions on creating an udl file.  The provider is Microsoft OLE DB Provider for ODBC Drivers.  Under the connection tab use the data source name under item 1 and give it the name you used when you set up your ODBC data source.  Under item 2 fill in the username which has access to the db.  Since my password changes frequently, I left the password blank and input it using my vi.  Under the advanced tab you can select the access permissions you have.  Click OK. 

 

Now you should be ready to use the Database Connectivity Toolset and make your connection.  You should be able to find some LabVIEW examples on how to use the toolkit. 

 

As I stated above, this is my method.  There might be other ways, but this as worked for me.  Good luck.

Message 2 of 11
(5,673 Views)

He given a perfect idea of linking labview with Oracle.

 

Anyway , I will post the Step by step instructions tomoro with snapshots. Wait for a Day. So i can finish the Document.

 

sankar.s 

0 Kudos
Message 3 of 11
(5,662 Views)

Dear BB Herman,

 

Thank you so much for your kind assistance.

 

After toying around with it, I was able to get one of the examples in the toolkit connected with a sample Oracle DB that I have installed. I have it working with the ODBC connection. Are there any advantages in using a UDL link, as opposed to using ODBC?

 

Thanks

0 Kudos
Message 4 of 11
(5,649 Views)

Dear Sankar,

 

I was able to get it to work, however, if you can still provide the guide, I would greatly appreciate it for future reference.

 

Thank you for your kind help.

0 Kudos
Message 5 of 11
(5,647 Views)
If you don't want to create the udl file then you would need to simply provide the name of the data source as configured in the Windows ODBC Administrator and then supply the username and password.  The udl file is just a convenient way to store this information.
0 Kudos
Message 6 of 11
(5,639 Views)

sorry frind, i will upload soon for reference..

 

Not yet Developed the Document...

 

sankar.s

0 Kudos
Message 7 of 11
(5,610 Views)

Here, check out this thread. It doesn't specifically deal with Oracle, but if you do it right very very little of your code should be DBMS-specific.

 

The basic process is that (using the ADO - ActiveX Data Object - interface) you open a connection. The primary parameter for this operation is a "connection string". It tells ADO what driver to use to connect to the database, where the database is located, user id, password, and sometimes some other stuff that is DBMS-specific. Once you have that connection reference you use it to execute commands or perform queries - both written in SQL (Structured Query Language). The good news is that once you make the connection to the database, hardly anything (as I said before) is unique to a particular database product. Finally, when you're done you close your references.

 

Are there specific things that you need help understanding?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 11
(5,586 Views)

Hi! After following your instructions, I press "Test Connection button" and I face ora-12514 error.

My configuration is:

  • Oracle 10g client 32 bits
  • Windows7 64 bits
  • LabView 2011

SeaBed =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.2.242.61)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = sds2009)
    )
  )

 

Any suggestion?

Thanks in advance for the help.

Regards, Roberto

0 Kudos
Message 9 of 11
(4,918 Views)

hi Robertocsp,

 

Welcome on National Instruments' forum !

 

I suggest you to create a new thread for two reason :

This one is too old ( more than 3 years )

You would receive a batter help with your own thread on this forum

 

Regards,

0 Kudos
Message 10 of 11
(4,894 Views)