.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to connect a remote Sqlserver 2008 r2 server with IP address and port? I use SMO and VS2010.

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :Sql Server

how to write SMO's conn.ConnectionString with IP address and port?

View Complete Post

More Related Resource Links

Cannot Connect SQLServer 2008 with the provider SQLNCLI... Is there any SQL Server 2008 patch to sup

We have a program which developed under SQL Server 2005. In the program the provider of the connect string is hard coded as "SQLNCLI". It's ok running on SQL Server 2005. Now, for some reasons, this program must run under SQL Server 2008 (x64). But our program cannot access the SQL Server. We check the reason, found that, in SQL Server 2008, SQLNCLI is changed to SQLNCLI10, this caused our program cannot run. So I want to ask, is there any patch of SQL2008, so that the legacy program can normal access SQLserver with SQLNCLI WITHOUT rebuild a new version?  

SSRS 2008 - report manager: System.Net.WebException: Unable to connect to the remote server

I have an instance of Reporting Services 2008 running on Windows 2003 server.  So, the webservice URL is running on port 801, and runs fine (I can browse reports from that directory, and upload / deploy new reports and overwrite existing reports. Report manager is set to use port 800 (IIS is also on that machine running port 80).  When I attempt to connect to report manager, I get the following error, with a link to "Home" in report manager (which brings me back to the existing error page):    Unable to connect to the remote server  In the logfiles for reporting services, the following error is there: " System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.   Any ideas? Windows Firewall is NOT running on this machine.   Thanks, Chrisrjp

(XP Professional sp3) Cannot connect vs 2008 professional edition to remote sql server 2008 on hosti



I can  successfully connect Sql Server Management Studio 2008 express with remote sql server 2008 on hosting machine but when I try to add connection in vs 2008 professional edition by following the same procedure which i did in ssms to connect with remote sql 2008 I cannot connect, no dialog box appear in select a database list is empty but when i click test connection it says connection successful. However vs 2008 is  connected sucessfully on local sql 2008 express.

I would appreciate if some one could give useful suggestion.

Cannot connect to SQL Server 2008 after Uninstalling VS2010 ultimate and installing VS2010 premium


I installed VS2010 Ultimate to test it out but had license for the VS2010 premium only.  After uninstalling ultimate and reinstalling VS2010 premium, my SQL Server 2008 now refuses to connect to my databases stating: 

TITLE: Connect to Server

Cannot connect to Q9300\SQL200801.


Remote access to SSAS (SQL Server 2008): problems with SQL Browser / UDP port 1434


Hello everyone,

since last Friday I'm fighting with an issue, which drives me crazy. I tried all the hints I found, but nothing worked. Now I address the community with a hope, that anyone can help me.

So, here is my situation: I have dedicated database server (server'S OS is Windows Server 2008, DBs are (1) SQL Server 2008 SE with all BI components, named instance and (2) SQL Server Express Edition, installed together with VS 2008), joined to our company's domain. My laptop is also in this domain. When I try to connect to the named instance of SSAS on that server from my laptop using SSMS or BIDS, connection fails. When I connect to SSAS on the server itself, it works.

What I did on Friday:

1) I opened all "SQL-server"-related ports in the server's firewall (including UDP port 1434 and TCP port 2382);

2) I tested UDP port with telnet (telnet <IP-address of the host> 1434) - ne response, neither localy nor remote;

3) portqry2 gives following output:
C:\PortQryV2>PortQry.exe -n <IP-address> -p UDP -e 1434

Querying target system called:

Attempting to resolve IP address to a name...

Failed to resolve IP address to name


UDP port 1434 (ms-sql-m service): LISTENING or FILTERED

Sending SQL Server q

SMO.Backup Problem with Remote Server on Network [SQL Server 2008, VS2010]



The Below codes working fine while I create backup on SQL Server installed on same system. But When I try to take backup on Network, the backup says failure.

Really i can't understand. Just i changed the IP & I tried, but I get failure reply.

For that Any Ideas will be welcome.

 MyDTBaseName = "Supplier_Accounts"
    MyBckPth = "\\Unc_Path\Year_End_2010"
    PurDbName = MyBckPth + "\Sup_SQLSMO.bak"
    Dim MyServIp As String = ", 2745"
    Dim MyRemot_ServIp As String = ", 2745"
    Dim MyBackup As Microsoft.SqlServer.Management.Smo.Backup = New Microsoft.SqlServer.Management.Smo.Backup
    Dim MyServer As Microsoft.SqlServer.Management.Smo.Server = New Microsoft.SqlServer.Management.Smo.Server
    'Dim MyServer As Microsoft.SqlServer.Management.Smo.Server = New Microsoft.SqlServer.Management.Smo.Server(",2745")
    MyServer.ConnectionContext.ServerInstance = MyServIp
    MyServer.ConnectionContext.LoginSecure = False
    MyServer.ConnectionContext.Login = "sa"
    MyServer.ConnectionContext.Password = "123"
    MyBackup.Action = BackupActionType.Database
    MyBackup.Database = "Supplier_Accounts"
    MyBackup.Devices.Add(New BackupDeviceItem(PurDbName, DeviceType.Fi

need help about "Unable to connect to remote server." using HttpWebRequest


Hello friends 
I am creating an application where I want to store an html page from one of my websites into another web site. 
For the same purpose I am taking the url of the html pages 
for example if I want to copy this page "http://mydomain.com/html/page1.html" then i take this url from a text box which user enters.

How to connect to local instance of SQL Server 2008 Management Studio Express ?


I just installed SQL Server 2008 Management studio Express on my Vista machine.

i tried connecting to local machine using :

.\sqlexpress, (local)\sqlexpress, or .\SQLExpress, MyPCNAME\SQLExpress

nothing is working, getting this error:

Cannot connect to PC-NAME\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)

[SSRS 2008 R2]Report Builder Access error-The remote server returned an error: (401) Unauthorized.

Hello,        I am able to login Web Service URL and report manager using computer name and report builder is also working fine.  http://RPTSRV/reportserver   (RPTSRV is report server name. web service url working fine. all accessible) http://RPTSRV/reports  (report manager working fine and all accessible ,report builder too) It means I am able to access everything locally right? http://rs.test.abc.com/reportserver  (web service url working fine. all accessible)  http://rs.test.abc.com/reports    (Report manager working fine and all accessible accept report builder)(I carefully checked the link and its taking rs.test.abc.com/reportserver.....)     when I click on reportbuilder button in report manager it shows me error dialog box with following error log!! I tried from local and remote computer too but gives the same error both side. I am not sure but I am just thinking is this double hop kerberos security issue? Please help me to solve this problem. I am finding solution from last 4 days. Reporting Service configuratin tool settings Web Serivice URL -  all set to default Report Manager URL - all set to default Environment - Distributed deployment Server1(report_srv) --Windows server 2003, Installed sql server 2008R2 reporting service,

Remote access to SQL-Server 2008 R2 on Windows Server 2008 denied

Hello, after successful installation of SQLServer 2008 R2 and providing my account as a 'sysadmin' I failed to access the server from a management studio of a SQL-Server 2005 release installation. The TCP/IP access is enabled and the server is configured to allow access from remote connections.  The error message reads a follows: ' A network-related or instance-specific error occured while establishing a connection to SQL Server. The server was not found or was not accessible. Verify ... (Provider: Named Pipes Provider, error 40 - Could not open a connection to SQL Server)(Microsoft SQL Server, Error:2)' Accessing the SQL-Server by the management studio from the local host works fine but trying to acces by command line using the '-E' parameter fails. Is there any additional configuration on the operation system level needed to open a SQL-Server 2008 instance to be selected by other members of  domain groups from the non-local host? Thank you for the answer  

sql server 2008 - sqlserver(mssqlserver) services can't start

Sorry i need help, i have instal and reinstal sql 2008 over and over but always failed the problem is the services can't start and when i cek error log this written: http%3a%2f%2fgo.microsoft.com%2ffwlink%3fLinkId%3d20476%26ProdName%3dMicrosoft%2bSQL%2bServer%26EvtSrc%3dsetup.rll%26EvtID%3d50000%26ProdVer%3d10.0.1600.22%26EvtType%3d0xE53883A0%400xBE03358B%401306%4024

Remote Connection to SQL Server 2008

Hi everyone,    I'm allowing remote connections, have started the SQL Server Browser, and have the TCP/IP protocol enabled for my server instance, but I still can't connect to my SQL server remotely.   I have my router forwarding to the local IP for it when using port 1433 and it works when I put the router ip with 1433 locally, but it gives me an error when I try this remotely. It throws a timeout error, so it isn't even reaching it.   Any suggestions?

Can not connect to user instance of SQL Server 2008 Express with Advance Services in Visual Studio 2

I used SQL Server 2008 Express with Advanced Services (not SQL Server 2008 Express) in Visual Studio 2010 because it is the fast and easy way to developed and managed data-driven applications with powerful built-in reporting and full-text search functionality. I received Sql Server 2008 Service Pack 1 with Windows Update. It's ok if I connect to instance of SQL Server 2008 Express with Advance Services (with SP1) through SQL Server Management, but if I try to attach a database in Server Explorer (Visual Studio 2010), I get the following error: "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed." I'm stuck at this point. Is there a fix or a workaround? I've already tried deleting the 'C:\Users\Administrtor\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS' directory as mentioned in other posts, with no luck. The error.log at 'C:\Users\Administrator\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\error.log' has the following relevant entries: 2010-09-01 14:44:10.47 Server      Error: 17156, Severity: 16, State: 1. 2010-09-01 14:44:10.47 Server      initeventlog: Could not initiate the EventLog Service for the key '3677F6D3-17C7-4F', last error code is 2. 2010-09-01 14:44:10.47 Server &

Error connecting to Remote report server database in SQL Server 2008 R2 DataCenter Edition

I am trying to configure my report server installed on Server A to point to a reporting services DB on Server B. I am able provide the name and test the connection. However, when i click next on the configuration wizard after providing the Server A name I am receiving the below error: The feature: "Remote access to report data sources and/or the report server database" is not supported in this edition of Reporting Services I have SQL Server 2008 R2 DataCenter Edition on both the servers.    

Unable to connect SQL Server 2008

Hi, I have recently installed a trial copy of SQL Server 2008 from MS web but I am not able to connect to the SQL Database Engine locally using Windows Authentication. Whenever, I tried I got the following error message: "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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)" Just to inform you, I have OS Win7.  And I want to establish local connections only on my laptop.

Connect to SQL Server 2008 Express

Hi Guys, I have just started a personal project for our Corporate Desktop environment to actively track our Hardware and Software Inventory.  My plan is this for starters:   1 Computer using VBScript and WMI to gather the data, store the data into SQL Server 2008 Express, and present the data using ASP.NET or Javascript. The VBScript will get a list of computers from AD under specified OUs and will run on a scheduled task.   This deployment will initially be on 1 desktop computer for now.  How do I connect to SQL Server 2008 locally using OLEDB from my vbscript?  Will this require a username/password even though it is a local connection?  If it does require a password, do you know a way to prevent the password from being stored as clear text.  Does Windows Integrated configuration on the SQL Server 2008 Express allow a passthrough of credentials from the Scheduled Task so that the password is not required from the script?  I would like it to be as secure as possible since we have financial services users and we would be under the scope of an audit if ever it was needed or requested.  Thanks guys.  :-)


Hi All, Yesterday we installed SQLSERVER 2008 R2 in our development mechine , and already it have Microsoft TFS 2008. When i open my report project it came up with the upgrade messagebox i clicked on Yes.And i try to run the reports locally its giving me exception like "An attempt has been made to  use the data extention 'custom datasource extention 1.2' that is eaither not registered for this report server or is not supported in this edition of reporting services'.So i did the changes like adding the dlls into the reportserver bin and added the data block which i have configured for SSRS 2008 i have applied the same setting for the SSRS 2008 R2 but still i am gettign the same exception do we need to do any changes in SSRS 2008 R2. because i am able to run the reports sucessuflly in SSRS 2008 but not SSRS 2008 R2? Any body have ideas on this. Thanks, Veeren.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend