Specifying a Linked Server as parameter/environment in a 2012 SSIS project

I have a server that will hold the 2012 SSIS projects which I want to run against the AlwaysOn Listener. How do I to specify the linked server in a parameter? If I just use a server parameter that matches the Linked Server name will that work?
Just to mention in SSIS SSDT when specifying the server and pointing to the Listener all the databases appear in the database dropdown but when specifying a node only the non-AlwaysOn databases appear. Weird?

Porjects or packages?
Linked Server? Why?
Is your intent is connecting to a read-only secondary?
A name of the server instance that is primary is enough. For read-only replicas you need the connection string amended to include
applicationintent=readonly
All the database supposed to appear that are part of the instance you are connecting to.
Arthur My Blog

Similar Messages

  • SQL 2012 Linked Server connection from SQL 2000

    Hi,
    Does anyone know if it's possible to create a linked server connection in SQL 2000 to a SQL 2012 instance?
    If so, which provider should I use?
    Many Thanks,
    Phil

    Hi Shanky,
    I'm afraid you misunderstood my Q. The above posts show how to create a linked server connection FROM SQL2012 --> SQL 2000.
    I'm trying to create a linked server connection FROM SQL 2000 --> SQL 2012.
    Does anyone know if it's possible?
    Many Thanks,
    Phil
    I guess you dont read posts patiently below link ,which i also posted in my first reply, has details about the same
    http://social.msdn.microsoft.com/Forums/en-US/2e02c603-e28d-49eb-b073-548c59732b5d/linked-server-from-sql2012-to-sql2000?forum=sqlsetupandupgrade
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Hadoop ODBC linked server error: Specified driver could not be loaded due to system error 182

    Hi,
    I am trying to connect to a Hadoop server through a linked server in SQL Server. I downloaded and installed the Microsoft Hive ODBC driver - HiveODBC64.msi. But while I am trying to create the Linked server using this ODBC driver I am getting below error.
    " Specified driver could not be loaded due to system error 182 (Microsoft Hive ODBC driver, D:\....\HiveODBC64.dll). (Microsoft SQL Server, Error: 7303)"
    When I tested it locally and in another server, it is working properly. I am getting this error only in this server. looks like a dll error. But cannot identify where/what is the error. Could someone help me fix this issue.
    Server info:
    OS Name: Microsoft Windows Server 2008 R2 Enterprise Version 6.1.7601 Service Pack 1 Build 7601
    SQL SERVER: Microsoft SQL Server 2008 R2(SP1)

    Hi LinkedServer,
    According to your description, you want to create linked server to connect to a Hadoop server in SQL Server, and you have created it successfully in the test server, the problem is that you get the issue in the production environment, right?
    Based on the error message, as you said it seems that the issue is related to the HiveOBDC64.dll assembly. Since you have done it on the test server, you can copy and replace HiveODBC64.dll to production server in the C:\Program Files\Microsoft Hive ODBC
    Driver\lib directory. Or you can reinstall the Microsoft Hive ODBC driver. Here is a blog which describe how to create a SQL Server Linked Server to HDInsight HIVE using Microsoft Hive ODBC Driver step by step, please refer to the link below to double check
    if your steps are correct.
    http://blogs.msdn.com/b/igorpag/archive/2013/11/12/how-to-create-a-sql-server-linked-server-to-hdinsight-hive-using-microsoft-hive-odbc-driver.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • Linked Server [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    Hi  I have SQL2012 installed on my local machine and have also installed MySQL 5.6.23 installed with a test database.
    I also have my SQL connector installed and MYSQL ODBC Driver 3.51.   
    Which happily connects to the Mysqldb.
    The Datasource Name : mySQL conn
    TCP/IP Server : localhost and Port :3306
    User root
    with pwd
    On the SQL side I have used the following
    EXEC master.dbo.sp_addlinkedserver
      @server = N'MYSQLSRV',
      @srvproduct=N'mySQL conn',
      @provider=N'MSDASQL',
      @datasrc=N'mySQL conn'
    However when I try to selet using open query
    SELECT * FROM OPENQUERY ( [MYSQLSRV], 'SELECT * FROM students' )
    it comes back with
    OLE DB provider "MSDASQL" for linked server "MYSQLSRV" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
    Msg 7303, Level 16, State 1, Line 1
    Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "MYSQLSRV".
    I cant understand what I have done wrong .   Any help in this would be great as Ive hit a bit of a brick wall

    Hi Robert3975,
    In addition to other post, please also note the following things.
    1. If you use the 32-bit driver on a 64-bit machine, please run the 32bit version of "odbcad32.exe" by running "c:\Windows\SysWOW64\odbcad32.exe"
     from Start/Run menu and
    create your ODBC DSN. However, for the 64-bit driver, use c:\windows\system32\odbcad32.exe to create your ODBC DSN. For more details, please review this similar
    thread.
    2. Expand the folder Providers under Linked server directory in SSMS and go to properties of MSDASQL provider and configure it properly as described in this blog:
    Creating Linked server to MYSQL from SQL Server.
    Thanks,
    Lydia Zhang
    If you have any feedback on our support, please click
    here.
    Lydia Zhang
    TechNet Community Support

  • Linked Server :: OLE DB provider "OraOLEDB.Oracle" for linked server "ABC" returned message "New transaction cannot enlist in the specified transaction coordinator. ".

    Hello All,
    As mentioned in title, i am stuck up with that articular error from last three days,
    i have following scenario, my SQL server 2008, my oracle 10g are on both same machine with OS Windows Server 2008.
    the following error generated on my management studio when i execute my procedure written in my SQL server. Following is original source code snippet after error massage.
    OLE DB provider "OraOLEDB.Oracle" for linked server "ORCL" returned message "New transaction cannot enlist in the specified transaction coordinator. ".
    Msg 50000, Level 16, State 2, Procedure PROC_MIGRATE_MST_FRM_ORA_SQLSERVER, Line 43
    The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server "ORCL" was unable to begin a distributed transaction.
    BEGIN TRY
    -- MIGRATION OF PR_COMPANY_MH START
    BEGIN TRANSACTION T1
    PRINT 'mILAN NNNNNNNNN 11'
    INSERT INTO PROD.PR_COMPANY_MH
    SELECT * FROM OPENQUERY(ORCL, 'SELECT * FROM PR_COMPANY_MH WHERE SQL_FLG = ''N'' ')
    PRINT 'mILAN NNNNNNNNN 12'
    UPDATE OPENQUERY(ORCL, 'SELECT SQL_FLG FROM PR_COMPANY_MH WHERE SQL_FLG = ''N''')
    SET SQL_FLG = 'Y'
    --EXECUTE ('UPDATE PROD.PR_COMPANY_MH SET SQL_FLG = ''Y'' ') AT [ORCL]
    PRINT 'mILAN NNNNNNNNN 13'
    COMMIT TRANSACTION T1
    -- MIGRATION OF PR_COMPANY_MH END
    END TRY
    BEGIN CATCH
    PRINT 'mILAN NNNNNNNNN 14'
    ROLLBACK TRANSACTION T1
    PRINT 'mILAN NNNNNNNNN 15'
    SELECT
    @ErrorNumber = ERROR_NUMBER(),
    @ErrorSeverity = ERROR_SEVERITY(),
    @ErrorState = ERROR_STATE(),
    @ErrorLine = ERROR_LINE(),
    @ErrorProcedure = ISNULL(ERROR_PROCEDURE(), '-');
    PRINT 'mILAN NNNNNNNNN 16'
    SELECT @ErrorMessage = ERROR_MESSAGE();
    RAISERROR (@ErrorMessage, @ErrorSeverity, @ErrorState, @ErrorNumber, @ErrorProcedure)
    PRINT 'mILAN NNNNNNNNN 17'
    END CATCH
    this perticular part is raising that error, and i had tried every configuartion on my local machine related to MS DTC.
    When i remove my transaction code, its work just fine no exception raise, but when i use then i.e. BEGIN TRAN, COMMITE TRAN, AND ROLLBACK TRAN. its giving me error, other wise its fine.
    Please Help or disscus or suggest why my transaction base code is not woking????
    thanks in advance.
    Regards,
    Milan

    Sorry again, I am new on any kind of forum, so i am learning now, following is the error massage generated by SQL Server. and its not
    an architecture problem, i had just included my complete architecture to be more informative while asking for the solution or suggestion. My real problem is T-SQL, i think and its related to Distributed queries raise in SQL Server in Oracle Link Server.
    OLE DB provider "OraOLEDB.Oracle"
    for linked server "ORCL" returned message "New transaction cannot enlist in the specified transaction coordinator. ".
    Msg 50000, Level 16, State 2, Procedure PROC_MIGRATE_MST_FRM_ORA_SQLSERVER,
    Line 43
    The operation could not be performed because OLE
    DB provider "OraOLEDB.Oracle" for linked server "ORCL" was unable to begin a distributed transaction.

  • A network-related error has occurred where Connecting to Hive ODBC by Linked Server

    1) I have created Hive ODBC Driver (Succesfully Tested)
    2) I have created Linked Server on SQL Server 2014 (Succesfully Tested)
    3) SELECT * FROM OpenQuery([SQLHive],
    'SELECT * FROM hivesampletable;')
    ERROR:
    OLE DB provider "SQLNCLI11" for linked server "SQLHive" returned message "Login timeout expired".
    OLE DB provider "SQLNCLI11" for linked server "SQLHive" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance
    name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
    Msg 67, Level 16, State 1, Line 0
    Named Pipes Provider: Could not open a connection to SQL Server [67].
    INSTRUCTIONS FOLLOWED:
    http://ayadshammout.com/2013/05/27/import-hadoop-data-into-sql-bi-semantic-model-tabular/
    CONFIGURATIONS OF ON TEST:
    -Firewall is OFF
    -SQL Server and Windows Authentication mode is ON
    - Named Pipes is ON on SQL Server Confi manager
    Kenny_I

    The subject line and the first point on your list indicates that you want to connect to a Hive data source using ODBC. But the error message tells us that you have set up a linked server with SQL Server Native Client, which is the OLE DB provider you would
    use if you want to connect to another SQL Server instance.
    For using an ODBC driver, you need to use the MSDASQL provider, and in the @provstr argument you specify which ODBC driver you want to use. That is, something like:
    EXEC sp_addlinkedserver 'SQLHive', '', 'MSDASQL',
         @provstr = 'Driver={Hive ODBC Driver}....'
    As I have not worked with the Hive ODBC Driver, I don't know exactly what goes into the @provstr parameter, but it would be the same as if you connected to Hive from an application.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server ...

    Our setup is that we have two databases; a SQL Server 2008 database and an Oracle database (11g). I've got the oracle MTS stuff installed and the Oracle MTS Recovery Service is running. I have DTC configured to allow distributed transactions. All access to the Oracle tables takes place via views in the SQL Server database that go against Oracle tables in the linked server.
    (With regard to DTC config: Checked-> Network DTC Access, Allow Remote Clients, Allow Inbound, Allow Outbound, Mutual Authentication (tried all 3 options), Enable XA Transactions and Enable SNA LU 6.2 Transactions. DTC logs in as NT AUTHORITY\NetworkService)
    Our app is an ASP.NET MVC 4.0 app that calls into a number of WCF services to perform database work. Currently the web app and the WCF service share the same app pool (not sure if it's relevant, but just in case...)
    Some of our services are transactional, others are not.
    Each WCF service that is transactional has the following attribute on its interface:
    [ServiceContract(SessionMode=SessionMode.Required)]
    and the following attribute on the method signatures in the interface:
    [TransactionFlow(TransactionFlowOption.Allowed)]
    and the following attribute on every method implementations:
    [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]
    In my data access layer, all the transactional methods are set up as follows:
    using (IDbConnection conn = DbTools.GetConnection(_configStr, _connStr))
    using (IDbCommand cmd = DbTools.GetCommand(conn, "SET XACT_ABORT ON"))
    cmd.ExecuteNonQuery();
    using (IDbCommand cmd = DbTools.GetCommand(conn, sql))
    ... Perform actual database work ...
    Services that are transactional call transactional DAL code. The idea was to keep the stuff that needs to be transactional (a few cases) separate from the stuff that doesn't need to be transactional (~95% of the cases).
    There ought not be cases where transactional and non-transactional WCF methods are called from within a transaction (though I haven't verified this and this may be the cause of my problems. I'm not sure, which is part of why I'm asking here.)
    As I mentioned before, in most cases, this all works fine.
    Periodically, and I cannot identify what initiates it, I start getting errors. And once they start, pretty much everything starts failing for a while. Eventually things start working again. Not sure why... This is all in a test environment with a single user.
    Sometimes the error is:
    Unable to start a nested transaction for OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLSERVERNAME". A nested transaction was required because the XACT_ABORT option was set to OFF.
    This message, I'm guessing is happening when I have non-transactional stuff within transactions, as I'm not setting XACT_ABORT in the non-transactional code (that's totally doable, if that will fix my issue).
    Most often, however, the error is this:
    System.Data.SqlClient.SqlException (0x80131904): The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLSERVERNAME" was unable to begin a distributed transaction.
    Now, originally we only had transactions on SQL Server tables and that all worked fine. It wasn't until we added transaction support for some of the Oracle tables that things started failing. I know the Oracle transactions work. And as I said, most of the time, everything is just hunky dorey and then sometimes it starts failing and keeps failing for a while until it decides to stop failing and then it all works again.
    I noticed that our transactions didn't seem to have a DistributedIdentifier set, so I added the EnsureDistributed() method from this blog post: http://www.make-awesome.com/2010/04/forcibly-creating-a-distributed-net-transaction/
    Instead of a hardcoded Guid (which seemed to cause a lot of problems), I have it generating a new Guid for each transaction and that seems to work, but it has not fixed my problem. I'm wondering if the lack of a DistribuedIdentifier is indicative of some other underlying problem. I've never dealt with an environment quite like this before, so I'm not sure what is "normal".
    I've also noticed that the DistributedIdentifier doesn't get passed to WCF. From the client, I have a DistributedIdentifier and a LocalIdentifier in Transaction.Current.TransactionInformation. In the WCF server, however there is only a LocalIdentifier set and it is a different Guid from the client side (which makes sense, but I would have expected the DistributedIdentifier to go across).
    So I changed the wait the code above works and instead, on the WCF side, I call a method that calls Transaction.Current.EnlistDurable() with the DummyEnlistmentNotification class from the link above (though with a unique Guid for each transaction instead of the hardcoded guid in the link). I now havea  DistributedIdentifier on the server-side, but it still doesn't fix the problem.
    It appears that when I'm in the midst of transactions failing, even after I shut down IIS, I'm unable to get the DTC service to shutdown and restart. If I go into Component Services and change the security settings, for example, and hit Apply or OK, after a bit of a wait I get a dialgo that says, "Failed ot restart the MS DTC serivce. Please examine the eventlog for further details."
    In the eventlog I get a series of events:
    1 (from MSDTC): "The MS DTC service is stopping"
    2 (From MSSQL$SQLEXPRESS): "The connection has been lost with Microsoft Distributed Transaction Coordinator (MS DTC). Recovery of any in-doubt distributed transactions
    involving Microsoft Distributed Transaction Coordinator (MS DTC) will begin once the connection is re-established. This is an informational
    message only. No user action is required."
    -- Folowed by these 3 identical messages
    3 (from MSDTC Client 2): 'MSDTC encountered an error (HR=0x80000171) while attempting to establish a secure connection with system GCOVA38.'
    4 (from MSDTC Client 2): 'MSDTC encountered an error (HR=0x80000171) while attempting to establish a secure connection with system GCOVA38.'
    5 (from MSDTC Client 2): 'MSDTC encountered an error (HR=0x80000171) while attempting to establish a secure connection with system GCOVA38.'
    6 (From MSDTC 2): MSDTC started with the following settings: Security Configuration (OFF = 0 and ON = 1):
    Allow Remote Administrator = 0,
    Network Clients = 1,
    Trasaction Manager Communication:
    Allow Inbound Transactions = 1,
    Allow Outbound Transactions = 1,
    Transaction Internet Protocol (TIP) = 0,
    Enable XA Transactions = 1,
    Enable SNA LU 6.2 Transactions = 1,
    MSDTC Communications Security = Mutual Authentication Required, Account = NT AUTHORITY\NetworkService,
    Firewall Exclusion Detected = 0
    Transaction Bridge Installed = 0
    Filtering Duplicate Events = 1
    This makes me wonder if there's something maybe holding a transaction open somewhere?

    The statement executed from the sql server. (Installed version sql server 2008 64 bit standard edition SP1 and oracle 11g 64 bit client), DTS enabled
    Below is the actual sql statement issued
    SET XACT_ABORT ON
    BEGIN TRAN
    insert into XXX..EUINTGR.UPLOAD_LWP ([ALTID]
              ,[GRANT_FROM],[GRANT_TO],[NO_OF_DAYS],[LEAVENAME],[LEAVEREASON],[FROMHALFTAG]
              ,[TOHALFTAG] ,[UNIT_USER],[UPLOAD_REF_NO],[STATUS],[LOGINID],[AVAILTYPE],[LV_REV_ENTRY])
              values('IS2755','2010-06-01',
    '2010-06-01','.5',     'LWOP'     ,'PERSONAL'     ,'F',     'F',     'EUINTGR',
    '20101',1,1,0,'ENTRY')
    rollback TRAN
    OLE DB provider "ORAOLEDB.ORACLE" for linked server "XXX" returned message "New transaction cannot enlist in the specified transaction coordinator. ".
    Msg 7391, Level 16, State 2, Line 3
    The operation could not be performed because OLE DB provider "ORAOLEDB.ORACLE" for linked server "XXX" was unable to begin a distributed transaction.
    Able to execute the above statement successfully without using transaction.We need to run the statement with transaction.

  • Can I create a linked server to this ODBC datasource (odbc driver by Progress OpenEdge) on Sql Server 2000 ?

    I installed the Progress OpenEdge ODBC driver for 32 bit database on my win7 workstation -- I used odbcad32.exe located at C:\Windows\SysWOW64 to configure the driver for 32 bit applications -- per the screen Shots here and I am able to connect to the datasource
    from Excel Query.
    I am able to connect to this ODBC datasource from Excel Query and see all the tables -- as in the screen shot.  I can also access this datasource from a C# app.
    Question:  if I can connect to this ODBC datasource from Excel -- does this mean I should be able to create a linked server to it?  I tried the following from SSMS Linked Serber Wizard on a Sql Server 2000 (I have used the Linked server wizard
    successfully in the past as well as linking with Tsql SPs).  This will at least create a mock Linked server on the Sql server 2000 (this does not work on sql server 2008 -- I tried), but when I try to view the catalogs -- I get the error in the screen
    shot below.  If the answer to my question is "YES" yes I should be able to create a linked server to this ODBC datasource what is the way to do this?  I added the UserID and Password in the Security tab, but I did not see where to add the
    port (4000).  What do I enter for the Product Name?  Can it be arbitrary or does it have to be something specific?
    Rich P

    Yes, you should be able to set up this as a linked server - from a 32-bit instance of SQL Server. That is, you can't use a 32-bit driver on 64-bit SQL Server. Now, since you have SQL 2000, I assume that this is a 32-bit instance. (But there was a 64-bit
    version for Itanium of SQL 2000.)
    For the Provider string, I would guess that you should enter something like
    Driver={Progress 11.3 OpenEdge Driver}
    just like you do in your application code.
    Basically, in the provider string, you specify your connection string, except that you take out the provider name, which is a separate parameter to sp_addlinkedserver. Since I know nothing about Progress, I can't give any specific details.
    The error message you get is somewhat puzzling, since this refers to SQLOLEDB which is the provider to access an SQL Server instance.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • TSQL to retrieve Oracle linked server records

    We're porting an Oracle system to SQL server and it's not going well...
    Our system is a data warehouse that extracts data from an Oracle operational system. In the Oracle version we use database links to access Oracle. On SQL Server we've created a linked server. All OK so far.
    When we try to access the linked server in TSQL we have problems:
    - select on a four part name does not pass filters to Oracle and our tables are huge
    - OPENQUERY works fine but won't let us pass parameters
    We therefore seem to be stuck when we want to update SQL server using a single keyed access to Oracle (SQL retrieves the whole table and then filters; we're processing 20,000 records and this is not acceptable!)
    I would appreciate any help you can give; I've spent most of the day searching the web for examples where people have this working, but got nowhere... help!
    Thanks in advance

    tnsping search for an alias in tnsnames.ora. under alias definition it takes HOST and PORT values from ADDRESS.
    I'm almost sure the problem is with an alias. Your config means that in your clients' network there is and oracle cluster with at least 2 nodes (127.1.2.3 and 127.1.2.4) configured to balance workload or smth.
    Do you have network communications set up only to one node or to both? I think the following steps works in both cases, but it won't balance workload nor failover if you have access to both nodes.
    Copy your tnsnames.ora somewhere for backup, then clear its content, copy-paste there a template
    YourAlias =
      (DESCRIPTION =
        (ADDRESS =
          (PROTOCOL = TCP)
          (HOST = 172.1.2.3)
          (PORT = 1545)
        (CONNECT_DATA =
          (SERVICE_NAME = ServiceNameHere)
    and fill it with your alias name, IP address and port (already checked via telnet) and SERVICE_NAME parameter.
    If two nodes have different service names, and you don't know each node you connect, try first one, then the second one.
    To connect to failover environment you surely need network access to both nodes, but I don't know if its enough - i haven't seen configurations like that.
    I did as you instructed and still get TNS-03505: Failed to resolve name.  Does it matter that my TNS Ping is version 12.1.0.1.0, and they are on Oracle 11?  I wouldn't think so but figured I should ask.  Also, is there a way that they could have
    disabled tnsping?  They are extremely secure, and lock everything down so maybe that's the problem here.
    André

  • UCCX 10.1 - Linked Server - Copying HR data to external SQL Server for reporting

    I have a customer that is migrating from UCCX 7 to UCCX 10.  They currently have a 2008 SQL Server R2 that they use for custom reports.  They have a package that runs nightly to copy relevant data from UCCX 7 to the their server and then run reports daily against that database.   Pretty easy when everything is in MS SQL.  My plan was to set up a linked server in SQL 2008 to the UCCX server.  This would allow me to easily run a query against Informix and move the data over as before.  However, I am having problems adding the linked server.
    I have installed the Informix drivers (both 32 and 64 bit) during the troubleshooting.
    The DSN is created and connects to UCCX just fine.
    When I attempt to add the linked server using 64 bit driver DSN I get the following:
    Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "UCCX101".
    OLE DB provider "MSDASQL" for linked server "UCCX101" returned message "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".
    OLE DB provider "MSDASQL" for linked server "UCCX101" returned message "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".
    OLE DB provider "MSDASQL" for linked server "UCCX101" returned message "[Informix][Informix ODBC Driver][-11302] Insufficient Connection information was supplied". (.Net SqlClient Data Provider)
    When I attempt to add the linked server using the 32 bit driver DSN I get the following:
    Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "32UCCX101".
    OLE DB provider "MSDASQL" for linked server "32UCCX101" returned message "[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application". (Microsoft SQL Server, Error: 7303)
    It appears to me there is a 32/64 bit conflict no matter route I go.
    Can anyone tell me what I am missing?
    Is there a better approach to take to achieve the ultimate goal?
    Any suggestions are greatly appreciated.
    TIA
    John

    I have created linked servers on an SQL2K box that points back to CCX. First off, you have to set the password for the UCCX HR user to some known value.
    exec sp_dropserver 'fonccx9_01', 'droplogins'
    EXEC sp_addlinkedserver
    @server='fonccx9_01', -- Name of the Linked Server, when it is created.
    @srvproduct='Microsoft OLE DB Provider for ODBC', -- OLE DB Provider.
    @provider='MSDASQL', -- Provider_name.
    @datasrc ='fonccx9-01', -- DSN Name of the ODBC Data Source.
    @provstr= -- ODBC Connection String.
    'Driver={IBM Informix ODBC};Server=fonccx9_01_uccx;Database=db_cra; Uid=uccxhruser; Pwd=Some-Password;'
    EXEC sp_addlinkedsrvlogin
        @rmtsrvname = 'fonccx9_01',
        @useself = 'FALSE',
        @rmtuser = 'uccxhruser',
        @rmtpassword = 'Some-Password'
    Note that the server name is "fonccx9-01", but the dash is an illegal character in the server name, so you have to change that to an underscore. You still have to manually build the ODBC data source on the box where you are trying to create the linked server.

  • Problem with App-V 5 in Xenapp 6.5 Feature Pack 2 /PVS Server 7.1 Environment

    Hi I hope someone can help me. We are pretty desperate right now.
    At e customer of mine we are Using App-V 5 SP2 RDS Client together with a Xenapp 6.5 Feature Pack 2 /PVS Server 7.1 Environment.
    The Golden Image for PVS gets built with SCCM 2007. We “Install” the App-V Packages local with Powershell with e Install Wrapper.
    The Wrapper uses for Example the following command to “install” the Package during the Task Sequence.
    Add-AppVClientPackage -Path "C:\_SMSTaskSequence\Packages\I010012B\x86-GE\001\Biella-Dominalprint(V)-2.0.appv" -DynamicDeploymentConfiguration "C:\_SMSTaskSequence\Packages\I010012B\x86-GE\001\Biella-Dominalprint(V)-2.0_DeploymentConfig.xml"
    | Publish-AppvClientPackage -Global | Mount-AppvClientPackage -Verbose >C:\Windows\Logs\Install\Biella-Dominalprint(V)-2.0_001.LOG
    The Package was Sequenced with SP1 Sequencer.
    The Package contains e SystemX86 folder
    C:\ProgramData\App-V\5D8F5879-923B-4401-BE13-F6E120F6569C\83FF2A00-5D2A-4A3B-82FD-3238D786BEE3\Root\VFS\SystemX86
    In This Folder are a few Files. One of them is the tdbg5.ocx
    The Package works without a Problem after the Installation of the Server has finished.
    But when the Citrix Department does there Magic with PVS and they provision the VHD to another Server the Package is no longer Working. When we start the App we get an Error that it is Missing the tdbg5.ocx
    But when I Use ACDC 2.0 to start the App or modify the Shortcut with the command /appvve: 5D8F5879-923B-4401-BE13-F6E120F6569C_83FF2A00-5D2A-4A3B-82FD-3238D786BEE3 it is working. Also when I remove the Package with Powershell from the provisioned Server
    and reinstall it again it is working Again.
    We have this Problem with two other Apps and both of them have files in the Root\VFS\SystemX86 Folder.
    We also have e Virtualized Java Package. We have a Shortcut like this:
    C:\ProgramData\App-V\1A971C0F-1C0F-430F-A2E2-2DF8487E6FF0\80A50994-7B30-4FC3-9DA4-1CE8B979B337\Root\VFS\ProgramFilesX86\Java\jre1.6.0.38\bin\javaws.exe
    http://whatever.ch/zpv/webstart/zpv-prod.jnlp
    If I start that link on the provisioned Sever Java Launches but it’s not downloading the App to the Cache. But also here it works perfect after the installation with SCCM, and it also works when I remove the package on the provisioned Sever and “install”
    it again with Powershell. But here the /appvve workaround doesn’t work.
    I know that we should ask that in the Citrix forums, the Citrix department of the Customer is opening a Case with Citrix and one with MS Support.  But we are I a big hurry because the customer needs to start testing the Apps, because they need to start
    the pilot Test very soon. So I hoped that someone in the community can help me out with this.
    Thank you for your answers
    Pascal

    Another alternative, if  you dont want to use the Shared Content Store, is to have your PackageInstallationRoot pointing to a non-provisioned disk (non-PVS).  In our environment we had the same exact issue.  Each of our Citrix servers have
    a D drive thats non-provisioned that we use for Logs.  Once I pointed the PackageInstallationRoot over to this location everything started working.   The key here is to have a script run at server startup that deletes the PackageInstallationRoot
    since the provisioned non-persistent disk will reboot to a fresh image each time.   This way you wont end up with stale content out there as applications are updated and/or removed. 
    There are other things that also have to happen for this to work in these types of environments (related to roaming profile exclusions) that I can provide to you if you need them.  
    Let me know if you want/need more details.

  • Distributed transaction using linked server not working in SQL Server 2008 64 bit

    Hi. I have had an issue trying to get distributed transactions to work in SQL Server 2008 using a linked server. The error message I get is
    OLE DB provider "SQLNCLI10" for linked server "pod1" returned message "No transaction is active.".
    Msg 7391, Level 16, State 2, Line 3
    The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "pod1" was unable to begin a distributed transaction.
    My Environment:
    Windows Server 2008 Enterprise 64 bit, SQL Server 2008 Enterprise 64 bit
    Problem occurs with multiple different builds of SQL Server 2008 - I have been able to reproduce the problem with 10.0.1600.0, 10.0.1779.0 (CU 2), as well as 10.0.2531 (SP1)
    I am aware that other people have had this issue and have reviewed all existing posts. I have verified that the MSDTC is configured correctly on both machines. I have also used DTCTester to verify that DTC is working correctly on all machines in question.
    None of the mentioned resolutions has solved this problem for me.
    I am not seeing this problem occur on my 32 bit test machines - it is only occurring if at least one of the two machines is 64 bit.

    Hi All,
    I realise that this topic may be a little bit out-of-date but if someone gets here from some search engine trying to find a solution for DTC problems, this MAY be useful.
    So... I recently had the same issue, tried all the approaches described in KB and other articles, but it didn't help. Because my task to solve this was not of the highest priority I forgot about it for some time.
    Today I was troubleshooting some other issue and, by accident discovered source of that first problem:
    In the EventViewer I found Error entry logged by MSDTC saying:
    "The local MS DTC detected that the MS DTC on vm-server1 (other machine name that also runs DTC - my comment) has the same unique identity as the local MS DTC. This means that the two MS DTC will not be able to communicate
    with each other. This problem typically occurs if one of the systems were cloned using unsupported cloning tools. MS DTC requires that the systems be cloned using supported cloning tools such as SYSPREP. Running 'msdtc -uninstall' and then 'msdtc -install'
    from the command prompt will fix the problem. Note: Running 'msdtc -uninstall' will result in the system losing all MS DTC configuration information."
    So I followed suggestion and run:
    msdtc -uninstall
    msdtc -install
    This solved my problems with DTC. Hope it will help someone.
    Piotr

  • User created SQL Agent Job that uses linked server with Windows authentication

    OK, here's what I want to do, but not sure exactly what I need to accomplish it.
    Environment
    Windows 2008 Enterprise
    SQL 2012 Enterprise
    SQL Server & SQL Agent running under AD account (which has local Windows Administrative privileges...yes, I know..bad!)
    Linked server to Teradata utilizing AD account mappings (the linked server works successfully and each windows login is mapped to a Teradata LDAP login)
    Requirement
    Allow non sysadmins to create SQL Agent jobs which execute TSQL statements which use OPENQUERY(LDAPLinkedServer, '....) syntax
    I've already given the non sysadmins the necessary permissions to create and run SQL Agent jobs, and I understand that the jobs run under their login context, but I suspect that I'm missing something when it comes to the linked server.
    Each windows user could have access to different databases/tables on the Teradata system that even I (the SQL Server sysadmin) don't have access to.
    How can I facilitate this functionality?  Any ideas?

    I think I may have been over complicating the Teradata piece.  The authentication methodology in Teradata is LDAP, which just means that it authenticates against AD, but you still have to submit your Windows login & password.  It doesn't automatically
    authenticate you just because you're logged into Windows.  
    The linked server has the mapping for the individual windows logins like:
    Local Login = <domain>.<windows id>
    Remote User = <windows id>
    Remote Password = <windows password>
    This setup requires the user to have to change the passwords in the linked server whenever they change their passwords according to domain policy (every xx days)...but we've created a utility proc that they can use to do this.
    So, I'm thinking that Teradata isn't really part of this equation.

  • Importing Data from MS Access into SQL Serevr 2005 via Linked Server: User-Dependent failure

    I am operating an Express version of SQL Server 2005 on a Windows XP machine.
    I have successfully setup a linked server to a remote Access (.mdb) database. With my user account (Windows authentication) I can retrieve and store data without any problem.
    I have another user (apparently with same settings as my own account) that is always failing to get the data.
    The Error message he gets is:
    OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "TSU_Tmp" returned message "The Microsoft Jet database engine cannot open the file '\\DSITSO-NT0001\Exchange\Database5.mdb'.  It is already opened exclusively by another
    user, or you need permission to view its data.".
    Msg 7303, Level 16, State 1, Line 1
    Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "TSU_Tmp".
    Here below the code used to set up the linked server (coming from the Code Snippets of SQL Server 2005).
    EXEC sp_addlinkedserver
    @server = N'TSU_Tmp',
    @provider = N'Microsoft.Jet.OLEDB.4.0',
    @srvproduct = N'OLE DB Provider for Jet',
    @datasrc = N'\\DSITSO-NT0001\Exchange\Database5.mdb'
    EXEC sp_addlinkedsrvlogin
    @rmtsrvname = N'TSU_Tmp',
    @useself = N'TRUE',
    @locallogin = NULL,
    @rmtuser = N'Admin',
    @rmtpassword = NULL
    We both run the script, actually is a Stored Procedure, (see code below) on the same XP machine where SQL Server is running.
    EXEC('INSERT INTO tblFcst
    (StartBUCode, StartBUType, StartBUSeq, StartTrz, StartCty,
    EndBUCode, EndBUType, EndBUSeq, EndTrz, EndCty,
    FcstCreationPeriod, FcstValidForPeriod, Fcst, FcstExternalReference,
    IsProcessed, IsSolved)
    SELECT TSU.BUCodeSend, TSU.BUTypeSend, TSU.BuaNoSend, Null AS StartTrz, Null AS StartCty,
    TSU.BUCodeRcv, TSU.BUTypeRcv, TSU.BuaNoRcv, Null AS EndTrz, Null AS EndCty,
    TSU.[Current week], TSU.[Forecast for week], TSU.[Volume trp m3], TSU.[TSU_ID (Don''t touch me)],
    0 AS IsProcessed, 0 AS IsSolved
    FROM TSU_Tmp...tbl_TSU_trpm3 AS TSU;')
    PS: it is run using an 'EXEC(String)' format as at compile time of Store Procedure the Linked Server is not existing and otherwise compile would fail.
    We tried it with different files, in different locations. It always wors for me, never for him...
    The files were not used by anyone else. The folder(s) where they were stored are open to "Everyone".
    So I concluded it should be something linked to the User... :) But I really do not know what, as said apparently we have exactely the same setup in our Login profiles.
    Any idea or suggestion is welcome.
    Thanks
    Luca

    Hi Luca Lentati,
    According to your description and T-SQL statement, we need to verify if the download and install the Microsoft.Jet.OleDB.4.0 as a provider.
     If the 64bit SQL Server is running on the server,  The error, the Microsoft.Jet.OleDB.4.0 is not support, I reommend you download and install the Microsoft.ACE.OLEDB.12.0 as a provider.
    The error 7303 message indicates that the linked server does not have correct login mapping. You can execute the sp_helplinkedsrvlogin stored procedure to set the login information correctly. Also, verify that you have specified the correct parameters
    for the linked server configuration.
    In addition, if the issue still exists, I recommend you copy the access file to local Server, and create linked server between them , check if it can run well. If yes, it means that
     the account which SQL server uses to run the service does not have read/write access to that file share.
    There is an article about configuring a Linked Microsoft Access Server on SQL 2005 Server , you can review the following article.
    http://www.aspfree.com/c/a/Microsoft-Access/Configuring-a-Linked-Microsoft-Access-Server-on-SQL-2005-Server/
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Mysql linked server queries

    hello everyone, after spending most of the day trying to figure this out i hope that you guys with more experience can provide some suggestions. i have been experimenting with the a linked server (MYSQL 5) and managed to get all the select queries to work
    fine, but the insert is giving me troubles. MSSQL is 2008 R2, the odbc connector is the most recent.
    so here is some useful testing material:
    -- Table structure for myTest on the MYSQL server
    DROP TABLE IF EXISTS `myTest`;
    CREATE TABLE `myTest` (
    `id` bigint(20) NOT NULL,
    `mystring` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
    `mydate` datetime DEFAULT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
    -- Records
    INSERT INTO `myTest` VALUES ('1', 'string1', '2009-04-17 13:11:41');
    INSERT INTO `myTest` VALUES ('2', 'strin2', '2009-04-17 13:12:48');
    INSERT INTO `myTest` VALUES ('3', 'string3', '2009-12-09 12:29:48');
    INSERT INTO `myTest` VALUES ('4', 'nostring', '2009-12-18 12:29:48');
    INSERT INTO `myTest` VALUES ('5', 'stfing5', '2010-07-17 16:40:00');
    then i copied the data from mysql to MSSQL and made up new data and copied it into the 'local' copy of the mysql table:
    -- copy stuff from mysql
    select *
    into [msTest]
    from openquery(MYSQL, 'select * from myTest');
    --make a copy and change a row for this example
    select * into [msTestCopy]
    from [msTest];
    UPDATE [msTestCopy]
    SET [id] = 10
    ,[mystring] = 'sadfasdfas'
    ,[mydate] = '2009-04-17 14:11:41.0000000'
    where [ID] =1;
    -- insert new row in the imported table
    declare @myId as int;
    set @myId=10;
    insert into [msTest] ([ID],[mystring],[mydate])
    select T1.[ID],
    T1.[mystring],
    T1.[mydate]
    from [msTestCopy] T1
    where T1.[ID] = @myId;
    Then i tried an update query which was successful:
    UPDATE OPENQUERY (MYSQL, 'SELECT mystring FROM mydatabase.myTest WHERE id = 1')
    SET mystring = 'sadfasdfas';
    Now this is where things just do not work. i tried an insert with the following:
    -- insert in mysql
    insert OPENQUERY(MYSQL, 'SELECT * FROM myTest')
    select * FROM [dbo].[msTest] T1
    where T1.[ID] = @myId;
    the error returned is not very useful"
    Msg 7399, Level 16, State 1, Line 5
    The OLE DB provider "MSDASQL" for linked server "MYSQL" reported an error. The provider did not give any information about the error.
    Msg 7343, Level 16, State 2, Line 5
    The OLE DB provider "MSDASQL" for linked server "MYSQL" could not INSERT INTO table "[MSDASQL]". Unknown provider error.
    then i went back to basics and tried the following
    insert OPENQUERY(MYSQL, 'SELECT * FROM myTest')
    values (7,'sadfasdfas','2009-04-17 14:11:41.0000000')
     similar error as a result:
    Msg 7399, Level 16, State 1, Line 1
    The OLE DB provider "MSDASQL" for linked server "MYSQL" reported an error. The provider did not give any information about the error.
    Msg 7343, Level 16, State 2, Line 1
    The OLE DB provider "MSDASQL" for linked server "MYSQL" could not INSERT INTO table "[MSDASQL]". Unknown provider error.
    Does anyone have any clue of what is happening and how i could solve it?

    If I use the above syntax:
    EXEC master.dbo.sp_addlinkedserver @server='MYSQL', @srvproduct='NAME OF MYSQL ODBC',
    @provider='MSDASQL', @provstr='DRIVER={MySQL ODBC 5.1
    Driver};SERVER=SERVER IP;Port=3306;USER=myUid;PASSWORD=myPassword;OPTION=3;DATABASE=photo;'
    the linked server creates properly, but it won't even let me run this statement anymore:
    select * FROM OPENQUERY(MYSQL, 'SELECT * FROM photo.tag_type');
    It give this error:
    /* OLE DB provider "MSDASQL" for linked server "MYSQL" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
    Msg 7303, Level 16, State 1, Line 1
    Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "MYSQL".  */
    If I add this to the create statement @datasrc='MYSQL_MAIN' -- this being the name of the MySQL ODBC, therefore looking like this:
    EXEC master.dbo.sp_addlinkedserver @server='MYSQL', @srvproduct='MYSQL_MAIN',
    @provider='MSDASQL',@datasrc='MYSQL_MAIN', @provstr='DRIVER={MySQL ODBC 5.1
    Driver};SERVER=SERVER_IP_ADDRESS;Port=3306;USER=myUID;PASSWORD=#####;OPTION=3;DATABASE=photo;'
    I can at least run the above select statement, but I still get the error when running the insert statement.
    Insert statement:
    INSERT OPENQUERY(MY_SQL, 'SELECT * FROM photo.tag_type') VALUES (1, 'test');
    Error:
    /* OLE DB provider "MSDASQL" for linked server "MY_SQL" returned message "[MySQL][ODBC 5.1 Driver][mysqld-5.0.48-log]Commands out of sync; you can't run this command now".
    Msg 7343, Level 16, State 2, Line 1
    The OLE DB provider "MSDASQL" for linked server "MY_SQL" could not INSERT INTO table "[MSDASQL]".  */
    So can you please specify your exact syntax for this create linked server query and maybe a sample insert?  Which version of MySQL are you running?  I have tried a lot of different things and even read this post, http://bugs.mysql.com/bug.php?id=39965 with
    no luck, please help.
    Thanks

Maybe you are looking for

  • Connecting to a Home Theater receiver

    I am thinking about buying a mini to use with my home theater system. I want to use iTunes to play through my audio receiver. I have a G5 and hooked it up through the media receiver for my 42" plasma. I got video and audio but it only plays audio thr

  • ATI Rage bug#308485

    Hello,     I get this EE: r128(0):No DFP Detected error setting MTRR Invalid argument 22 Reading Google I get DFP is digital flat panel? I have a CRT monitor?? Seems there is a bug in this driver or Xorg. and a fix but don't know.

  • Excise amount in MIGO posting

    Dear friends,                   The basic price of material is 100 inr and excise amount is 20inr. Total value is 120INR. Our requirement is In MIGO posting if excise is not captured amount updated for GR/IR clearing account  and inventory posting sh

  • My iPod was stolen last night. Did not have set up for find on app but have serial

    My iPod was stolen last night and was not yet set up to find. I have the serial # etc. can I still activate to find??

  • Problem with Back button

    Hi All, Iam in the BP_HEAD overview screen there i have a navigation link which takes me to BP_HEAD of the particular BP selected. Now when i try to come back to BP_HEAD overview screen the data in some of the assignement blocks(Z)  is not refreshed.