How could I create a "Linked Server" link from SQL Server 2008R2 64-Bit to Oracle Database 11.2 64-Bit?

How could I create a "Linked Server" link from SQL Server 2008R2 64-Bit to Oracle Database 11.2 64-Bit?
Let's say the SQL Server and Oracle Database are in the same Company Internet Network.
I have the code, but I do not know how to use it. Such as what is System DSN Name? Where could I get it. What does it look like?
Do I need to install any Oracle Client Software in order to link from SQL Server to Oracle? Or SQL Server has the built-in drivers installed already that I can directly create a Linked Server from SQL Server to Oracle?
I need to know details. Thanks.
USE master
go
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}'

You need an OLE DB provider for Oracle. There is one that ships with Windows, but it only supports very old versions of Oracle. Oracle has an OLE DB provider that you can use. I don't know if it's part of Oracle Client or how it is bundled.
You should not use MSDASQL or any DSN.
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • Steps to migrate Project Server 2007 from SQL Server 2005 to SQL Server 2008?

    We need to migrate Project server 2007 from SQL Server 2005 to SQL Server 2008.
    1. Is it as simple as doing backup and restore of databases and pointing Project Server to the new DB server? Or there are some specific steps that should be followed?
    2. Article at
    http://technet.microsoft.com/en-us/library/dd207290(office.12).aspx is about moving databases from one DB server to another (same versions). At one place, it mentions to
    backup all databases but at another place it mentions that
    You should only back up the Draft and Published databases from the source database server.
    What should be done when moving from 2005 to 2008?
    Regards,
    Amit
    Gupta

    High Level step you can get this form  Tech net or MSDN too
    Shut down the SharePoint servers (App / Web)
    backup all of the SharePoint and Project
    Server databases from the SQL 2005 server
    copy these over to the new SQL 2008 server and restore all of
    the databases with the same names
    script out all of the logins used by SharePoint/PS from the SQL 2005 server and create these on the SQL 2008 server
    script out the Delete expired sessions SQL job from the SQL 2005 server and create this on the SQL 2008 server - or create them manually on the SQL 2008 server
    repoint the SQL server DNS Alias from the SQL 2005 server to the SQL 2008 server, if SharePoint and Project Server was installed using the actual SQL server name and no alias, you can create a DNS alias for the old SQL 2005 server name that points to the SQL
    2008 server. This is so that the SharePoint servers can still connect to the same SQL server name
    Start up the SharePoint servers
    kirtesh

  • [Forum FAQ] How do I create calculated measure using AMO in SQL Server Analysis Services?

    Introduction
    In SQL Server Analysis Services (SSAS), you can create a calculated measure in SQL Server Data Tool (SSDT)/Boniness Integrated Development Studio (BIDS). Sometimes you may need to create calculated measure by using AMO in a C# or VB project.
    In this article, I will demonstrate so how to create calculated measure using AMO in SSAS?
    Prerequisites
    Before create calculated measure using AMO, you need to ensure that the following components were installed in your server.
    The multidimensional database AdventureWorks Multidimensional Model 2012
    A SQL Server with SSIS and SSAS installed
    The AMO libraries installed:
    X86 Package (SQL_AS_AMO.msi)
    X64 Package (SQL_AS_AMO.msi)
    Solution
    Here is the detail steps to create calculated measure using AMO in SSAS.
    Open SSDT and create a new SSIS project.
    Drag Script Task to the design surface.
    Click SSIS-> Variables to open the Variables window and add two variables that used to connect to the server and database.
    Create a connection to connect to SSAS server.
    Rename the connection name to ssas.
    Double click the Script Task to open Script Task Editor.
    Add Connection and Database variables to ReadWriteVariables textbox and then click Edit Script button.
    Add AMO reference in the Solution Explore window.
    Copy the script below and paste it into the script.
    Dim objServer As Server
    Dim objDatabase As Database
    Dim strDataBaseID As String
    Dim objCube As Cube
    Dim objMdxScript As MdxScript
    Dim objCommand As Command
    Dim strCommand As String
    objServer = New Server
    objServer.Connect("localhost")
    objDatabase = objServer.Databases("AdventureWorksDW2012Multidimensional-EE2")
    strDataBaseID = objDatabase.ID
    If objDatabase.Cubes.Count > 0 Then
    objCube = objDatabase.Cubes("Adventure Works")
    If objCube.MdxScripts.Count > 0 Then
    objMdxScript = objCube.MdxScripts("MdxScript")
    objMdxScript = objCube.MdxScripts(0)
    Else
    objCube.MdxScripts.Add("MdxScript", "MdxScript")
    objMdxScript = objCube.MdxScripts("MdxScript")
    End If
    objCommand = New Command
    strCommand = "CREATE MEMBER CURRENTCUBE.[Measures].[Multipy Measures By 3]"
    strCommand = strCommand & " AS [Measures].[Internet Sales Amount] * 3, "
    strCommand = strCommand & " VISIBLE = 1 ; "
    objCommand.Text = strCommand
    objMdxScript.Commands.Add(objCommand)
    objMdxScript.Update()
    objCube.Update()
    End If
    objServer.Disconnect()
    Then you can run this SSIS package to create the calculated measure.
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • Linked server error from sql server to oracle

    Hi
    Please help i am getting below error
    Problem Description: OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLE10G" returned message "ORA-01403: no data found".
    Msg 7346, Level 16, State 2, Line 1
    Cannot get the data of the row from the OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLE10G".
    Platform details
    SQl server end
    =====================
    SQl server version :2005
    Oracle client version :10.2.0.1.0
    sql server Platform:widow server 2003 standard edition 32 bit
    ===========================
    oracle server end
    * DB Server = 10.2.0.4
    * Platform = IBM AIX
    AIX version=5.3
    Regards

    Hi,
    This forum is for connecting to non-Oracle databases from Oracle.
    There is a specific forum for Oracle Provider for OLE DB so it would be better to ask the question in that forum -
    Oracle Provider for OLE DB
    Regards,
    Mike

  • SAP Server upgrade from Windows 2003 and 2008 R2 with Oracle Database

    Hi,
    We need to upgrade upgrade our Windows servers that are running our SAP systems from Windows Server 2003 to Windows Server 2008 R2.  We are using Microsoft Clustering for HA so an inplace upgrade seems not possible.
    Someone has suggested to us that we will need to export our database and reimport it to achieve this upgrade however but I cannot understand why this would be necessary (we are not changing the underlying filesystem!).
    Could someone please confirm whether a database export and import is required for this OS upgrade scenario?  I have done a bit of research but nothing has jumped out and now I need an answer to this quickly.
    We are running
    - ERP 6.0 NW 7.01 (soon to be 7.02 with ABAP stack only)
    - XI(PI) Java & ABAP
    - SRM (Java & ABAP)
    - Portal (Java only)
    - PLM (Java & ABAP)
    - BW (BI 7.0) (Java and ABAP)
    Thank You
    Felicity

    Hello,
    You need to go for 'Homogeneous System Copy' to achieve this, but since almost all the systems in your landscape include the Java Stack as well - so the system copy with Export/Import is to be carried out.
    Even if you are not going for file system change, but it is a Windows environment and you can't put SAP up on the target Windows (windows 2008 R2) just by copying the contents and file system from source to target. You need SAPinst to create the registry and all. - On top of that you have Java stacks involved, so for java stack you can't carry out just backup/restore method to put SAP up there on target - so you need Export/import because for java stack some OS level dump is to be collected during system copy from source and it needs to be imported on target OS.
    Are you clear on this one ?
    Read system copy guide once and Search in OSS for the Notes to check how to upgrade from Windows 2003 to Windows 2008 R2.
    Thanks

  • Sql server replication from SQL SERVER VERSION(7.0) to SQL SERVER 2005

    Hi All,
    We are trying to create a replication between Sql server 7.0 data to SQL server 2005 data . We tried to create a local subscription in Sql server ,when tried to connect to publisher  running in Sql server 7.0 it is showing an error message
    like "This Sql server vresion(7.0) is not supported" .
    Could any one please help us with this issue ?
    Thanks
    Sandy

    Hi CRM_Learner,
    SQL Server version 7.0 Service Pack 4 (SP4) is the earliest version that can participate in a replication topology with SQL Server 2005. We need to verify the version of SQL Server. If you configure transactional replication with updating subscribers,
    for a SQL Server 7.0 Publisher, only SQL Server 7.0 Subscribers are supported. SQL Server 7.0, 2000 was out of support in the SQL Server Forums. I suggest you install SQL Server 2005 or later version to configure the SQL Server replication.
    For more information, there is a detail about using multiple Versions of SQL Server in a replication topology.
    http://technet.microsoft.com/en-us/library/ms143241(v=sql.90).aspx
    Regards,
    Sofiya Li
    If you have any feedback on our support, please click here.
    Sofiya Li
    TechNet Community Support

  • About goldengate for sql server  ,and from sql server to sql server replication,help!

    IF I config odbc dsn_ggExtdb , when exect this command:
    DBLOGIN sourcedb dsn_ggExtdb USERID sa,PASSWORD 123456
    error :Unrecognized parameter (SOURCEDB), expected USERID.
    help me!

    Please ensure that you have downloaded the OGG software for SQLserver
    OS >ggsci -v
    Oracle GoldenGate Command Interpreter for Oracle   <-------  here is the problem it should reflect the DB environment that you would like to connect to in this case MS SQLServer
    Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
    Windows x64 (optimized), Oracle 11g on Apr 23 2012 04:55:02
    if the DB is not showing as Sqlserver , please download the correct patch form the Oracle Site and try.

  • How to create a DSN-less connection to SQL Server for linked tables in Access

    hey
    i cant understand how i use that Function
    if that information what you need
     stLocalTableName: dbo_user_name
    stRemoteTableName: user_name
    stServer :sedo2015.mssql.somee.com
    stDatabase :sedo2015
    stUsername :sedo_menf_SQLLogin_1
    stPassword :123456789
    how will be that Function??
    please write that Function to me
    '//Name : AttachDSNLessTable
    '//Purpose : Create a linked table to SQL Server without using a DSN
    '//Parameters
    '// stLocalTableName: Name of the table that you are creating in the current database
    '// stRemoteTableName: Name of the table that you are linking to on the SQL Server database
    '// stServer: Name of the SQL Server that you are linking to
    '// stDatabase: Name of the SQL Server database that you are linking to
    '// stUsername: Name of the SQL Server user who can connect to SQL Server, leave blank to use a Trusted Connection
    '// stPassword: SQL Server user password
    Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As String, Optional stPassword As String)
    On Error GoTo AttachDSNLessTable_Err
    Dim td As TableDef
    Dim stConnect As String
    For Each td In CurrentDb.TableDefs
    If td.Name = stLocalTableName Then
    CurrentDb.TableDefs.Delete stLocalTableName
    End If
    Next
    If Len(stUsername) = 0 Then
    '//Use trusted authentication if stUsername is not supplied.
    stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";Trusted_Connection=Yes"
    Else
    '//WARNING: This will save the username and the password with the linked table information.
    stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";UID=" & stUsername & ";PWD=" & stPassword
    End If
    Set td = CurrentDb.CreateTableDef(stLocalTableName, dbAttachSavePWD, stRemoteTableName, stConnect)
    CurrentDb.TableDefs.Append td
    AttachDSNLessTable = True
    Exit Function
    AttachDSNLessTable_Err:
    AttachDSNLessTable = False
    MsgBox "AttachDSNLessTable encountered an unexpected error: " & Err.Description
    End Function

    thanks more thanks for you
    look i add that code in form
    it worked but i cant add recored  why ??
    Private Sub Form_Open(Cancel As Integer)
    Call AttachDSNLessTable("dbo_user_name", "user_name", "sedo2015.mssql.somee.com", "sedo2015", "sedo_menf_SQLLogin_1", "123456789")
    End Sub

  • How to create a Linked Server from SQL Server 2012 to Postgresql

    Hi, I am working on a third party application which is using Postgresql version 9 database and I am trying create a linked server in SQL Server 2012 using the below stored procedure.
    EXEC master.dbo.sp_addlinkedserver @server = N'LINKEDSERVERPOSTGRES', @srvproduct=N'PostgreSQL',
    @provider=N'MSDASQL', @provstr=N'Driver=PostgreSQL;uid=pguser;Server=pghost;database=pgdatabase;pwd=somepassword'
    Error: Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server.
    I have no clue if a jdbc provider exists in SQL Server to connect to Postgresql or what the right provider is? Could you please let me know if there's a workaround to achieve this.
    Thanks in advance............
    Ione

    See if this helps
    http://www.postgresonline.com/journal/archives/46-Setting-up-PostgreSQL-as-a-Linked-Server-in-Microsoft-SQL-Server-64-bit.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Have trouble query after creating a linked server from SQL Server 2008 to EXCEL 2007

    I created a linked server from SQL Server 2008 Management Studio Express to an EXCEL 2007 workbook using:
    sp_addlinkedserver @server='LSERVER_EX0', @srvproduct='EXCELDATA', @provider='Microsoft.ACE.OLEDB.12.0', @datasrc='C:\Temp\abc.xlsx', @provstr='EXCEL 12.0'
    The linked server LSERVER_EX0 was created, but I cannot see any table(excel sheet), and when i ran the following to query tables,
    sp_tables_ex 'LSERVER_EX0'
    I got:Cannot obtain the schema rowset "DBSCHEMA_TABLES" for OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LSERVER_EX0". The provider supports the interface, but returns a failure code when it is used.
    Any hint why?
    on another note, i was able to import the EXCEL sheets using the Import and Export Data wizard, but i cannot control the column data type and size in this way.

    Open management studio, goto "Server Objects"->"Linked Servers"->Providers, select the provider you use, right click it and in provider options, check "Allow inprocess".

  • How do I create a direct URL link to my iBook product page?

    How do I create a direct URL link to my iBook product page? The Apple iTunes linkmaker webpage appears to have been updated recently --- and I can't create a direct link to my iBook, or any iBook for that matter.

    No, not with a direct link to the iTunes product page which I can copy and use. However I found another work around by viewing another book's product page, then clicking "view more by this author" and found the link that way. Thanks for your reply.

  • How do I create an Adobe id link between my home computer and my computer at work? Want to be able to read books i download at home, at work.

    how do I create an Adobe id link between my home computer and my computer at work? Want to be able to read books i download at home, at work.how do I create an Adobe id link between my home computer and my computer at work? Want to be able to read books i download at home, at work.

    In that case, does anybody know of a program or workaround that will make this so?

  • How do I create a Public Group on the Calendar Server?

    How do I create a Public Group on the Calendar Server?
    <P>
    Anyone can create Private Groups or Member Only Groups. You must be given
    administrative rights to create Public Groups on the Calendar Server. The
    Calendar Server Admin (SYSOP) can give anyone rights to create Public Groups by
    using the uniadmrights tool.
    <P>
    Go to /users/unison/bin/
    and run the uniadmrights
    tool. Some sample syntax:
    <P>
    To list all users with administrative rights:<P>
    % uniadmrights -ls -host yourhostname
    <P>
    To give John Smith, a user on node 10000, rights to administer Public Groups:<P>
    % uniadmrights -e "S=Smith/G=John" -add -pgrp -n 10000
    <P>
    In Calendar Server 4.0, you also have the option of using the Admin Server GUI
    to assign Administrative
    rights (instead of using the command-line method) by going to User Management,
    Administration Rights.
    <P>
    With the proper administrative rights, log into the Calendar Client. Go to Options,
    Manage Groups to create a new group. Choose PUBLIC from the dropdown window,
    add your users and/or resources and click OK to create the Public Group which
    can be seen by all users on the local Calendar Server.

    The following is info that I found in another post that I have been trying to follow.
    MrHoffman      New England
    Re: Configure DNS - OS X Server Next Steps
    Feb 13, 2011 6:36 AM (in response to Jimbooooooo)
    You're setting up internal DNS services, you referenced your ISP DNS servers and you should not have, and now those servers have no translations for your hosts. This is a common misconfiguration.
    See [configuring DNS on Mac OS X Server|http://labs.hoffmanlabs.com/node/1436] for how to set up your internal DNS server.
    And if there are any references to your ISP DNS servers here (within your client settings, within your server settings, your Airport settings, etc), then you're usually going to have DNS and connectivity problems. You're running a server now, so you'll be running your own services, and (particularly because of NAT here) referencing only your own DNS server(s).
    You may be setting up external DNS (if and when you need that), but that should happen after you set up your internal DNS. The above article has a link to setting up external DNS, when you get around to that, if/when you need in-bound connections into your LAN.

  • How do I create a DNS record on my Mac Server?

    How do I create a DNS record on my Mac Server?

    The following is info that I found in another post that I have been trying to follow.
    MrHoffman      New England
    Re: Configure DNS - OS X Server Next Steps
    Feb 13, 2011 6:36 AM (in response to Jimbooooooo)
    You're setting up internal DNS services, you referenced your ISP DNS servers and you should not have, and now those servers have no translations for your hosts. This is a common misconfiguration.
    See [configuring DNS on Mac OS X Server|http://labs.hoffmanlabs.com/node/1436] for how to set up your internal DNS server.
    And if there are any references to your ISP DNS servers here (within your client settings, within your server settings, your Airport settings, etc), then you're usually going to have DNS and connectivity problems. You're running a server now, so you'll be running your own services, and (particularly because of NAT here) referencing only your own DNS server(s).
    You may be setting up external DNS (if and when you need that), but that should happen after you set up your internal DNS. The above article has a link to setting up external DNS, when you get around to that, if/when you need in-bound connections into your LAN.

  • Reading BLOB from SQL Server 2005 using DB Link from Oracle 10g

    Hi All,
    I am trying to read a table's data from SQL Server 2005 using ODBC DB Link created in Oracle 10g (10.2.0.3/4) database. I am not using oracle gateway.
    I am able read all data except for the BLOB data from SQL server 2005. It gives error given below when I try to execute query SELECT * from T_TRANSACTION_DATA@sdeslink inside a stored procedure:
    ORA-22992: cannot use LOB locators selected from remote tables
    Kindly help how to read BLOB from SQL server 2005 inside Oracle 10g.
    Best Regards!
    Irfan

    Irfan,
    If you can read the blob data using 10.2 HSODBC then there should be no problem using the 11g gateway.
    I recommend you download the latest version which is 11.2.0.3 available from My oracle Support as -
    Patch 10404530: 11.2.0.3.0 PATCH SET FOR ORACLE DATABASE SERVER
    This is a full version and does not need a previous version to have bene installed. When installing it needs to be in a completlely separate ORACLE_HOME from the existing 11.2 install.
    For the Ora-22992 problem have a look at this note in My Oracle Support -
    Ora-22992 has a workaround in 10gR2 (Doc ID 436707.1)
    Regards,
    Mike

Maybe you are looking for