I have installed the SQL Server Management Studio (v. 17.9.1) but I am not able to create an instance.
In fact no server appears in the box when I browse:
How can I proceed, step by step, to create a local instance?
You can create a local Database by using the command prompt. As open cmd with Admin privilege, > sqllocaldb create "database name" -s(start with it) . There is lot of option with sqllocaldb read there.
Go to windows services (services.msc) and check if SQL Server and SQL Server Browser are running. If not, start them and you should be able to login and create the DB.
type in sql server download in your browser and go to microsoft's website. You have downloaded SSMS but you do not have a server installed. Download SQL express or SQL developer edition and install. Once you have done this you will have a default instance (or named if you customized the install). I must have hit this posting 4 times trying to figure this out but now I'm off and running. If you want a test database to play with you can then download adventureworks (again just use your browser (sql adventureworks) and download the backup file. You can restore it by clicking on the databases folder once you have connected to your sql instance in SSMS.
Related
I am using Visual Studio 2015 professional. When I tried to add Service-based Database to my project I got this error.
Connections to SQL Server database files (.mdf) require LocalDB or SQL Server Express to be installed and running on the local computer. You may need to modify the setup and ensure Microsoft SQL Server Data Tools is selected and install the current version at: http://go.microsoft.com/fwlink/?Linkid=125883
I also have Microsoft SQL Sever 2014 installed on my computer.
really need help.
Just in case it helps others, I recently received this error in Visual Studio. The error states to go to http://go.microsoft.com/fwlink/?Linkid=125883. When going to this URL, it now redirects to https://www.microsoft.com/en-us/server-cloud/products/sql-server/. The new URL do not seems to have an obvious instructions on how to get Microsoft SQL Server Data Tools. Here is what worked for me.
In Visual Studio, select Tools > Extensions and Updates
In the Extensions and Updates pop-up box, select Installed > Updates
Highlight Microsoft SQL Server Update for database... and click the Update button. If Microsoft SQL Server Update for database... is not listed, you can download SSDTSetup.exe from https://msdn.microsoft.com/en-us/mt186501.
Your default Web browser will prompt a download of SSDTSetup.exe
In your Downloads folder, run SSDTSetup
Follow the prompts of the installer
After doing this, just to play it safe, I restarted Visual Studio. This might not be necessary. I then did the following in Visual Studio.
In Visual Studio, if you do not already have a folder named App_Data, in the Solution Explorer panel, right-click the name of your site and select Add > New Folder. Name the new folder App_Data.
With the App_Data folder highlighted, press Ctrl + Shift + A (or right-click and select Add > New Item)
In the Add New Item pop-up box, select Visual Basic or C# > Data > SQL Server Database. Click Add.
The error should not appear, and in Solution Explorer should now be a file named database1.mdf.
Just do this. On Visual Studio, go to Tools > Options > Database Tools > Data Connections. Here clear the "SQL Server Instance Name (blank for default)" option and write SQLEXPRESS
The error message is quite clear. You need to have either LocalDB or SQL Server Express installed and running on the local computer, and you apparently don't.
Do as the error message instructs, go to the link provided in that error message, select Microsoft SQL Server Data Tools, and install the latest version.
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).
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.
I used visual studio 2013 for developing a web application and used a localDB in development phase, now I want to go to production phase and want to export the sql server localDb to the online SQL server database, but I cannot find any option to script out the localDb or migrate it?
Which tools I can use to do this ? or what I must do?
There are atleast two routes; you could publish and recover as Data Tier Application:
Or, the easier-but-lengthier route would be to:
Create a new DB in the SQL Server Management Studio (Naming it the same as LocalDB is helpful if you just want to change the connection string later)
Right-click database on SQL Server Object Explorer and select Schema Compare
Click Select Target and navigate through Select Target Schema(Dialog) > Database > Click on Select Connection > Connect(Dialog) > Browse > Local > Database Name > Select the Databse you created in Step-1. Then, click OK
Click Compare or, hit Shift+Alt+C
Then, the Schema Comparator tells you whats different between the two databases (the one from MSSqlLocalDB and the one you just created in Step-1). It is important to remember unchecking ANY entries for delete operations, if you are simply transferring data and schema. Keep add operations as it is.
Then, click on ↑UPDATE (the option is located right beside Compare)
Your Target database should be updated
You can attach the localDb to SQLServer 2005 or higher and then you can generate scripts or export data to remote server.
Or
If LocalDb is SQL Server 2012, use SSMS 2012 or later for this scripting task.
Unfortunately VS2013 does not has any feature to script out a localDb, I waste so many time to copy table by table scripts, and run it at remote db. my local db id sql v11.0 (2012 I think). and the remote db was sql server 2008. so one way exist is to install an instance of sql server 2012 and sql server management studio to script out my db. maybe another tools also exist it is very sad that vs has not this feature.
I'm trying to do some excercises from exam 70-515. Unfortunately I fail while trying to attach Northwind to a grid-control. It would result in:
NORTHWND.MDF' cannot be opened because it is version 655. This server supports version 612 and earlier. A downgrade path is not supported.
I use Windows 7 Home and MS Visual Web Developer 2010 Express. As fas as I understand this error, SQL Express must be an old version on my system. I downloaded and installed SQL Express 2008r2 from here. No effect. From other sources I figured out that I might need to change the instance name: Tools -> Options -> Database Tools -> Data Connections -> SQL Server Instance Name. There it is written SQLEXPRESS. I don't know what else I should insert there?
Turns out that deinstalling SQL Express and reinstall the latest version fixed the problem. I chose SQLSERVER2008 as Instance-Name while installing and set it in Visual Studio as described above.
Go to the Services control panel and look for a service named SQL Server (XXX) -- that XXX is the name of the instance that service is running. You just have to find the 2008R2 instance that you installed and type that into the "SQL Server Instance Name" box.
Might help to try to change the compatibility level, to make sure its backwards compatible.
Verify what level it is
USE VJ_DATABASE;
GO
SELECT compatibility_level
FROM sys.databases WHERE name = 'VJ_DATABASE';
GO
Then make it compatible with the older version
ALTER DATABASE VJ_DATABASE
SET COMPATIBILITY_LEVEL = 110;
GO
100 = Sql Server 2008
110 = Sql Server 2012
120 = Sql Server 2014
By default, Sql Server 2014 will change the db versions compatibility to only 2014, using the ## version you should be able to tell, which version Sql Server is.
Then run the command above to change it the version you have.
Additional step: Ensure you look at the accessibility of the DB is not reset, do this by right clicking on properties of the folder and the database. (make sure you have rights so you don't get an access denied)
I read this post but nothing helped me. Then I tried a few other options.
The way that I found that worked was to export the database and stored procedures from the original database. Then upload them into the second database(second computer).
Firstly export the DB content (data) - I used SQL server export data wizard. on the database you wish to export from right click then choose tasks, then export data. Follow the instructions and save in whichever format is best for you - I used excel for the data.
then to export the stored procedures rightclick the database name again. choose tasks and this time choose generate scripts. again follow the instructions of the wizard.
To import the data simply go to the second computer and right click the database you wish to import the data into. again tasks > import data. Follow the instructions to import all of the data from the database.
Finally to import the stored procedures, I opened up a new stored procedures command and dragged and dropped the script file that I had previously saved them in and dropped it into this window. The new stored procedure window filled with the entire list of my stored procedures. Finally change the name of the database name that will be used by the SP ( if this is different from the original DB name). (This is the first line USE [DBName]. then simply execute and the SP's will be fully restored.
This has helped me get my entire database up and running again very quickly. Hope this helps.
The SQL Management Studio is different than the SQL Server Version (or Database version). Example: At the current time, my work computer has SQL Server 2012 Management Studio but the SQL Version is 9.0 – which is SQL Server 2005. The SQL Management studio is only an IDE (Integrated Development Environment) and is NOT the same as the SQL Server version.
If when you try to Attach a Database, if you get an error similar to the following:
“The database 'AdventureWorks2008' cannot be opened because it is version 655. This server supports version 612 and earlier. A downgrade path is not supported.
Could not open new database 'AdventureWorks2008'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948)”.
It means that the Database that you are trying to Attach was created with a Newer SQL version then what your computer has and you will NOT be able to use it. See if they have that Database that was created with the same or earlier version of SQL Server that your computer uses. In this case, I found the same Database that was created with SQL Server 2005 (Version 9).
A quick way to check what SQL Server version the computer is running, from the Windows desktop, go to Task Manager (Ctrl+Shift+Esc), click on the Processess tab, find and select the entry named “sqlservr.exe”, right click and choose Properties, click on the Details tab look at Product Version (Ex. 9….) or File Version (File version states the year and the version - Ex. 2005.9…).
Really this is the same error that i get, but until now i did not solve the problem!!
Go to Tools>Options>Data Connections, provided you have installed SQL Server Express 2008r2, leave the SQL Server instance name blank.
This happens when you are trying to use the SQLServer Express to connect to the MDF file. To remedy this issue, you need to go to Services.msc and turn on SQL Server services. You need to set the log on properties and when the service is started, you will be able to connect to the MDF file without any issues.