SQL Server 2012 Developer Default Instance not working - sql-server

I just installed SQL Server 2012 developer edition with a default instance of MSSQLSERVER.
The problem I'm facing is when I launch Management Studio and connect using the server name - (LocalDb)\v11.0 - it works perfectly, but when I try to put in MSSQLSERVER as the server name it gives in a Network related or instance specific error.

The default instance on a server is always reachable using
.
(local)
the machine name, e.g. YOURPC
Enter any one of those things in your Server Name field when connecting to SQL Server Management Studio (or use any one of those three things in the server= or data source= elements of your connection string).
But it's definitely NOT reachable using MSSQLSERVER ...
I don't know where you got that from - but that does NOT work - not for any version of SQL Server I'm aware of.
MSSQLSERVER is the name of the SQL Server Windows Service on your machine, yes - but it cannot be used as instance name to connect to!

Related

How to create first Server Instance in SSMS

I have installed SQL Server and SSMS. And I open SSMS. The Connect to Database Engine Dialog is shown. But the Server Name is empty.
I don't know how to create a Server Name.
And I don't know where.
I also have tried to choose a fullpath name or local. But that doesn't work.
Can anybody help me? Oh... for both (SQL Server Express plus Management Studio I have the latest version).
In the drop down box for "Server Name" choose the option for <Browse for more...>. This will then give you a further window where you should see your instance listed under Local Servers:
One of the following:
You have installed Sql Server (not just SSMS), and during installation you specified a SQL Server instance for your computer and you DIDN'T specify an instance name. In that case you must
Make sure that the SQL Server service, called MSSQLSERVER, is running.
Connect to it with the name . (yes, just a dot)
You have installed Sql Server, and during installation you specified a SQL Server instance for your computer and you DID specify an instance name. In that case you must
Make sure that the SQL Server service, called MSSQLSERVER, is running.
Connect to it with the name .\InstanceName
You have install Sql Server Express.
Make sure that the SQL Server Express service is running. (I think the service name is also MSSQLSERVER)
Connect to it with the name .\SqlExpress
You have not installed any Sql Server version but you may have installed Visual Studio or something that include Sql tools, including LocalDb
start a localdb instance running with a command that is something like this (depending on your installed version):
'C:\Program Files\Microsoft SQL Server\150\Tools\Binn\SqlLocalDB.exe' start
Connect to it with the name, (localdb)\MSSQLLocalDb
You have not installed any Sql Server instance on your machine, and you are expecting to find a Sql Server instance somewhere on your network.
In this case you need someone who knows, to tell you the server name.
(You can create and start localdb instances with other names, MSSQLLocalDb is just the default or not having specified a name)
Start a service with e.g. PowerShell: Start-Service MSSQLSERVER or look for the service in the Windows' ⚙️ Services GUI you can find from Start Menu search.

SSMS won't connect to SQL Server 2019

I have Microsoft SQL Server manager version 18.8 installed to my PC, as well as SQL Server 2019. Both are installed on my PC. I need to locally create and manage a database.
I am trying to connect the SSMS but it's not working.
I entered to the services and restarted everything
and I also enabled TCP/IP in configuration manager.
what should I do?
You have a named instance of SQL Server named SQLEXPRESS (this is shown in parentheses within the SQL Server service name "SQL Server (SQLEXPRESS)" in the Windows Services MMC snap-in.
You need to specify the instance-name in the Server name: field.
You can only omit the instance-name for default instances.
You need to specify .\SQLEXPRESS or (local)\SQLEXPRESS to be able to connect.
Try connecting using .\SQLEXPRESS as the server name.
It seems you have created an instance with the name SQLEXPRESS. With SQL server you can create "instances". Each instance is like its own separate database engine and has its own list of databases, users and so forth. There can be one default instance which would be just the computer name or .. In your case you have a named instance "SQLEXPRESS" which you need to address using .\SQLEXPRESS or <computername>\SQLEXPRESS.

Connect to your sql server without credentials

I created a project in visual studio and I want to use SQL Server Management Studio to see database. What should be the server name?
On connecting to sql server, it gives error:
I tried finding server name using cmd so the result was:
Note:
My sql server configuration manager doesn't contain any sql server services. I was using sql server 2012 so now I downloaded sql server 2017 but same, so services are shown.
How can I connect to sql server?
You will not be able to connect to the SQL server if the SQL Server service is not running. Once you have verified your service is running, you can use the option in the Server name to select your SQL Server Name.
Irfan.
You can connect to SQLServer with two ways:
Usually you run SQLServer instance as service and connect using server credentionals
Sqlexpress "embedded" style - connect to mdf/mdb-file. Behind the scenes it will start localdb service and attach db-file.
First way is recommended in most cases.
Run services.msc and look for sqlserver instances. If they are down - start one. If they are notexistent - rerun installation and check options.

SQL Server Management Studio cannot connect using Windows Authentication

I have installed SQL Server 2008 Management studio ONLY. When I tried connecting to my local server using Windows Authentication, I am not able to connect.
I don't remeber the instance name.
How to know the instance name of my SQL Server?
Secondly, i tried connecting using but there is an error:
A network related instance occured...
(.), (local), local, .\sqlexpress
I also searched SO and got same results set.
Won't Management studio alone be enough to connect to local SQL?
The browse for more in management studio should tell you your instance name. If nothing is there, try looking at your services and ensure that "SQL Server" service is started. If you have a named instance, it will also show you your named instance in the services console. So if it shows:
SQL Server (MYINSTANCE)
You connect using:
.\MYINSTANCE

Can't see *all* databases in a remote SQL Server instance

I can connect to a remote SQL 2008 Server instance, but I cannot see all the databases in the instance using SQL Server 2008 Management Studio.
I suspect that my problem has something to do with not all database in the remote instance having the same version. For example, I "upgraded" a 2005 database to 2008 by doing a backup from 2005 and importing it into 2008.
When I realized that this was not one of the database that I could see from my other PC, I noticed that the compatibility level of the imported was still 2005, so I changed it to 2008. Still I could not see the database.
On that remote server, the instance node is named "sql2008", and is "Version 10".
When I connect to the sql2008 remote instance from my local PC, the connection is shown locally as being a "SQL Server Version 8.0" instance.
I suspect that locally, I am only being shown databases that are somehow in the remote 2008 instance but have not been upgraded.
I guess I don't know what constitutes an upgraded database and I don't know how to connect to see all the databases, even if this requires multiple connections from the source PC.
The local machine is Windows 7 Ultimate. The remote host is Windows XP Pro.
Related -not being able to see the SQL Server 2008 instance.
Update:
This is what I see on the remote server using Mgt Studio, namely, a SQL 2008 instance and a 2000 instance.
When I log onto the SQL 2008 instance and perform the following query
SELECT
##VERSION As Version,
SERVERPROPERTY('ComputerNamePhysicalNetBIOS') as ComputerNamePhysicalNetBIOS,
SERVERPROPERTY('ServerName') As ServerName,
SERVERPROPERTY('MachineName') As MachineName
The result re-confirms that the 2008b instance shown above with a version of 10 is a 2008 instance:
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (Intel X86) Mar 29 2009 10:27:29 Copyright (c) 1988-2008 Microsoft Corporation Developer Edition on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)
USPL-DOKMANC2 USPL-DOKMANC2\SQL2008B USPL-DOKMANC2
OK, now from my LOCAL box, I used SQL Mgt Studio to try and connect to USPL-DOKMANC2 (the remote box.)
alt text http://content.screencast.com/users/Dokmanc/folders/Jing/media/ec146f56-5651-4968-9286-82508dc5d3b2/2010-05-22_1426.png
...I connect to the remote w/o the port I get this error:
alt text http://content.screencast.com/users/Dokmanc/folders/Jing/media/d3c5bc46-c286-4708-a2f5-282fc76124cb/2010-05-22_1427.png
But if I enter the DEFAULT port, I am able to connect. Note that the SQL2008 connection that I just added appears as being version "8" (SQL 2000).
alt text http://content.screencast.com/users/Dokmanc/folders/Jing/media/ea80af5e-4a1f-4417-9327-0b76476b4d14/2010-05-22_1426.png
I seem to be connecting to my SQL2000 instance again even though I specified in my connection params to connect to SQL2008b, a 2008 instance.
I can't seem to see my remote 2008 instance on uspl-dokmanc2. I keep getting my 2000 default instance databases showing up under sql2008b.
2nd Update:
Based on excellenf feedback below that SQL is most likely disregarding the name of the instance when tryingt o connect and determining the instance from the port specified. Now I just need to know the port that the SQL2008b instance is running on. I expected that SQL Mgt Config would tell me. The port is blank. Does this imply a default port? What would it be for 2008, not ethat I already have another 2008 instance, so if they all have to have separate ports, the normal 2008 default is probably not it.
Here's what I see in SQL Mgt Config for the 2008b instance. No port mentioned:
The remote instance (8.0) is a SQL Server 2000 instance
There is no such concept as "database version" that relates to visibility or permissions: every DB on a given server (version, SP and hotfix included) is at some internal version. This is why you can't restore or attach a SQL Server 2008 DB onto SQL Server 2005
I would run this to get the full details
SELECT
##VERSION,
SERVERPROPERTY('ComputerNamePhysicalNetBIOS'),
SERVERPROPERTY('ServerName'),
SERVERPROPERTY('MachineName')
For example, you may have a client alias that means you're connecting to the wrong server.
Also, you have to explicitly DENY ANY VIEW DATABASE TO public to "hide" databases
Are you sure your 2008 instance uses 1433 port? MS SQL seem to disregard a name of a instance and connect with the given port in most cases. Use the Configuration Manager to check the port.
Also, check if the SQL Browser is available from the remote machine - you'll have to add 1434 on UDP to your firewall settings. Remember to make sure that the SQL Browser is running on your server of course. See: http://support.microsoft.com/kb/914277

Resources