How do I create an SQL Server? - sql-server

I have a very fundamental and basic SQL question. Using Microsoft SQL Server Management Studio Express, how do I create my first Server? For that matter, how would I create it using any other required software tool?
I took a look at Sql Server Configuration Manager and I saw SQLEPRESS running as a SQL Server. But when I added that in to the start up widow for MSSM Studio Express, as the server name, it threw an error saying it cannot be found or does not exist. It seems that this is not the right kind of server.

To connect to the local instance of SQLEXPRESS, you will need localhost as the server name.
This is a fairly comprehensive guide on how to create a database once you have connected. All the steps won't apply to using SQL Express, but the gist of it is there.
In Object Explorer, connect to an instance of the SQL Server Database
Engine and then expand that instance.
Right-click Databases, and then
click New Database. In New Database, enter a database name.
To create
the database by accepting all default values, click OK; otherwise,
continue with the following optional steps.

Based on this comment:
Trying .\SQLEXPRESS in SQL Server Management Studio Express throws an error that says that "This version of Microsoft SQL Server Management Studio Express can only be used to connect to SQL Server 2005 servers". So this is the problem, I think.
.\SQLEXPRESS is the correct server name, but you have the wrong version of client tools (SQL Server Management Studio). To find out the version of SQL you are connecting to, there are a number of suggestions here: https://www.mssqltips.com/sqlservertip/1140/how-to-tell-what-sql-server-version-you-are-running/
But since you can't connect yet the easiest thing to do is go searching for sqlserver.exe, right click, properties, version. If you have multiple version you need take note of the folder that it's in and check the SQLExpress one. You can also check in services.
Once you've worked out the version, download and install just the management tools for that version.

Related

LocalDB Separate Install Connection String

Our tool uses SQL Server 2012 LocalDB to store data. This as installed by the MSI, not full express. Users recently moved to new machines using other applications that connect via SQL Server 2019.
My understanding is that installing SQL Server LocalDB on top of an installation of SQL Server 2019 shouldn't cause an issue, being as how SQL Server Express installs as a named instance by default.
My concern when I look at connection strings, however, is that mine doesn't identify the server instance quite in the way I've seen recommended, only the Data Source:
Data Source=(localdb)\v11.0;Integrated Security=True;AttachDbFileName=C:\Database\Database.mdf;Connection Timeout=10000
This does connect, in case there's doubt. But referencing connectionStrings.com, I see recommended this:
Server=(localdb)\v11.0;Integrated Security=true;AttachDbFileName=C:\MyFolder\MyData.mdf;
In my mind, Data Source=(localdb)\v11.0 is already a clear designation of the instance, but I'm unsure what happens when SQL Server Express installs after SQL Server.
What should I look out for? Do I need to replace Data Source with Server? Will I need to change any part of (localdb)\v11.0 to account for the order SQL Server Express has been installed in compared with SQL Server?
EDIT 1
Updating the connection string by replacing 'Data Source' with 'Server' works. The question still remains, how will LocalDBs installing second affect what follows Server=?

How to find Server Name login into SQL Server by Management Studio?

I have a question. Few days ago i installed SQL Server Management Stuido with all packages in it. My Connection string that im using with my MVC or WebApi apps looks like this:
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\MSSQLLocalDB;Database=(name here);Trusted_Connection=True;"
}
I can still manage my databases by SQL Object Explorer in visual studio, but my question is where find my Server Name? Whatever i write, i cant acces to my local database server
How to get into Management Studio? Where i can find my Server Name?
You said you have installed SSMS, what about the server installation?
If the server has been installed successfully, try localhost instead of localdb. A dot(.) will also work as local host. The server name is provided while you install the server by you after selecting the named instance. If you leave it as default instance the pattern followed by sql server would be something like MSSQLSERVER......
Problem solved:
All you need to do is to click on Add SQL Server button in SQL Server Object Explorer. Then, in Browse tab click Local, then on your Server. Now you can see Server Name Label that you can login into Management Studio

Microsoft SQL Server Management studio, can't find local servers

This is my first time using it, I come from a PHP/MYSQL background and a client is asking me to assist with his MSSQL database and he gave me a file which is the exported database, it doesn't have an extension though.
I downloaded and installed Microsoft SQL Server Management studio but I'm not sure what to do, the tutorials online seem to be able to connect to the local server, on my end when I browse for a Server name I can't find anything under "Local server".
If it helps, the client have informed me that his previous developer (the one who seems to have had a conflict with the client and left) was using the same application with the server type set to "Database engine" and the Authentication set to "Windows Authentication", that's all the information I have.
Please help. Thanks.
If you installed a default instance of SQL Server with Management Studio, use the server name "localhost". If you only installed SQL Server Management Studio, you will need to at least download SQL Express: http://www.microsoft.com/en-us/server-cloud/products/sql-server-editions/sql-server-express.aspx
Also, note that if you develop in the latest version of SQL Server, you will not be able to back up and restore to the client's database if the client uses an older version. You will need to ensure all changes are scripted or use dacpacs (which you probably won't use).

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.

SQL Server 2005 Express successfully installed, but is nowhere to be found!

I've SQL Server 2008 Express installed. I've just download and installed SQL Server 2005 Express, but I changed the name of instance into SQLEXPRESS2005 (I added 2005 at the end to avoid conflicting names).
Unfortunately, when I try to access the 2005 instance either using the SQL Server Management Studio or the VWD 2008 Express (Database Explorer window), I don't see it.
I just disk-recovered my system, so I lost many of my files. But, before that, I had both versions, one having 2005 as instance name.
So here are the summary of the issues:
I was able to download and install successfully the Express 2005
When I try to connect to a server, I only see.\SQLEXPRESS as option (there's no SQLEXPRESS2005)
When I try to connect from the VWD, I get the Server not found ERROR!
I can see the SQL SERVER 2005 icon on the Control Panel window. But, when I try to
uninstall it, I get a error message telling that this program is not found
When do Start -> All Programs, I can see the The Microsoft SQL Server 2005 folder
It's really strange as I was successfully able to install both versions before I experienced problem with my system.
Thanks for helping.
Do you see the service for the SQLEXPRESS2005 instance? If it isn't there then the instance doesn't exist and you'll need to reinstall.

Resources