I have difficulties connecting to my MS SQL Server and I can't find tutorial or answer how to do this, even though I think this should be something pretty standard.
My current setup is this - I have freshly new Installed Visual Studio 2010 and followed Beth Massi's article Step-by-Step: Installing SQL Server Management Studio 2008 Express after Visual Studio 2010 : http://blogs.msdn.com/b/bethmassi/archive/2011/02/18/step-by-step-installing-sql-server-management-studio-2008-express-after-visual-studio-2010.aspx
But I'm not able to connect to a SQL Server. In my Configuration Tools\SQL Server Configuration Manager I see this when I open it :
I set to Enable all TCP\IP and Named Pipes (Just saw that this may be a problem) and in the properties of the SQL Server (SQLEXPRESS) from Services I see this:
I also see in the Log On tab this :
some sort of password (not entered by me) it seems to be something default, but since I'm not sure where the problem is I try to show everything I think may have something to do with solving my problem.
At the end I tried different options to connect to my SQL Server form the Management Studio I ended up with this:
As you see I get an error (included in order to be able to read it). I read the the machine name may be required so my User Account name is Xman and my machine's name is Xman-PC. Eveh though my printscreen image is not from this try I made an attempt to connect to the Server with XMAN-PC\SQLEXPRESS but again - no success.\
Could you point me to a good tutorial on how to connect to a MS SQL Server (I can't believe there's nothing that explains in simple steps what you need to do to connect to a server) or could you tell me how to set-up my configurations so I actually can start to work with databases?
P.S
Forgot to mention in Command Prompyt - sqlcmd command also returns error - Could not open SQL connection.
P.S
Finally I managed to connect using Windows Authentication and (local)\sqlexpress for ServerName. Which at least means that everything is working. But now even more I would like to know how to connect using SQL Server Authentication. It must be something default as it was for Windows Authentication?!
Looks like you've done the hard work - last step will be turning on SQL Server Authentication.
Since you installed with the default values, only Windows Authentication is allowed; you need to set it to SQL Server and Windows Authentication mode. You can do this through Management Studio through the instance Properties -> Security.
See this link for full details: Change Server Authentication Mode.
Related
I have mysql installed (including the connector for .net) and visual studio 2019 installed but when I try to connect via the one of the connections I have on the work bench by entering the name (it doesnt show up on the dropdown) I get the following error: server was not found or not accessible
here is the relevant server information
here a few other stack overflow related questions I found but none of them were helping me:
Why am I getting "Cannot Connect to Server - A network-related or instance-specific error"?
SQL Server is not showing in Visual Studio
How do I ensure Remote connections are allowed?
Also I have visual studio 2019 which meant I couldn't download the special mysql toolbar but does that mean it won't work at all with visual studio 2019?
You have 2 pictures in your post, in the first you try to connect to SQL Server, not to MySQL.
Your second image says that MySQL connection was made.
So I imagine that you need to connect to MySQL, not to SQL Server, so you should not choose Data Provider for SQL Server, but any driver for MySQL
what ended up working is if I go back and install vs2017 as oppose to vs 2019.
Screenshot of cmd console
Image of Main Error:
Image of Configuration manager where no server found:
I have try to search all solution for error 26 of sql server but no solution work for me.
I have check that server is running by going to services.msc and I have also checked through management configuration tool, but all get fail in my case.
I have reinstall it to check any missing file in installation process.
So at the end I have used PortQryUI.exe to find main reason where I get this message on my console
UDP port 1433 (ms-sql-s service): NOT LISTENING
I am attaching some screen shot for more clarification. And I have also follow all the steps given at stackoverflow.com for solving error 26 but no solution work for me so please don't close this question, may it have some other problem but sowing error 26.
UDP 1434 is the SQL Server Browser Service port. This service is disabled by default. This service is only needed when connecting to named SQL Server instances (or default instances listening on non-default ports) from the network. Local connections are able to discover named instances using the registry.
TCP port 1433 is the SQL Server listenning port for default instances. Named instances (like SQLEXPRESS) use a dynamic port by default.
The SQL Server Protocols team has some good practical troubleshooting articles for connectivity issues:
Steps to troubleshoot SQL connectivity issues
How to Troubleshoot Connecting to the SQL Server Database Engine
Solving Connectivity errors to SQL Server
First of all I would like to thank you for you responses. Actually I have installed only management studio so I am facing this problem.
But earlier I have also installed only management studio when I am using visual studio 2010, but at that time it was working nicely. But when I have installed Visual Studio 2015 with SQL Server management studio 2012 after formatting my system, I have started facing this error.
Why this problem
Actually Microsoft have provided a facility in Visual studio that when we install it we will also get sql server installation with it so our management studio work nicely till Visual studio 2013. After that microsoft had removed this feature and now we need to install all the other file of SQL server with management studio.
Solution
We need to install SQL server files by our self. We can download them from Microsoft's site, like i have downloaded 2014 version from Microsoft's site.
You can download SQL server 2014 express from here
After a long time struggling with my SQL Server was just refusing to listen on 1433 despite following all advice online and searching extensively: My network was a public network. It took a long time before I got a thought that maybe SQL Server would have a check to not listen on a public network even if you try really hard to make it.
I don't know how my USB wifi home network was set to public in the first place, but I suppose I must have done that somehow. However I actually couldn't find this in any help or forums that I searched.
I'm afraid I have been stuck on this one for a couple days now.
I've worked with databases before (normally using php and a mysql server) but I'm new to visual studio and I just can't seem to find much info on what kind of server you need to connect to (and how).
I guess the first part of my question would be: Can the server running the database be a remotely hosted "online" mysql server or does it have to be installed on your machine (for example like you can install apache)?
The easiest option for me would probably be to connect to my existing mysql server of my online website, but how?
I have sql server management studio installed but am not sure what to enter as the server name etc in the dialog box that shows up.
I do know my mysql server details and all, but just have no idea how where and how or even if I can connect it directly to my visual studio project.
I have looked several times on google but till now I have only been able to find videos and tutorials showing how to create a new database - which assume you are already connected to some sort of server.
Also, if you do use a locally hosted database server then wouldn't you have to port it to a different (online) database once the website goes live?
Thank you for your time!
Yes, the database can be remotely hosted, I'have this working on my local machine with a remote MsSql database. Make sure the remote database server accepts connections from your IP.
I'm pretty sure the MsSql Server Management Studio is only for MsSql, not MySql. The server name in my case is the IP for the remote MsSql database server, further you need the login and password for your database. But if you use your remote MySql, you don't need this tool.
I have no experience with MySql, but it must be possible to use the database in your Visual Studio project with the correct "connectionstring". The connectionstring contains the type of the database, where it is located, login and pasword, etc. You can find the syntax of you connectionstring here: www.connectionstrings.com/mysql/
I was able to connect to my database engine using SQL Server 2005 Management Studio, but now I cannot connect using the newer 2008 version.
Has anyone experienced the same problems? Is there a small feature to turn on that I am missing somewhere? Thank you in advance.
Given that you do not provide any usefull informations, like error message, how you tried to connect (windows authentication/sql authentication), .... that's hard to come up with the solution.....
1) try to run SSMS as admin... if you can connect, then grant specific user with proper access
2) if you try to connect via TCIP/IP, try to run SQL Server Configuration Manager to enable TCP/IP protocol
3) if you need sql authentication, change the authentication on the server's properties.
I just installed SQL Server Management Studio, and I'm trying to add just a basic login. (I'm fairly new to SSMS).
I've connected to local server, and I right-click on Security > Logins > New Login..., and then I get a dialog that says this:
Cannot show requested dialog. (SqlMgmt)
Cannot read property Collation.This property is not available on SQL Server 7.0. (Microsoft.SqlServer.Smo)
So there is the issue I'm coming up with. I'm sure its probably an easy fix, but I can't seem to figure it out. Thanks guys!
In Management Studio, your connection should be to one of the following:
localhost\SQLEXPRESS
(local)\SQLEXPRESS
.\SQLEXPRESS
YOUR_MACHINE_NAME\SQLEXPRESS
And you should probably consider uninstalling that SQL Server 7.0 instance.