1

I want to install Microsoft SQL Server LocalDB 2017 on my system. I downloaded SQL Server Express Setup (about 5.1 MB). Then I opened it and chose 'Download Media' option and then chose LocalDB. Then it downloaded SqlLocalDB.msi setup (about 45.9 MB). I ran the setup and installed it on my computer. I don't know what to do next. Can someone help me, please?

closed as too broad by paparazzo, Colin 't Hart, Md Haidar Ali Khan, hot2use, Max Vernon Nov 5 '18 at 14:01

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Run sqllocaldb info from a command-prompt and add the output to your question. – Dan Guzman Nov 4 '18 at 14:42
  • @Dan you're right. My bad I assumed he went with sql express default installation. AMtwo beat me before I could add another post. – Sam Nov 4 '18 at 16:16
  • I have narrowed my question. I just asking you to tell what to do next? – Sam Nov 6 '18 at 13:11
3

LocalDB is a quirky flavor of SQL Server. In most cases, unless there's specific functionality in LocalDB that you need, I'd suggest running the "regular" Express Edition--as you can avoid quirks like the one you're running into. Additional details of differences are included in this article.

LocalDB has an "automatic" instance that is tied to current user. To connect to that instance, you would use a connection string like "Server=(localdb)\MSSQLLocalDB;Integrated Security=true".

You can also create an explicitly named instance using the SQLLocalDB.exe command line utility. Depending on your installed version, the path may vary (in this example, 130 is SQL Server 2016, but you would use 140 for 2017, etc):

C:\> cd "C:\Program Files\Microsoft SQL Server\130\Tools\Binn"
C:\> SqlLocalDB.exe create MyLocalDB
C:\> SqlLocalDB.exe start MyLocalDB

The SQLLocalDB info command can be used at any time to determine the state of an instance, whether it is running or not:

C:\> SqlLocalDB.exe info MyLocalDB

Additional info on creating & connecting to a LocalDB instance can be found on docs.microsoft.com.

  • 1
    @Sam You don't mention any version in your question--if you are concerned about a specific version, be sure to mention it in your question. I've updated the answer with additional details for 2017, as well – AMtwo Nov 4 '18 at 16:49
  • I could have used the regular Express Edition software. But since I want my server ready for small scale local development, I have opted for LocalDB. I just want it to practice my database concepts at the school level. So I do not want to spend excessive resources by runnig my server at full instances. – Sam Nov 4 '18 at 16:49
  • @sam LocalDB might not be the best solution to your problem. If your main concern is about resources, and can’t wrap your head around LocalDB, just install a proper Express instance and don’t set it to auto start. You can start it up when you need it, much simpler command line entries (a single net start...), stop it when you don’t (net stop), and your databases persist between sessions. I’d also suggest not getting snippy with people because they didn’t read your mind which version you’re using - and first check whether you can’t adapt the advice to your version (true here). – Aaron Bertrand Nov 4 '18 at 19:48
  • Output of Running "SqlLocalDb info" command C:\WINDOWS\system32>sqllocaldb info "MyInstance" Name: MyInstance Version: 14.0.1000.169 Shared name: Owner: XXXXX Auto-create: No State: Stopped Last start time: 05-11-2018 04:07:11 PM Instance pipe name: – Sam Nov 5 '18 at 10:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.