Create an ODBC DSN for an Oracle Database

Feature Data Objects API

 
Create an ODBC DSN for an Oracle Database
 
 
 

Do the following:

  1. On the Windows Start menu, click Settings, click Control Panel, click Administrative Tools, click Data Sources (ODBC). The ODBC Data Source Administrator dialog box is displayed.
  2. In the ODBC Data Source Administrator dialog box, click the User DNS tab if you want the data source to be visible only to you on this machine, or click the System DSN tab if you want the data source to be visible to others on this machine and on the network. Click Add. The Create New Data Source dialog box is displayed.
    NoteYou may not use the File DSN tab, because Fdo does not support its use.
  3. In the Create New Data Source dialog box, click Oracle in <ORACLE_HOME_NAME>, click Finish. The Oracle ODBC Driver Configuration dialog box is displayed.
    Note<ORACLE_HOME_NAME> represents the value of the Windows registry ORACLE_HOME_NAME parameter. See HKEY_LOCAL_MACHINE/ SOFTWARE/ORACLE/KEY_<ORACLE_HOME_NAME>
  4. In this dialog box, in the text entry box labeled Data Source Name , type the name that you want to use as the value of the DataSourceName connection property.
  5. In this dialog in the text entry box labeled TNS Service Name, type the <SERVICE_NAME> found in the tnsnames.ora file.
    NoteFor example, here’s a typical path to the tnsnames.ora file: C:\oracle\product\10.1.0\Db_1\NETWORK\ADMIN. In this file there are entries similar to the following: ORCL = (..(CONNECT_DATE = (...(SERVICE_NAME = orcl)))
  6. Providing a value for UserId parameter is optional. In this dialog in the text entry box labeled User ID type in all uppercase the name of an Oracle user. Click Test Connection. The Oracle ODBC Driver Connect dialog appears. The Service Name and User Name text entry boxes are populated. Type the password in the text box labeled Password. Click Test Connection. The Testing Connection dialog appears, saying that the connection is successful. Click OK to close this dialog. Click OK to close the Configuration dialog.
    NoteIf you type the User ID in all uppercase letters, you will be able to use all lowercase or all uppercase letters for the UserID connection property value; otherwise you will have to use all uppercase for that value.
  7. In the ODBC Data Source Administrator dialog box, you see the DSN that you just added listed. Click OK.