Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 98969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:17:53+00:00 2026-05-11T00:17:53+00:00

I am able to create and execute a DTS package that copies tables from

  • 0

I am able to create and execute a DTS package that copies tables from a remote Oracle database to a local SQL server, but want to setup the connection to the Oracle database as a linked server.

The DTS package currently uses the Microsoft OLE DB Provider for Oracle with the following properties:

  • Data Source: SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.3.42)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=acc)));uid=*UserName*;pwd=*UserPassword*;
  • Password: UserPassword
  • User ID: UserName
  • Allow saving password: true

How do I go about setting a linked server to an Oracle database using the data source defined above?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:17:54+00:00Added an answer on May 11, 2026 at 12:17 am

    I was able to setup a linked server to a remote Oracle database, which ended up being a multi-step process:

    1. Install Oracle ODBC drivers on SQL Server.
    2. Create System DSN to Oracle database on SQL Server.
    3. Create linked server on SQL server using System DSN.

    Step 1: Install Oracle ODBC drivers on server

    a. Download the necessary Oracle Instant Client packages: Basic, ODBC, and SQL*Plus (optional)

    b. Unzip the packages to a local directory on the SQL server, typically C:\Oracle. This should result in a [directory] like C:\Oracle\instantclient_10_2, which will be the value of [directory] referenced in the rest of this answer.

    c. Create a text file named tnsnames.ora within the instant client [directory] that contains the following:

    OracleTnsName =  (   DESCRIPTION=   (     ADDRESS = (PROTOCOL=TCP)(HOST=10.1.3.42)(PORT=1521)   )   (     CONNECT_DATA = (SERVICE_NAME=acc)   ) ) 

    Note: Actual HOST, PORT, and SERVICE_NAME will vary based on Oracle server you are establishing a connection to. This information can often be found using the Oracle network client tools under the listeners.

    The OracleTnsName can be any name you want to assign to the Oracle data source, and will be used when setting up the system DSN. You can also use the syntax above to define multiple TNS names in the same tnsnames.ora file if desired.

    d. Add the [directory] to the system PATH environment variable.

    e. Create a new system environment variable named TNS_Admin that has a value of [directory]

    f. Execute the [directory]\odbc_install.exe utility to install the Oracle ODBC drivers.

    g. It is recommended that you reboot the SQL server, but may not be necessary. Also, you may want to grant security permissions to this directory for the SQL server and SQL agent user identities.

    Step 2: Create a System DNS that uses the Oracle ODBC driver

    a. Open the ODBC Data Source Administrator tool. [ Administrative Tools –> Data Sources (ODBC) ]

    b. Select the System DSN tab and then select the Add button.

    c. In the drivers list, select Oracle in instantclient {version}. (e.g. ‘Oracle in instantclient 10_2’) and then select Finish button.

    d. Specify the following:

    • Data Source Name: {System DSN Name}
    • Description: {leave blank/empty}
    • TNS Service Name: should have the OracleTnsName you defined in the tnsnames.ora file listed, select it as the value.
    • User ID: {Oracle user name}

    e. Select Test Connection button. You should be prompted to provide the {Oracle user password}. If all goes well the test will succeed.

    Step 3: Create linked server in SQL to the Oracle database

    Open a query window in SQL server and execute the following:

    EXEC sp_addlinkedserver       @server        = '{Linked Server Name}'     ,@srvproduct    = '{System DSN Name}'     ,@provider      = 'MSDASQL'     ,@datasrc       = '{System DSN Name}'  EXEC sp_addlinkedsrvlogin       @rmtsrvname    = '{Linked Server Name}'     ,@useself       = 'False'     ,@locallogin    = NULL     ,@rmtuser       = '{Oracle User Name}'     ,@rmtpassword   = '{Oracle User Password}' 

    Note: The {Linked Server Name} can be anything you want to use when referencing the Oracle server, but the {System DNS Name} must match the name of the system DSN you created previously.

    The {Oracle User Name} should be the same as the User ID used by the system DSN, and the {Oracle User Password} should be the same as you used to successfully test the ODBC connection. See KB 280106 for information on troubleshooting Oracle linked server issues.

    Querying the Oracle linked server

    You may use OPENQUERY to execute pass-through queries on the Oracle linked server, but be aware that for very large recordsets you may receive a ORA-01652 error message if you specify a ORDER BY clause in the pass-through query. Moving the ORDER BY clause from the pass-through query to the outer select statement solved this issue for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 71k
  • Answers 71k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Via regex: :s/\v([^, ]+)(\s*,\s*)([^, ]+)/\3\2\1/ If you do it often… May 11, 2026 at 1:25 pm
  • added an answer Unfortunately the library that generated the XML used a relative… May 11, 2026 at 1:25 pm
  • added an answer It's easiest to turn off lazy loading for the animal… May 11, 2026 at 1:25 pm

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.