Connecting to SQL Server Express 2008 from a CE device - sql

I've developing a .NET Compact Framework app that needs to connect to SQL Server 2008 Express on another machine (Windows 7 x64).
I'm tearing my hair out here - I can ping both ways from the device to the machine etc (although I lose some packets - presumably because at the moment the wireless router is miles away and we don't get much signal down here), but when I try and debug the application on the CE machine it always fails to find SQL Server.
I've tried a variety of different connection strings with no joy.
Here's the connection string I've got at the moment:
Data Source=10.0.0.12;Initial Catalog=EMS_Main;User ID=sa;Password=password;
Firewall is off.
Thanks

Do you have your SQL Express instance set up to accept remote connections? Do you have WIndows Firewall turned off, or allowing the port access for SQL Server?

Related

SQL Server Developer Clustering Limitations?

Hi we're building out some test clusters in Azure, using Developer edition of SQL Server 2016. However with no firewalls between the two nodes, both nodes in same subnet, all tcp/ip settings enabled and sa permissions on both servers we're unable to connect using SSMS (management studio), what I'm trying to understand is are there any limitations with creating AlwaysOn Availabiity groups using SQL Developer 2016? Getting the following error
Mcrosoft SQL Server, Error 5 "Access is Denied"
However I can log onto the instances on both machines locally using ssms, but not across the network.
Think it might be a limitation on the sql server edition?
Thanks and sorry if this seems a bit random :)
In order to connect to SQL server on VM from a local machine. you have to not only open 1433 port for the VM on the portal, but also do you need to set up the firewall inside of the VM machine. Make sure you have the inbound 1433 port opened as below:

Windows Integrated account is slow to connect to the SQL server database.

I have a SQL server that belongs to a domain and an application server that is stand alone. Of course it has the right ROUTES to reach the sql server.
when I use a test.udl file to test the connection, a sql login would work right away. But if we try a windows integrated account (servername\username) it takes about 25 seconds to connect.
Unfortunately I have MSMQ running on that server and application that has to take these messages and send it to the SQL server. Because of the delay (I think) MSMQ keeps all its messages.
Do you know what could be the reason for this delay only on WIndows integrated logins?
Note that, I have windows firewall disabled on these servers, No Antivirus.
SQL Server 2008 R2.
Application Server - Windows 2008 R2
Thanks for your time,
RM

Unable to connect to SQL Server 2005 installed on Win7 virtual machine

I am not able to connect to a SQL Server 2005 hosted on a Win7 virtual machine. I am new to VM, can someone help me locate the problem?
I am able to connect another SQL server which is installed on the local machine.
When you say you can't connect - that can mean a lot of things - really you need to be much more specific.
In addition to the comments and answers already here - If you're having trouble connecting to it in Sql Server Management Studio - you should open Configuration Manager on the VM itself and make sure that Shared Memory and Named Pipes are enabled (open the SQL Server Network Configuration node in the tree).
For example, SQL Server Express instances are configured by default to reject the kind of remote connection that SSMS wants to open by default.
first of all check your connection string (for reference):
http://www.connectionstrings.com/
Second you need to add an exception in the guest machine firewall or completely disable it (port 1433 is for sql tcp/ip access).
this works fine for me:
SQLConn.ConnectionString = "Network Library=DBMSSOCN; Data Source=xxx.xxx.xxx.xxx,1433;
Initial Catalog=mySQLServerDBName; User ID=myUsername;Password=myPassword"
good luck

Cannot connect to SQL server - client side issue

I might be the million'th person posting about this, but others' solutions haven't helped me. I have a database on Microsoft SQL Azure. I an trying to connect to it using the Visual Studio 2010's "Connect to Database" Tool.
From my Windows 7 machine, I can connect to it very easily. But from my Windows Server 2008R2 machine i am getting the classic error -
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)
All the posts around the web seem to be focussing on the problems on the server side, no one cares if the client goes rogue. :(
Thanks for the replies.
I have seen similar problems with VS2010 DB Tool and Windows Server so I would not suggest try using SSMS 2008 R2 (must be R2). Once you have download SSMS 2008 R2 and configured properly to work on Windows Server it sure will work. In most of the case you really need to open SSMS settings to get it workon on Windows Server.
Next a few points to check:
Verify that the telnet is working from your Windows Server Machine:
c:>telnet _your_sqlazure_database_name.database.windows.net 1433
Disable your real time security and the try again
Finally following the link to keep applying settings in your Windows Server and SSMS which are applicable and I am sure it will work:
http://www.mssqltips.com/sqlservertip/2340/resolving-could-not-open-a-connection-to-sql-server-errors/
One issue is that you need to connect via tcp, not named pipes (per your error message).
Are both servers behind the same firewall (e.g. the same external IP address)? The SQL Azure firewall needs to be configured to allow access from remote IP addresses.

How do I speed up my application connecting to MS SQL Server?

I have a Delphi application running on SQL Server 2000, but it's taking awfully long to connect to the database!
But when I run this application on my development server it connects pretty fast!
I am running on Windows 2003 server, SQL Server 2k personal edition, when I look on my MDAC version in the registry, I see version 2.8 already installed!
Any ideas why this happens on the production machine but not on the development machine?
There's a reasonable chance that this is down to a network level issue connecting to the database. Depending on whether you're running the application and database on the same box of course.
Try connecting to the database from the same machine using a different tool. You could set up a data source and test it from the control panel as an alternative. If the connection is slow from another tool test the connectivity between the servers for other types of connection (e.g. run a ping). It may be that it's resolving the server via broadcast rather than the domain, for instance. Or any number of other issues - firewall, switch, wins etc.
If you are connecting using integrated authentication also ensure that the database can resolve the application server as well as vice versa. This is part of the authentication process and I've seen it cause slow downs in creating database connections before.
In short, I'd be confident that this isn't a problem specific to delphi / sql, but something in the communications between your production servers.
Good luck!
Keep your connection open once you have established it. This is called connection pooling and will improve performance. I have no clue how to do it with a delphi application.
Your problem most likely is network or transport layer related
Are you connecting through TCP, Named Pipes or another mechanism?
Have you tried tracing opening a connection with Microsoft SQL Profiler?
regards,
Lieven
I had a problem a long time ago like this, and it came down to the workstation section of the connection string. its possible if you've copied the connection string from your dev machine that the workstation parameter is still in the connection string and pointing to your dev machine which probably does not exist on your deployment network.
In this case your connection to the database has to wait until the network tries to connect ot a non-existant machine (which obviously takes time). Remove the workstation cluse and it will speed up no end.