Windows 2008 64-bit SQL Server 2008 64-bit Linked Server fails - ODBC connects but has issues

Installed the 64 but Oracle 11g client and Oracle ODAC. 
From SQL Server Management Studio run script :  exec master.dbo.xp_cmdshell 'PING OracleHostNameHere'        Ping was successful
OraOLEDB.Oracle shows up in the Provider list.  Run This Script:
EXEC master.dbo.sp_MSset_oledb_prop N'OraOLEDB.Oracle', N'AllowInProcess', 1
GO
EXEC master.dbo.sp_MSset_oledb_prop N'OraOLEDB.Oracle', N'DynamicParameters', 1
GO
EXEC master.dbo.sp_addlinkedserver @server = N'Nav14', @srvproduct=N'Oracle', @provider=N'OraOLEDB.Oracle', @datasrc=N'TheOracleHostName'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'TheOracleHostName',@useself=N'False',@locallogin=NULL,@rmtuser=N'TheUser',@rmtpassword='ThePassWord'
Msg 15015, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 49     The server 'TheHostName' does not exist. Use sp_helpserver to show available servers.
Did the same process on a Windows 7 32 bit Enterprise - ODBC Works after installing ODAC
ODBC worked, shows list of Oracle servers - picked the server - ODBC successful - MS Access able to use that ODBC service.
In Windows 2008 64 bit installed both Oracle 11g Client and 64 bit ODAC - ODBC opens, the list of oracle servers doesn't populate, hard code in the host name - ODBC reports Success.
Another Person Suggested:  Win7 64-bit with Oracle 11g. Oddly enough, it ran differently when I opened a command prompt window as administrator and ran setup.exe with the suggested command-line options:
setup.exe -debug -printtime -printmemory -printdiskusage -logLevel finest
While it had previously been failed both by running setup from the Explorer windows as administrator and by running it from the command line as administrator - it died every time at the same point mentioned by others in this thread - just after this message appeared in the log:
Get view named [SummaryUI]
( I have tried re installing with no success)

Windows 7 Enterprise 32-Bit
Installed the version 12 for 32 bit ODAC and it worked. The key is to Install as Administrator once it is unzipped.
Was able to set up Listener then
Was able to set up ODBC using the ODAC. Connect MS Access 2010 to the Oracle views.
Then, tried to install the 64 Bit onto Windows 2008 Server.
It locked up during installation both times.
Installed ODAC without an error.
However, the ODBC setup will not provide a list of the servers in the ODBC  TNS Service Name listbox for Server 2008.
In Windows 7, it populates the TNS Service Name.
The list box in Windows 2008 is empty.
Do you know what would cause that?
The .ORA file scrips look the same on Windows 2008 as they do on Windows 7 except it does not have the (server = Dedicated) argument.
Thanks.

Similar Messages

  • 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.

  • Execute the SSIS packages (2008 version) using SQL job 2008

    We need to execute the SSIS packages (2008 version) using SQL job Please help with details information how to execute it.
    1.Protection level of the SSIS packages.
    2.Configuration File (Curently using XML file)
    3.Please provide details how to create Credential (Windows User etc)  Do we need to create windows cred explicitly to run the Job etc..
    4.Please provide details for creating Proxy.
    5.How can we configure the xml file since the xml is reading from local box but when the package is moved from developement box to production box
    then the local drive might not be mapped with Production box .
    6.Roles that need to be tagged for the Proxy/Credential.
    7.Which is the best and safest way to execute ssis packages either msdb deployment or filesystem deployment and other necessary details.

    Hi,
    If you want to Execute your SSIS package using SQL job then best solution is to first deploy your Package
    either using msdb deployment or filesystem deployment.The simplest approach to deployment is probably to deploy to the file system.
    So, here is the deployment steps;
    There are four steps in the package deployment process:
        The first optional step is optional and involves creating package
    configurations that update properties of package elements at run time. The configurations are automatically included when you deploy the packages.
        The second step is to build the Integration Services project to create a package deployment utility. The deployment utility for the project contains the packages that you want to deploy
        The third step is to copy the deployment folder that was created when you built the Integration Services project to the target computer.
        The fourth step is to run, on the target computer, the Package Installation Wizard to install the packages to the file system or to an instance of SQL Server.
    you can use below link also;
    http://bharath-msbi.blogspot.in/2012/04/step-by-step-ssis-package-deployment.html
    After that you need to Schedule package using SQL Agent then  Have a look at the following link. It explains how to create an SQL job that can execute an SSIS package on a scheduled basis.
    http://www.mssqltips.com/sqlservertutorial/220/scheduling-ssis-packages-with-sql-server-agent/
    Deployment in msdb deployment or filesystem deployment has there own merits and demerits.
    For security point of view msdb deployment is good.
     it provides Benefits from database security, roles and Agent interaction
    Protection Level;
    In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package.
    Open the package in the SSIS designer.
    If the Properties window does not show the properties of the package, click the design surface.
    In the Properties window, in the Security group, select the appropriate value for the
    ProtectionLevel property.
    If you select a protection level that requires a password, enter the password as the value of the
    PackagePassword property.
    On the File menu, select Save Selected Items to save the modified package.
    SSIS Provide different Protection levels;
        DontSaveSensitive
        EncryptSensitiveWithUserKey
        EncryptSensitiveWithPassword
        EncryptAllWithPassword
        EncryptAllWithUserKey
        ServerStorage
    For better undertsnading you can use below link;
    http://www.mssqltips.com/sqlservertip/2091/securing-your-ssis-packages-using-package-protection-level/
    Thanks

  • How to create a view on SQLServer 2008 as an OPENQuery select to a MYSQL linked server

    I am trying to create a view on SQLServer through Management Studio based on data on a MYSql server.
    I have created the Linked server and I am able to query all data.
    Using the syntax select * from OPENQUERY (linkedServer, 'select * from MYSQL-table') - This works fine
    What I am trying to do now is issue the following statement
    create view ViewnameToBeCreatedOnSQLServer
       as select * from OPENQUERY (linkedServer, 'select * from MYSQL-table')
    When I run this from SSMS I get the following error
    OLE DB provider "MSDASQL" for linked server "TESTTSC2" returned message "[MySQL][ODBC 5.1 Driver][mysqld-5.0.95-log]Table 'FP.M3' doesn't exist".
    Msg 7350, Level 16, State 2, Procedure FPMaster3, Line 2
    Cannot get the column information from OLE DB provider "MSDASQL" for linked server "TESTTSC2".
    The account I am using has create view privs and alter schema privs on the SQlServer side. I am assuming there are not isues on the MYSQL server side since I am able to successfully run the select statement using OPENQUERY.  There must be one small
    piece I am missing. has anyone experienced the same problem and were you able to find a solution?

    All the configurations seem to be in place correctly since I can SELECT any data with no issues. The statement   
    select * from OPENQUERY (linkedServer, 'select * from MYSQL-table')
    works fine and I can change the table I am selecting from which all return data. Therefore, the objects all exists in MYSQL.
    The DSN is set up, the linked Server is good, the provider is set up, the DB account has all privs.
    It only fails when I try to create the view on SQLServer as a select from a remote table accessed via the linked MYSQL server. I connect to SQLServer with DB account PS which has full privs including CREATE VIEW and ALTER SCHEMA. The MYSQL pass-through account
    has read access to all objects in the MYSQL schema. I am trying to figure out if I might be missing some little part of this puzzle when trying to create a new object (CRESTE VIEW) vs. just reading the data (SELECT).
    The kicker in all this is that I did create a view on SQLServer in this manner about a year ago and I am able to see the view definition and that view still works! So, this is quite interesting that I am not able to create a new object.
    If there any specific information I could provide which might help, I am happy to do that. Just did not want to provide the details on all of the puzzle pieces if it can be avoided but if it comes to that then that's OK also.
    Thanks very much! I appreciate your help.

  • Visio Database Wizard fails - ODBC connection to MS SQL

    When I try to create an ODBC connection in Visio's 2010's Database wizard I get the error: "Cannot set the database context information. Additional error information:ODBC Error: s1009. Database cxweba does not exist."
    Note that the database name is cxwebapp_bkk. I get the same error if I connect to any database on that server, and it always truncates the name in the error message (if that is a hint to the error). 
    Using Visio 2013, after connecting to the database: when I select the database object I get the error message:  "The selected table has only one field or contains no definition information. The Database Wizard requires a minimum of one key field
    and one additional data field."
    I have this problem using both SQL Server driver (6.02.9200.116384 and SQL Server Native Client 11.0 (2011.1102.2100.60).
    I do not have this problem connecting to a MYSQL database with either version of Visio, nor do I have this problem when I link link to the same SQL database in a drawing and link shapes in that drawing using the "Link Data to Shapes" under the
    Data tab.

    Hello,
    What's the version of the SQL Server instance you connect to? It seems that the Database Wizard in Visio 2010 not work well with the Microsoft SQL Server ODBC driver. Did you try to use the Generic OLEDB Provider for SQL Server?
    Since the issue is more related to office Visio, please post the question in the following forum. More experts there will assist you:
    Visio General Questions and Answers for IT Professionals
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Need to pull the data from one server to another server in SSMS using linked server

    Hi, I have store proc which will take the parameters passed to it and store it in a table in that server. Now, this table data has to be pulled to another server table which is of same structure. But I need to do that in the same store proc which is in
    first server. I have searched in online but could not figure it how to link connection between these two servers and pull data from the first sever to the second. Can anyone please help

    You can setup a linked server from Server A to Server B. Then you will be able to query server B from Server A.
    eg: Assume you have a database test in Server B which has a table sample. From server A you could run this query to pull details.
    Select * from ServerB.test.dbo.sample.
    http://msdn.microsoft.com/en-us/library/ms188279.aspx
    http://msdn.microsoft.com/en-us/library/ff772782.aspx#SSMSProcedure
    You also have other options like distributed queries (openquery), check this blog
    http://blog.sqlauthority.com/2007/10/06/sql-server-executing-remote-stored-procedure-calling-stored-procedure-on-linked-server/
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Small Business Server 2011 Essentials Remote Web Access fails to connect to Windows 8.1 PC

    I am using Remote Web Access (RWA) gateway with Small Business Server 2011 Essentials.
    There are several workstations all running Windows 7, and have been using RWA without an issue for well over a year.
    There is now a Windows 8.1 Pro PC added to this domain, but the Remote Desktop does not connect.
    The Windows 8.1 PC appears in the RWA pages, It requests the credentials to connect, and then fails with the following error:
    Remote Desktop can't find the remote computer "COMPUTERNAME". This might mean that the "COMPUTERNAME" does not belong to the specified network. Verify the computer name and domain that you are typing to connect to.
    I can connect to all other PC fine (running Windows 7). I have tried from different locations and PC's and the results are the same.
    I thought I had fixed this problem a few weeks back.  After running all updates on the server and Windows 8.1 PC, and rebooting both, the RDP worked, but I think it only worked once and then failed the next time someone tried to use it. I have not had
    a successful connection to the Windows 8.1 PC since.
    I am at a loss on how to troubleshoot this as there are no errors on the system which can't be accessed.
    Any suggestions will be appreciated.

    Hi Mr Cheese,
    à
    I turned off the Firewall on the Windows 8.1 PC and the RDP is now working.
    Thanks for sharing in the forum. Your time and efforts are highly appreciated.
    Based on your description, this issue is related to Firewall. Would you please let me know current situation
    of this issue?
    Just addition. Please open Control Panel, select Windows Firewall and click Allow an app or feature through
    Windows Firewall. Then please check if Remote Desktop is allowed. Meanwhile, please click Advanced settings in Windows Firewall panel and click Inbound Rules, then check if rules which be related to Remote Desktop were enabled.
    If any update, please feel free to let me know.
    Hope this helps.
    Best regards,
    Justin Gu

  • OEAP602 RLAN; print server fails to connect but laptop does

    This AM I tested a 602 with a Lexmark print server patched to rlan (4) in house.  It acquired its DHCP IP and functioned as expected.
    upon delivery of the 602 and print server to remote site, the print server fails to get a IP..
    Yes the 602 is alive and well but the WLC logs indicate:
    *apfMsConnTask_2: Jul 31 14:54:42.937: #APF-3-CHECK_SUPP_RATES_FAILED: apf_utils.c:379 Could not check supported rates. Missing Supported Rate. Length :0. Mobile MAC: 00:20:00:96:f0:16.
    In the past, supported bitrate for the rlan to work was 1 or 2 mbps.  Current code 7.6.120.0 I believe has the little bug fixed as I have all rates below 11 disabled and my other 13 rlan clients are working fine.
    any ideas?

    Error Message %APF-3-CHECK_SUPP_RATES_FAILED: Could not check supported rates.
    [chars]. Length :[dec]. Mobile MAC: [hex]:[hex]:[hex]:[hex]:[hex]:[hex].
    Explanation Could not check supported rates. Verify data rate on client.
    Recommended Action No action is required.
    The WLC was reading a message from the client, and the client did not tell the WLC what rates it could support.  This could happen because the packet from the client wasn't heard fully.  As well, some clients will see the WLC that they are associated to, and not the individual Device.  In this case, it is possible that the client didnt' send the supported rates, as it didn't see a change in BSSID>

  • How to Configure Remote Connections To SQL Server 2008 R2 Express

    Post written June 10, 2010 and pertains to:
    SQL Server 2008 R2 Express on both my server and local machines: SQLX_SRV,
    SQLX_LOC
    SQL Server 2008 R2 Management Studio on both my server and local machines:
    MS_SRV, MS_LOC
    Windows Server 2008 R2 Enterprise installed on a Hyper-V VPS: WS
    SQL Server Configuration Manager on both my server and local machines:
    CMGR_SRV, CMGR_LOC
    Server Manager: SMGR
    I am connecting to my hosting server via Remote Desktop Connection: RDC
    I installed SQLX_SRV and MS_SRV on my hosting server and SQLX_LOC and MS_LOC on my local development machine.  I am able to use MS_LOC to connect to SQLX_LOC and to use MS_SRV to connect to SQLX_SRV.  However I am not able to use MS_LOC to connect
    with SQLX_SRV.  Here's what I have done so far:
    SMGR -> Configuration -> Windows Firewall to turn off the Windows Firewall for Domain, Private and Public profiles.  Obviously I'll change this later, but until I can connect I want to remove as many variables as possible.
    CMGR_SRV -> SQL Server Services to confirm that both SQL Server (SQLEXPRESS) and SQL Server Browser services were running.
    CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS to ENABLE the Shared Memory, Named Pipes, and TCP/IP protocols and DISABLE the deprecated VIA protocol.
    CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS -> double click TCP/IP to open the TCP/IP properties dialogue.  On the Protocol tab Enabled: Yes, Keep Alive: 30000, changed Listen All to No.  I've tried it both
    ways, but I've got six IP addresses on my server and I wanted to configure SQLEXPRESS to listen to only the first and primary IP.  On the IP Addresses tab went to IPALL and cleared the TCP Dynamic Ports field and entered 1433 in the TCP Port field. 
    For my first and primary IP Address I made sure that Enabled was Yes, I cleared the TCP Dynamic Ports field, and entered 1433 in the TCP Port field.  For all other IP Addresses Enabled was set to No and I cleared both the TCP Dynamic Ports and TCP Port
    fields.
    CMGR_SRV -> SQL Server Services -> SQL Server (SQLEXPRESS) right click and Restart.  This of course stopped and restarted my instance of SQLX_SRV enabling the TCP/IP configuration in the previous step to take effect.
    On my server, SQLX_SRV is the only instance of SQL Server running and so it's easy to hard wire it to the default port 1433.
    The instance name for both SQLX_SRV and SQLX_LOC is the default "SQLEXPRESS".  My server machine name is "SERVER1" on the EnglishBrains.com domain.  So the proper local name (local within the context of my remote server as connected via RDC) for
    my instance of SQLX_SRV would be:
    SERVER1\SQLEXPRESS 
    Note the use of a backslash NOT a forward slash. 
    Of course to connect remotely from my development machine, which is not on the same domain as my hosting server, I would need to specify the domain as well, so the SQL Server name becomes:
    SERVER1.EnglishBrains.com\SQLEXPRESS
    I must also use SQL Server Authentication.  Before I can use such a remote connection, however, there are still several configuration steps required.  So on my server (connected via RDC) I used MS_SRV to connect to SQLX_SRV using SERVER1\SQLEXPRESS
    for the server name and Windows Authentication.  Once connected I performed the following steps:
    MS_SRV -> right click the connected parent SERVER1\SQLEXPRESS instance node at the top -> Properties -> Security -> Server authentication: select "SQL Server and Windows Authentication mode".  This will enable connections using either type
    of authentication.
    Next, leaving the Server Properties dialogue open, Connections -> check "Allow remote connections to this server" box.
    Click OK to save these changes and close the Server Properties dialogue.
    MS_SRV -> Security -> right click Logins and select "New Login...", the Login - New dialogue opens.
    On the General page Enter a name for your new login
    Select SQL Server Authorization
    Enter and confirm a password
    Uncheck Enforce password expiration
    Select the default Database and Language
    On the ServerRoles page Public will be checked, also check SysAdmin.  This is probably not a good idea and I'll uncheck this as soon as I can connect to the SQLX_SRV.
    On the User Mapping page select the databases you want your new Login to access and enter the Default Schema of "dbo".
    At the bottom of the User Mapping page you'll see the Database Roles table.  Public will be selected by default.  Also select db_Owner.  Again this is probably not a good idea, and I'll refine this once I can connect.
    On the Status page confirm that "Grant" is checked under "Permission to connect to database engine" and "Enable" is checked under "Login".
    Click OK to save all changes and close the Login - New dialogue.
    With these steps completed you should now be able to use MS_SRV to connect to SQLX_SRV using SQL Server Authentication by supplying the name and password for your new Login.  I tried this and it worked fine.  Next I tried to use this same login
    remotely, that is I went to my local development machine and used MS_LOC to try and connect to SQLX_SRV by using
    SERVER1.EnglishBrains.com\SQLEXPRESS
    and opting for SQL Server Authentication and supplying the name and password of my new login.
    THIS DID NOT WORK??  Instead I get the following error message:
    Cannot connect to SERVER1.EnglishBrains.com\SQLEXPRESS.
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
    For help, click:
    http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1
    If you follow the suggested help link, you are told:
    The SQL Server client cannot connect to the server.  This error could be caused by one of the following reasons:
    A specified SQL Server instance name is not valid.
    The TCP, or named pipes protocols are not enabled.
    The firewall on the server has refused the connection.
    The SQL Server Browser service (sqlbrowser) is not started.
    WRONG on all 4 counts!  The instance name IS valid.  Both TCP/IP and Named Pipes protocols are enabled.  The firewall has been shut down, so it is not relevant.  Finally the SQL Server Browser IS started.
    The next thing I tried was to circumvent discovery by the SQL Browser service by using the following syntax to specify the IP address and port directly when specifying the SQL Server name.
    tcp:68.71.134.186,1433
    Using this in the Server Name field I was able to use MS_SRV to successfully connect to SQLX_SRV (using SQL Server Authentication of course) with or without the SQL Browser service running. 
    However when I tried to connect from MS_LOC to SQLX_SRV using this same login (WITH SQL Browser service running just for good measure) it does not work??  I get the following error message:
    Cannot connect to tcp:68.71.134.186,1433.
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)
    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=10060&LinkId=20476
    If you follow the help link you are told:
    "The SQL Server client cannot connect to the server. This error could occur because either the firewall on the server has refused the connection or the server is not configured to accept remote connections."
    However, the firewall has been shut down and the server HAS been configured to accept remote connections! 
    I confirmed that i could indeed Ping to 68.71.134.186  and running NetStat -a |find /i "listening" on the server shows that the server is indeed listening at 68.71.134.186 Port 1433 -- which is why I was able to connect to SQLX_SRV using MS_SRV with
    tcp:68.71.134.186,1433 .
    IN SUMMARY: Even though I can connect to my SQLEXPRESS instance multiple ways from the server itself, I cannot connect remotely from my development machine! 
    If anyone can help me figure out why I would be very, very grateful!

    My two cents to help you out on c# code example to configure the remote sql server express.
    Hope it helps. It works, but you have to be extra carefull to read it all and setup the server configuration and netsh commands; also the port fowarding on the router.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data.SqlClient;
    namespace sqlremoteconnection
    class Program
    static void Main(string[] args)
    // this is the local sql server connection
    // 192.168.1.101\SQLEXPRESS
    // now, the configuration for remote access:
    // activate SQL SERVER BROWSER - set it to start "automatic"; then START UP
    // SQL Server Configuration Manager
    // --> SQL SERVER BROWSER -> properties -> Service -> Start Mode -> automatic -> apply
    // --> Log On -> Start -> Ok
                // netsh firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = all profile = CURRENT
                // netsh firewall set portopening protocol = UDP port = 1434 name = SQLPort mode = ENABLE scope = all profile = CURRENT
                // netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = any profile = PUBLIC
                // netsh advfirewall firewall add rule name = SQLPort dir = in protocol = udp action = allow localport = 1434 remoteip = any profile = PUBLIC
    // VERY IMPORTANT FOR REMOTE ACCESS: you have to add the rules on port fowarding
    // on the router!!!
    // TCP: 1433
    // UDP: 1434
    // or just a personal port like TCP 31433/UDP 31434
    // read carefully the netsh commands above
    // server name: 123.132.24.177\SQLEXPRESS
    // server name: anyurl.myftp.org\SQLEXPRESS,1433 <<-- regular port
    // server name: anyurl.myftp.org\SQLEXPRESS
    // server name: anyurl.myftp.org\SQLEXPRESS,31433 <<-- WOW different PORT here!!!
    SqlConnection myConnection = new SqlConnection(
    "user id=sa;" +
    "password=password_goes_here!;" +
    "server=anyurl.myftp.org\\SQLEXPRESS,31433;" +
    //"Trusted_Connection=no;" +
    "database=database_name_here; " +
    "connection timeout=30");
    try
    myConnection.Open();
    catch (Exception e)
    Console.WriteLine(e.ToString());
    try
    SqlDataReader myReader = null;
    SqlCommand myCommand = new SqlCommand("select * from mytable", myConnection);
    myReader = myCommand.ExecuteReader();
    while (myReader.Read())
    Console.WriteLine(myReader["tab01_name"].ToString());
    Console.WriteLine(myReader["tab01_age"].ToString());
    catch (Exception e)
    Console.WriteLine(e.ToString());
    try
    myConnection.Close();
    catch (Exception e)
    Console.WriteLine(e.ToString());
    Adelino Araujo

  • SMS_SRS_REPORTING_POINT - Error retrieving folders with SCCM 2012 and SQL Server 2008 R2 SP2

    Hi:
    According to all the Reporting Services logs my Reporting Point was setup correctly.  When I try and run any report I see the entries below in the srsrp.log on the SQL Server.  The report names show up in the Console but when I right any of the
    listed reports I get errors and no report runs.
    I am running SQL Server 2008 R2 SP2 on a remote server.  SQL is installed on its own server.  There is no firewall between the Configuration Manager server and SQL Server.
    Thanks.
    Mark
    (!) Error retrieving folders - [A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance
    name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because
    connected host has failed to respond.)].   SMS_SRS_REPORTING_POINT
    1/25/2013 9:15:07 AM    4532 (0x11B4)
    No folder configuration information found.     
    SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM   
    4532 (0x11B4)
    Next security configuration at [1/25/2013 9:22:42 AM]
    SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM   
    4532 (0x11B4)
    Root Folder exists     
    SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM   
    4532 (0x11B4)
    Successfully checked that the SRS web service is healthy on server DBSCCM.LOCAL    
    SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM 
    4532 (0x11B4)
    Waiting for changes for 1 minutes  
    SMS_SRS_REPORTING_POINT 1/25/2013 9:15:07 AM   
    4532 (0x11B4)
    SRSRP registry key change notification triggered.    
    SMS_SRS_REPORTING_POINT 1/25/2013 9:15:16 AM   
    4532 (0x11B4)
    Waiting for changes for 1 minutes  
    SMS_SRS_REPORTING_POINT 1/25/2013 9:15:16 AM   
    4532 (0x11B4)
    Timed Out...     
    SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM   
    4532 (0x11B4)
    Reporting Services URL from Registry [http://dbsccm/ReportServer/ReportService2005.asmx] 
    SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM 
    4532 (0x11B4)
    Reporting Services is running
    SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM   
    4532 (0x11B4)
    Retrieved datasource definition from the server.     
    SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM   
    4532 (0x11B4)
    Retrieved datasource definition from the server.     
    SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM   
    4532 (0x11B4)
    Updating data source {5C6358F2-4BB6-4a1b-A16E-8D96795D8602} at ManagedDesktops_MD1 
    SMS_SRS_REPORTING_POINT 1/25/2013 9:16:16 AM 
    4532 (0x11B4)
    (!) Error retrieving folders - [A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance
    name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because
    connected host has failed to respond.)].   SMS_SRS_REPORTING_POINT
    1/25/2013 9:17:40 AM    4532 (0x11B4)
    No folder configuration information found.     
    SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM   
    4532 (0x11B4)
    Next security configuration at [1/25/2013 9:22:42 AM]
    SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM   
    4532 (0x11B4)
    Root Folder exists     
    SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM   
    4532 (0x11B4)
    Successfully checked that the SRS web service is healthy on server DBSCCM.LOCAL    
    SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM 
    4532 (0x11B4)
    Waiting for changes for 1 minutes  
    SMS_SRS_REPORTING_POINT 1/25/2013 9:17:40 AM   
    4532 (0x11B4)
    Timed Out...     
    SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM   
    4532 (0x11B4)
    Reporting Services URL from Registry [http://dbsccm/ReportServer/ReportService2005.asmx] 
    SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM 
    4532 (0x11B4)
    Reporting Services is running
    SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM   
    4532 (0x11B4)
    Retrieved datasource definition from the server.     
    SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM   
    4532 (0x11B4)
    Retrieved datasource definition from the server.     
    SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM   
    4532 (0x11B4)
    Updating data source {5C6358F2-4BB6-4a1b-A16E-8D96795D8602} at ManagedDesktops_MD1 
    SMS_SRS_REPORTING_POINT 1/25/2013 9:18:40 AM 
    4532 (0x11B4)

    Hi:
    Windows Firewall is off on both systems.
    I can ping the Configuration Manager server from the SQL Server by netbios name, ip address and fully qualified domain name.   I can ping the SQL Server from the Configuration Manager server by netbios name, ip address and fully qualified domain
    name.
    I have uninstalled and installed the Reporting Point Service a couple of times and everything looks fine according to the logs after the install finishes but these errors only appear each time I try and Run a report.
    Mark

  • Linked Server - SQL Server 2008 R2

    I want to use AD groups which I have given access to SQL Server to utilitize a linked server but it does not allow this.  It gives "Anonymous Login not allowed".  I have checked the box - "Be made using the login's current security
    context".  The group is setup on both servers (Running SQL Server 2008).
    Any help is appreciated!

    Please check below link:
    http://www.sqlservercentral.com/Forums/Topic807231-1526-1.aspx
    None of the parameters are accepting windows group.
    from BOL also:
    [ @locallogin = ] 'locallogin'
    Is a login on the local server. locallogin is sysname, with a default of NULL. NULL specifies that this entry applies to all local logins that connect tormtsrvname.
    If not NULL, locallogin can be a SQL Server login or a Windows login. The Windows login must have been granted access to SQL Server either directly, or through its membership in a Windows group granted access.
    [ @rmtuser = ] 'rmtuser'
    Is the remote login used to connect to rmtsrvname when @useself is FALSE. When the remote server is an instance of SQL Server that does not use Windows Authentication, rmtuser is
    a SQL Server login. rmtuser is sysname, with a default of NULL.
    Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered.

  • Linked server issue using SQLNCLI versions on SQL 2008 & 2014

    Hi all,
    Our product creates databases on a sql server 2008 instance and creates linked servers between them to use distributed queries.
    This looks like: "EXEC sp_addlinkedserver 'linkDatabaseA', '', 'SQLNCLI10', '.', NULL, NULL, 'DatabaseA'"".
    Distributed queries from second database to DatabaseA work fine in this scenario.
    As we want to support both SQL 2008 and SQL 2014 in the next product version, I changed this to SQLNCLI11 as the provider
    and tested on SQL 2008 after installation of the SQLNCLI11 driver.
    This resulted in following error message:
    Msg 468, Level 16, State 9, Line 7
    Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
    This is very suprising as the SQL Server 2008 instance and both DB's have "SQL_Latin1_General_CP1_CI_AS" as their collation sequence.
    Then I tried the opposite, installing SQLNCLI10 on SQL 2014. This gave exactly same error! Using SQLNCLI11 went fine ofcourse.
    Generation sp_addlinkedserver statements with correct driver based on SQL version, I'd rather not do (some of the calls are
    generated in SQL from settings in other db tables which are also used for external connx) and adding COLLATE to the queries also
    has consequences like performance degradation. Adding collate on SQL 2014 with SQLNCLI10 as linked server provider results in
    following error:
    Msg 7399, Level 16, State 1, Line 1617
    The OLE DB provider "SQLNCLI10" for linked server "linkDatabaseA" reported an error. Access denied.
    Msg 7301, Level 16, State 2, Line 1617
    Cannot obtain the required interface ("IID_IDBCreateCommand") from OLE DB provider "SQLNCLI10" for linked server "linkDatabaseA".
    Q: Is there any way that SQLNCLI11 can be made to work for linked servers on SQL2008 (preferred solution) or SQLNCLI10 on SQL2014?
    Thx for any feedback.
    Regards, Jouke

    Hi Sofiya,
    Thx for replying.
    For the deployment reasons  mentioned above, I would prefer to use only one SQLNCLI version in both 2008R2 & 2012/2014 scenario's. Most preferred would ofcourse be SQLNCLI11 as this is the latest.
    This would mean that I'd like to be able to configure linked server in SQL2008R2 using SQLNCLI11 driver.
    I would expect that it would be downward compatible with SQLNCLI10 for all client usage, including linked server, which in essence is one SQL DB doing client access to another SQL DB either on same server instance or another. I suspect it requests DB
    metadata from remote DB in order to make decisions and this seems not to work in my setup. If this metadata API is part of the public API, this could indicate that medadata API has been broken in SQLNCLI11 (heavy speculation on my part here!), which could
    also affect other usage (eg. linked server between SQL2008(R2) and SQL2012/2014 instances, (I'll try to set this up and test this, might take a few days. If someone is volunteering, below are db table schemes and query, update @datasrc to point to remote sql
    server instance)).
    Regards, Jouke
    -- This script to run on SQL2008(R2). On SQL2012/2014, install SQLNCLI10 and change @provider in sp_addlinkedserver call.
    -- Pre:
    --   - DatabaseA and DatabaseB are created manually in SSMS
    --   - SQLNCLI11 has been installed
    USE [DatabaseA]
    GO
    CREATE TABLE [dbo].[DatabaseATable](
     [IdField] [int] NOT NULL,
     [LinkField] [nchar](10) NULL,
     CONSTRAINT [PK_DatabaseATable] PRIMARY KEY CLUSTERED
     [IdField] ASC
    ) ON [PRIMARY]
    GO
    EXEC master.dbo.sp_addlinkedserver @server = N'linkDatabaseA', @srvproduct=N'',@provider=N'SQLNCLI11', @datasrc=N'.', @catalog=N'DatabaseA'
    GO
    USE [DatabaseB]
    GO
    CREATE TABLE [dbo].[DatabaseBTable](
     [IdField] [int] NOT NULL,
     [LinkField] [nchar](10) NULL,
     CONSTRAINT [PK_DatabaseBTable] PRIMARY KEY CLUSTERED
     [IdField] ASC
    ) ON [PRIMARY]
    GO
    SELECT b.*, a.*
    FROM DatabaseBTable AS b WITH(NOLOCK)
    JOIN linkDatabaseA.DatabaseA.dbo.DatabaseATable AS a
      ON a.LinkField = b.LinkField
    Hi Jouke Numan,
    According to your description, I install SQL Native Client 11.0 OLE DB Provider in SQL Server 2008R2, and as you post, create two database on the same instance with collation in server default, then create Linked Server with SQLNCI11.0.
     When I run the query statement, it can execute well. It also do not occur the collation conflict. I still recommend you check the collation of server, database, or column and so on.
    SQL Server Native Client 11.0 provides OLE DB support to applications connecting to SQL Server versions 2005, 2008, 2008R2, 2012. So for the deployment reasons, you can choose the only SQLNCLI11.0 in both SQL Server 2008R2 and SQL Server 2012/2014.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • SQL 2000 LINKED SERVER ERROR 7303 WITH SQL 2012 ON WINDOWS SERVER 2012 R2

    Hi all,
    I have a problem with SQL Server 2012 and a linked server for SQL 2000 database.
    System specification:
    Windows server 2012 64 bit
    SQL SERVER 2012 64 bit
    REMOTE SERVER SQL 2000 32 bit
    I've installed sql native client 32bit,create a SYSTEM DSN odbc connection with "SQL Server" driver named "MYSERVER".
    Create a linked server with the query below in SQL 2012:
    EXEC master.dbo.sp_addlinkedserver @server =N'MYSERVER', @srvproduct=N'MYSERVER', @provider=N'MSDASQL', @datasrc =N'MYSERVER', @location=N'System';
    EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'MySERVER',@useself=N'True',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
    GO
    but when i browse the linked server i receved error 7303.

    You need 64-bit MSDASQL. It is the bitness of the server you are connecting from that matters. 64-bit executables cannot hook into 32-bit DLL.
    However, I suspect that you will not get things to work anyway. At least I have not seen anyone this far who has been able to set up a linked server from SQL 2012 to SQL 2000. I know that when I tried this, the following providers had this result:
    SQLNCLI11 - does not support connections to SQL 2000.
    SQLNCLI10 - failed with some obscure message that I don't recall.
    SQLNCLI - Don't recall that the problem was here.
    SQLOLEDB - SQLOLEDB is always replaced with the most recent version of SQLNCLI, so this fails because of lack of support.
    I don't think I got through all version of the ODBC drivers, though.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • 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

  • Linked Server unable to Connect in SQL Server 2012 after Restarting SQL Server Service it works fine. Why?

    I have created a Linked Server to Access Database of 64 MB in Size located in Remote System to SQL Server 2012.In Start for Some time it works fine and after it is giving the Error 
    OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST" returned message "Cannot open a database created with a previous version of your application.".
    Msg 7303, Level 16, State 1, Procedure Insert_Records_Into_Actual_Calls_History, Line 29
    Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST".
    Previously I thought it as Permission Issue. By trying some fixes proposed in forums it not fixed. But, after restarting the SQL Server Services without changes to the linked Server it works perfectly. How could i fix it. I don't want restart the SQL Server
    Service it leads to Some other process failures.
    RehaanKhan. M

    After all the Errors, When I am restarting the SQL Server its working correctly.
    Whats the problem it is clearing itself after restarting of SQL Server. Why ?. I can't find anything regarding this in SQL Server .
    The following are the Errors i got connecting to SQl Server.
    OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST" returned message "Cannot open a database created with a previous version of your application.".
    Msg 7303, Level 16, State 1, Procedure Insert_Records_Into_Actual_Calls_History, Line 29
    Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST".
    Error-2:
    Executed as user: RMS\Administrator. Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST". [SQLSTATE 42000] (Error 7303)  OLE DB provider
    "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST" returned message "Cannot open a database created with a previous version of your application.". [SQLSTATE 01000] (Error 7412).  The step failed.
    After unchecking the Allow In Process in OLEDB.ACE Provider Properties.
    Msg 7399, Level 16, State 1, Procedure Insert_Records_Into_Actual_Calls_History, Line 29
    The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST" reported an error. Access denied.
    Msg 7301, Level 16, State 2, Procedure Insert_Records_Into_Actual_Calls_History, Line 29
    Cannot obtain the required interface ("IID_IDBCreateCommand") from OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST".
    for to fix above error i have followed the instructions in the following link,
    http://blogs.msdn.com/b/dataaccesstechnologies/archive/2010/08/19/permissions-needed-to-set-up-linked-server-with-out-of-process-provider.aspx
    This also failed to work. I Restarted SQL Server and make the Linked Server Properties Default to my Configuration and it works fine.
    Can you suggest me a solution for this issue. Every time i don't want to restart SQL Server Services as it effects other jobs and Processes.
    Thank you.
    RehaanKhan. M

Maybe you are looking for