Cannot Create Default Instance in SSMS 2016 - ssms

I am trying to create a default instance of SSMS to run through a few quick tutorials on my local machine. However, everything I am reading is telling me that this default instance should have been created during the wizard. Welp, I have now installed and uninstalled SSMS 2016 three times and am yet to be prompted by anything other than a simple request to install and a notification that the request is complete.
I have read online that I should use the SQL Server Management 2016 Application to create this instance, but every time I try to open that application I get this wonderful error "Cannot connect to WMI provider. You do not have permission or the server is unreachable".
I have tried running the command referenced in this article to fix the error:
https://support.microsoft.com/en-us/kb/956013
But had no luck.
I've also tried to attempt to connect to what might be the default value for the instance:
-localhost
-myip
-(local)
etc..
But when I ran osql -L earlier, it showed no SQL databases on my machine and since my most recent install this command isn't even working.

You dont create instances with SSMS. SQL Server Management Studio is to query and manage existing instances.
You use the Installation media to create an instance.
Look for the Configuration manager to see what instances you have installed.
The default instance is always called MSSQLSERVER.
According to the article you linked to, you probably jacked the installation between the 32 and 64 bit versions of SQL Server.
I suggest to use the setup program and reinstall it.

Related

SQL Server Browser won't start

I want to start playing around with databases in Java to help with my university work however I can't get SQL Server to work properly. I've installed it using the wizard and selecting 'Basic' the installing SSMS. However when launching SSMS I get Error 26. When researching this it says to make sure that the SQL Server Browser service is running. Unfortunately this is the issue, every time I try to start the service it fails.
All the fixes I've seen about this topic have been related to servers on another machine where as I am trying to run the server on my own PC. I've tried them anyway but nothing has worked so far. The only thing I can find that might give you a clue in helping me is that in the log file it says that it failed to register the SPN.
When working on my local machine, I don't usually need SQL Server browser - but my SQL Server itself isn't set up to run automatically.
You can go to services (either via window and search for 'services', or in Windows 10 open the task manager, go to the last tab 'services'). Find the 'SQL Server' service (it helps to sort by description column) and right click -> start.
If you take note of the name (default is 'MSSQLSERVER') you can start the service (e.g., in a batch file, from command line) using sc start "MSSQLSERVER" (or whatever your server instance is called).

SSMS Error when creating database “Method not found .. StringCollection”

When I try to create a local database in SQL Server Management Studio 2016, I get the following error.
I am creating it through interface by connecting to local machine, right clicking on Databases, and selecting "New Database".
I have no idea what this could possibly indicate?
I've tried restarting SSMS and the machine.
I can create the database through SQL, however I get the same error when trying to launch any GUI dialogs for the database. So creating it thru SQL doesn't work around my issue as I need to configure it also.
My solution was to install SSMS 2017 instead. Now it works.

SQL LocalDb Automatic Instance Startup Failure when called from Visual Studio 2013, but not SQL Server Management Studio

Per MSDN Docs: http://msdn.microsoft.com/en-us/library/hh510202.aspx
LocalDB supports two kinds of instances: Automatic instances and Named instances.
I suspect this has something to do with my problem, so I am wondering if anyone knows how something like this gets automatically created. If I can quote from the docs, "One automatic instance of LocalDB exists for every version of LocalDB installed on the user’s computer."
Here is a copy of the relevant section in the above link:
Automatic instances of LocalDB are public. They are created and managed automatically for the user and can be used by any application.
One automatic instance of LocalDB exists for every version of LocalDB
installed on the user’s computer. Automatic instances of LocalDB
provide seamless instance management. There is no need to create the
instance; it just works. This allows for easy application installation
and migration to a different computer.
Different versions of LocalDB will have different instance naming conventions:
SQL 2012 LocalDB = V11.0
SQL 2014 LocalDB = ProjectsV12
I've seen others.
As long as the connecting app's connection string points to the correct instance, all is well:
(localdb)\V11.0
(localdb)\ProjectsV12
If I try to connect with SQL Server Management Studio to either instance (localdb)\V11.0 or (localdb)\ProjectsV12, I CAN, the "stopped" server "autostarts".
If I set the SQL Server instance in VS2013 to either instance (localdb)\V11.0 or (localdb)\ProjectsV12, I CANNOT, the "stopped" server "fails" to start. It attempts to start, but fails.
Here is the error message found in the instance error.log indicating why the instance start failed.
014-12-19 15:12:14.09 Logon Error: 17828, Severity: 20, State: 3.
2014-12-19 15:12:14.09 Logon The prelogin packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. [CLIENT: <named pipe>]
I may have found a clue here:
On one of my machines where Automatic Instancing works, the sqllocaldb command outputs following:
C:\>sqllocaldb info v11.0
Name: v11.0
Version: 11.0.3000.0
Shared name:
Owner: AM\Z617699
Auto-create: Yes <-- Yes? - and I have no idea how this is set.
State: Stopped
Last start time: 12/18/2014 5:18:46 PM
Instance pipe name:
On one of my other machines where Automatic Instancing does NOT work, the sqllocaldb command outputs following:
C:\>sqllocaldb info v11.0
Name: v11.0
Version: 11.0.3000.0
Shared name:
Owner: AM\Z617699
Auto-create: No <-- No? - and I have no idea how this is set.
State: Stopped
Last start time: 12/18/2014 5:18:46 PM
Instance pipe name:
I have spent days trying to find the answer to this question. Here is a link to an MSDN forum post that outlines all the unsuccessful steps I have taken to resolve this issue:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/83ad45d5-15c3-4463-bc0c-6c4899bf947e/localdb-visual-studio-2013-will-not-automatically-start-the-sql-2014-localdb-projectsv12-instance?forum=sqlexpress
The workaround is to just start the instance manually before you start VS2013. I'm just trying to resolve this issue so I can get an "Automatic Instance" image for all our developers.
I hope you just know he answer. :-)
Thanks, Dave
I had the same issue.
I resolved it by deleting and recreating the instance from command line:
Open the command line
Delete the session by typing: sqllocaldb delete "v11.0"
Recreate the instance with: sqllocaldb create "v11.0"
The new instance allows auto creation, and solves the issue.
The solution was taken from:
http://answers.flyppdevportal.com/categories/sqlserver/sqlexpress.aspx?ID=8bcb5f1e-0240-4df3-8a5e-7e3e73e1c45b
I had the same problem on VS2015 and SQL2016
the problem my dev station is a laptop, project explorer i think uses tcpip connection, while SQLeplorer local file or so.
It worked after i made sure that SQL used the Network card, and that it had a cable plugged in (so SQL could server the request over TCP using that IP) which it couldnt over wifi (by default?)
I had the same problem. One of the problem may be an older installed version of this product. Try to delete the database instances which are located in the following folder:
C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Microsoft
SQL Server Local DB\Instances\VeeamEndPoint
After that it works for me!!!

Cannot start LocalDB

Cannot start LocalDB instance, I have installed and re-installed over and over.
Keep getting this error :
Start of LocalDB instance "v11.0" failed because of the following error:
Error occurred during LocalDB instance startup: SQL Server process failed to start.
Anyone any advice ? ?
Microsoft SQL Server 2012, i have ensured the FULL installation options, stopped all services SQL related and tried restarting .
sqllocaldb info
gives me :
Projects
v11.0
when i try
sqllocaldb start v11.0
I get the above error.
When all else fails and you don't care about data loss, delete and recreate your LocalDB\v11.0 database! At the command prompt
sqllocaldb delete v11.0
sqllocaldb create v11.0
(Sqllocaldb is in your PATH right? It was for me.)
I was getting a similar error, but when running
sqllocaldb start
The local db started successfully. Also when checking the event log I saw an error along the lines of
Windows API call WaitForMultipleObjects returned error code: 575
What fixed it for me:
In IIS, configure the app pool to run under an account with permissions to the DB on the server (advanced options of the app pool)
In the advanced option of the app pool, set Load User Profile to true
Reference: http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-1-user-profile.aspx
It worths looking at LocalDB log files too, it is more detailed than event log:
%LocalAppData%\Microsoft\Microsoft SQL Server Local DB\Instances\ProjectsV12\error.log
Besides recreating the instance I had to delete the content of this folder:
%LocalAppData%\Microsoft\VisualStudio\SSDT\
This is where I have the mdf and ldf files.
My solution:
Go to: %LocalAppData%\Microsoft\Microsoft SQL Server Local DB\ and allow total control of the folder "Instances" to everyone group.
I know this is not OK but it solved my problem and i don't really care about the data of that folder as this is a developing and testing computer.
Same problem here. Here's how I fixed it using bits of the other solutions posted here.
I had dozens of these errors in the application event log:
Windows API call WaitForMultipleObjects returned error code: 575. Windows system error message is: {Application Error}
The application was unable to start correctly (0x%lx). Click OK to close the application.
Reported at line: 3730.
I realized that I had SQL Server Management Studio installed on my development machine, but no other SQL components. I installed the database engine, shared components, and localdb from SQL Express
https://www.microsoft.com/en-us/cloud-platform/sql-server-editions-express
After installing, I still get the same error in event log :(
Found this article:
Cannot start LocalDB
Run the following in cmd to get the localdb instance name:
C:> sqllocaldb info
In my install, I had:
MSSQLLocalDB
ProjectsV13
I ran the following to delete the instances:
sqllocaldb delete MSSQLLocalDB
sqllocaldb delete ProjectsV13
I ran into issues trying to delete/create these (sqllocaldb delete MSSQLLocalDB). I ended up deleting all of the folders and files under '%LocalAppData%\Microsoft\Microsoft SQL Server Local DB\Instances*' (You need to stop SQL Server and kill all sqlserver processes)
Then running 'sqllocaldb create' created and started the default instance and all files.
Had this issue suddenly too but saw nothing weird in logs. Was able to get it running by running the following in an administrator command prompt:
sqllocaldb start
I had this issue. I was trying to use Windows Authentication through an application, but the IIS App Pool credentials were wrong. I was using my Windows user name (ie: NETWORK\name) as my identity, but I changed it to the built-in "LocalSystem" and it worked.
You should check the Event Log for additional information.
Product Name
SQL Server
Product Version
11.0
Product Build Number
Event ID
266
Event Source
SQL Server Local Database Runtime 11.0
Component
Local Database Runtime API
Message Text
Error occurred during Local Database instance startup: SQL Server
process failed to start.
Explanation
A SQL Server process is started but SQL Server startup failed.
User Action
See the event log for details.
Source: http://msdn.microsoft.com/en-us/library/hh256140.aspx
What worked for me was the local IIS application pool I was using was the ApplicationPoolIdentity and that did not have permission to login to MSSQLLocalDB. As soon as a I changed the app pool identity to my windows login account - I was able to connect ok.
Had this issue on Windows 10 when our application was run with compatibility for Windows 8 enabled. Turning off the compatibility setting fixed it.
Before you try something drastic:
After waiting for about 5 minutes it "healed" itself.
(May be this is what this log message is pointing at: "The RANU instance is terminating in response to its internal time out")
I can not yet comment posts here but I really want to give a hint for the in my case extremely helpful post https://stackoverflow.com/a/30298863/8015089 above:
If your LocalDB instance is run by the Windows SYSTEM user (as in my case) the path to error.log is this (MS SQL Server 2012 Express LocalDB on Win11): C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\<InstanceName> (enter this path subfolder by subfolder to avoid access problems!)

Installing SQL Server Express 2005 - but it already exists on the machine

I built an application for a client that requires SQL Server 2005 Express. Everything worked fine on all the machines except for one. On this one they already had an application that uses SQL Server Express, so it was already installed on the machine, but nobody knows which application uses it or any usernames/passwords.
Can I simply install another copy into a different folder? This just doesn't seem right to me, and I know this has to be a common scenario. Can someone point me in the right direction on how I should proceed?
Thanks!
Darvis
Yes you can just install into a different directory, as a new "named instance" of SQL Server Express.
To install, follow Step 8 on Microsoft's Install How-To:
On the Instance Name page, select a Default instance or a Named instance for your installation. If you select Default instance, an existing default instance will be upgraded. If you select Named Instance, specify an instance name
So what you need to do is specify the Named Instance and specify your own instance name, and connect to it using the URL format as above.
As the Microsoft How-To mentions, the default installation is a named instance as well, with the name "SQLExpress", which is why if you want to stop or start the service with net start or `net stop' you need to write something like:
net start mssql$sqlexpress
and the hostname part of the connection string for a default SQL named instance is:
.\SQLEXPRESS (or localhost\SQLEXPRESS)
You should be able to log into it using Integrated Windows Authentication using an administrator type account on the PC, and use that to reset passwords on any SQL server type logins.
Failing that, yes, you should be able install a "named instance". You connect to it by supplying "hostname\instancename" as the server name.
In all likelihood, the culprit is Outlook's Contact Manager.
You should just uninstall the "feature". If you can't, you can create an additional instance of SQL Express, which you can access as COMPUTERNAME\INSTANCENAME.