How to create first Server Instance in SSMS - sql-server

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.

Related

How do you connect to database instances of different SQL versions?

In my system, I am required to have two versions of SQL Server (2008 and 2019). Please don't ask why.
Onto my issue: I installed 2008 some time back, and am able to connect to the DB instance fine.
However, I recently installed 2019, and am trying to connect to my DB instance, which doesn't seem to be working.
Here're the steps I've done so far:
I installed SQL Server 2019 Developer Edition (Under C:\Program Files\Microsoft SQL Server, I now see the "150" and "MSSQL15.MSSQLSERVER" folders.
I opened SQL Server Configuration Manager, and see that the new instance is running (According to the Config Manager, SQLEXPRESS is the name of the old instance, and MSSQLSERVER is the name of the new one)
I opened CMD and executed sqlcmd -L, but only see the SQLEXPRESS instance listed.
How can I get my 2019 instance up and connectable?
MSSQL15.MSSQLSERVER
So it looks like you installed a default instance of SQL Server 2019. Good.
How can I get my 2019 instance up and connectable?
Check that the MSSQLSERVER service is started, and look at
C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\ERRORLOG
to see verify that instance started, and run
sqlcmd -S localhost
to connect to the instance.

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.

SQLExpress instance seems to be absent

I am trying to connect to a SQL Server Express instance on my laptop; I have SQL Server 2008 installed in my system, but when I try to put the instance (local)/SQLEXPRESS or Jashobanta-PC/SQLEXPRESS in my system, I am not able to connect to it. It is appearing that it is not even present in my system.
I am getting the following error :-
A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
I have tried using the SQLCMD command tool also for this, but the result is same:-
sqlcmd -E -S .\SQLEXPRESS
Here also the same error is appearing.
Is there any chance that SQLEXPRESS is not installed in my system? But as MVC Code First uses SQL Server Express, I need it. When I use code first, then the files are created fine, but how it is connecting, where it is creating the database, it is not known.
Any suggestions will be helpful.
Thanks in advance
Jashobanta
I had a similar issue to this, so for google purposes I'll list my result.
My take on the problem was that I had a SQL2008 Express instance, that had 'gone dark' because I'd installed a full instance of SQL2008R2 and/or SQL Express 2012. My guess is that one or the other of these turns off the out-of-date express instance as a security risk.
These instances were installed as fresh instance names, but somewhere along the way my (local)\SQLEXPRESS instance was disabled.
Using this link I used the SQL2008R2 installer to upgrade the SQLEXPRESS instance that the installer detected.
Once the SQLEXPRESS instance was upgraded to 2008R2 it was happily re-enabled and accessible at (local)\SQLEXPRESS, with all my previous databases inside it.
I have a same problem just now. What you need to do to resolve the problem is to install SQL Server 2008 Express edition.
You can do this by searching "SQL Express" from Web Platform Installer and install "SQL Server 2008 Express with Advanced Series" and "SQL Server 2008 Express with Tools".
Or
Download from this url and install.
http://www.microsoft.com/en-us/download/details.aspx?id=1695
.\SQLEXPRESS is SQL Express for SQL Server 2008 while
(LocalDB)\v11.0 is SQL Express for SQL Server 2012 / 14

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

How to create instance in SQL Server 2008

I have SQL Server 2005 Express installed. Later I upgraded to SQL Server 2008. I don't know much about instances, but when I log into SQL Server 2005 and I log into SQL Server 2008 it is showing the same number of databases. Also, when I create a database in SQL Server 2008 it is showing it in SQL Server 2005.
Any Idea how can I create a separate SQL Server 2008 instance?
If possible please explain step by step.
Thanks
An instance of a SQL Server database is just a named installation of SQL Server. The first one you install on any given machine typically is the default instance, which has no specific name - you just connect to it using the (local) name or the name of the server machine.
SQL Server Express typically installs as a SQLExpress instance - so the instance is called SQLExpress, and you connect to it using (local)\SQLExpress or .\SQLExpress or MyServerMachine\SQLExpress.
SQL Server instances are totally independent of one another, and you can basically install as many as you like - you just have to make sure to use unique instance names for each. But when you run the SQL Server Installation again, it will show you what instances are already installed, and prompt you for a new instance name for a new installation. No harm done.
Run the install program again, and when prompted whether you want a default or a named instance, specify a named instance with a different name. A default instance make looks like this:
servername
A named instance looks like this:
servername\instancename
"you can basically install as many as you like"
There are limitations, like 50 in 2008.
http://technet.microsoft.com/en-us/library/aa174516(v=sql.80).aspx
Microsoft does not support more than 16 instances on a single computer or failover cluster.
There are a few more limitations.

Resources