How to know the server name of SQL Server? - sql-server

I have SQL Server 2008 R2 on my machine.
I want to connect with Windows authentication mode.
I dont remember the server name....I have also checked in SQL Server Configuration
Manager but there is no instance running.
so , How to know the serve name of SQL server ?

did you try
SELECT ##SERVERNAME

Open Regedit and navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
You'll see instances listed there with names taking the form
MSSQL10.SQLEXPRESS
MSSQL10 is the version number (10 applies to both 2008 and 2008R2) and the part after the period is the instance name. That gives you a server name of
MYCOMPUTER\INSTANCENAME

The name will always be your PC name which you can find by right clicking your "My Computer" and going to properties.

Related

How to find a list of local MS SQL Servers?

I looked at How can I determine installed SQL Server instances and their versions? already but CMD returns nothing:
C:\Windows\system32>sqlcmd -L
C:\Windows\system32>
But when using Visual Studio (v2019), I go to View > SQL Server Object Explorer, I see two SQL Server instances with system databases inside. One is called (LocalDB)\MSSQLLocalDB and the other (LocalDB)\ProjectsV13.
Both are using SQL Server 2016 (v13.0.4001). Using that I was able to connect through SSMS 2018 as well.
My question is: why aren't these instances showing up in the command line? And can I delete one of the server instance? Why are there two?
Using SSMS, in the connection manager typing the following in the server name box does it:
.
open cmd and type hostname, and use that
(LocalDB)\MSSQLLocalDB
(LocalDB)\ProjectsV13 I think this depends on the installation

(LocalDb)\MSSQLLocalDB as Server Name for Report Server Configuration Manager

I'm doing the SSRS setup in my DEV environment. I've been using (LocalDb)\MSSQLLocalDB for some of my databases. Now that I want to start using SSRS, can I use (LocalDb)\MSSQLLocalDB as a data source for SSRS? I already tried, but I'm not able to connect it. However, if I use the server name (name of my computer) it works.
Do I have to use the actual server name? Is local database (LocalDb)\MSSQLLocalDB a wrong way of doing it? I'm assuming that the actual server name will be the best practice.
If I have to use the server name, that means that I will need to migrate my databases from (LocalDb)\MSSQLLocalDB to the instance of the server name.
What do you recommend?
LocalDb instances run in your desktop session, and are meant for desktop applications (particularly Visual Studio). So no. You should migrate your databases to a service-based SQL Server instance for SSRS (which runs as a Windows Service) to access them.

Not found server name in SQL Server

I have searched for 2 days for a solution to this problem, but I can't find anything. Please help me. My computer can't find Server Name for SQL Server.
Server name is empty in this picture below.
You should check from menu Start > Type SQL Server Configuration Manager.
Choose SQL Server Services. If you can't find like: SQL Server(SQLEXPRESS) or SQL Server(MSSQLSERVER) go to step 3.
If this appears like:
Check State. If it Running right click to SQL Server(SQLEXPRESS) or SQL Server(MSSQLSERVER) > Restart.
If it Stopped or anything. Please right click and press Start.
Make sure SQL Server Browser also Running.
If you still can't find server name. Please install again SQL Server in this link(choose SQL version you want to use, that I using SQL Server 2014
Note: Please choose: SQLEXPRWT_xversion_ENU.exe this include ExpressAndTools

What server and login must I enter to connect to a SQL Server that was installed together with Visual Studio 2013?

I am just learn C# from Java and now struggling with sql server
i usually use mysql with phpmyadmin
i use windows 7
i already install Visual Studio 2013 Community Edition, in control panel program and feature there is some name with sql server
i try to search the answer in google for 3 days & download many youtube tutorial. but still confuse what to do.
My goal :
i try to create ms sql database like i do in phpmyadmin
i dont want to create local database, i try to create database in server (the server sit in localhost)
heres what i do :
in visual studio 2013 - server explorer tab, i right click in data
connections
then select Create New Sql Server Database
dialog show up and my question :
What value i must put in Server Name
If i select radio button Use SQL Server Authentication. what value i
must put in username and password. (when installing visual
studio, it don't tell me anything)
thank, forgive my english
EDIT :
i already install management studio from here. At installing, it dont tell me any configuration.
Using SSMS i still can't create database, i already try :
via Windows Authentication with servername : 127.0.0.1 or localhost
via SQL Server Authentication with username : sa, password :
[empty], or Password123, or [myComputerPassword]
i already try uninstall & install Visual Studio 2013 Community Edition & SQL Server 2014 Management Studio multiple time in different PC. But it dont tell me any configuration when installing.
based on my newbie feeling : (maybe) it look like installation don't create instance server
here's my control panel look like :
Unless SQL Server was installed with non-default settings, the following connection parameters should allow you to connect to your (locally installed) SQL Server instance:
Password: chances are that SQL Server was installed with SQL Server authentication disabled. Try to log in with the option Integrated Authentication or Integrated Security enabled, then you won't even have the option to enter a username and password.
Server: try these in the following order:
.\SQLEXPRESS (which stands for "instance named SQLEXPRESS on the local host, .")
. (which stands for "(instance with default name on the) local host")
(localdb)
Basically, the server name consists of up to three parts: First, the network host on which the desired SQL Server service is running (the local host or . in your case), the name of the SQL Server service after a \ (often MSSQLSERVER or SQLSERVER, the first of which you can omit because it's the default name), and a network port on which the SQL Server service is listening (you can often omit that, too).
You can find out your SQL Server's service name from Administrative Tools → Services. Locate the entry for the SQL Server service and note down the name in the parentheses; that's what will go after the .\ in the server name:
You usually get a local or express version of Sql Server installed when you install Visual Studio.
You can however..go a little further.
Sql Server Express 2014 (You may already have this installed based on what you chose during the install)
https://msdn.microsoft.com/en-us/evalcenter/dn434042.aspx
Sql Server 2012 Express
http://www.microsoft.com/en-us/download/details.aspx?id=29062
Under the 2012, you'll also note that one of the downloads is
SQLManagementStudio_x64_ENU.exe
This is "Sql Server Management Studio". This is a front-end to the Sql Server RDBMS. You could do most things through Visual Studio, but I usually install SSMS as well. SSMS is kinda the same thing as MySql Workbench.
You can also write scripts and execute them in SSMS.
You security mode is probably "Trusted" which means you connect to Sql Server using your windows credentials. This was auto-voodoo'ed mapped for you when you did the install.
Sql Authentication (the alternative to Trusted) is the username/password model. This takes extra setup and configuration (usually through SSMS), so your easiest bet is to rely on "Trusted" unless you find a need for something else.
I hope that helps.

What's the SQL Server Express name after installing VS2012?

I just installed VS2012 in my machine.
I'm trying to create a database but in order to create a sql connection I need the Server name, it use to be .\sqlexpress in VS2010, but apparently it changed, but I don't know the new name.
Can anybody tell what's this name?
The name of the instance is: "(LocalDb)\v11.0"
I think default instance is called .\SqlExpress
But if you are not sure about name of SQL Server instance you can always open up SQL Server Configuration Manager and it should have that local instance listed in it.

Resources