Connection to Default Instance of SQL Server 2016 LocalDB - sql-server

Need help getting SQL Server 2016 LocalDB to accept connections using default instance name "(localdb)\MSSQLLocalDB". I can get a connection using "(localdb)\.". OS is MS Windows 10 Pro 64 Bit. Have Visual Studio 2015 Express Update 3, SQL Server 2016 Local DB (also 2014), SQL Server Data Tools (latest update), and SQL Server 2012 Native Client installed. MSSQLLocalDB instance is created and will start using sqllocaldb.exe. Have same setup on a Windows 7 machine and it works fine. Have searched the web for a solution to this, but did not find any that applies to my case. Thanks.

I was able to solve the problem by removing the alias for MSSQLLocalDB in both 32 and 64 bit versions of cliconfg.exe. Server name was: (LocalDB)\MSSQLLocalDB and pipe name was (localdb)\MSSQLLocalDB. The alias may have been created during the installation of a previous version of Visual Studio. I noticed that the Windows 7 machine did not have this alias. Hope this helps someone else with similar problem.

Related

New Windows 10 Laptop - Unable to install SQL Server 2012

I'm getting the exact same error message as see in this blog post:
http://shawndowler.com/blog/2012/06/25/microsoft-sql-server-installation-issue-fix/
I ran the SQL Server 2012 setup exe (renamed it to setup.exe it was the expresss edition) as Admin from the command prompt specifying to install the updates prior which exists in my 'C:\Updates' and got the exact same error message as the blogger "An error occurred during the installation of an assembly"
Someone commented it resolved their issue for SQL 2012 in Windows 10 (I'm using express, they didnt specify which version).
Anyone else had issues with SQL 2012 or other installing on Windows 10 complaining about Microsoft.VC80.MCF or similar?
For Windows 10, you need at least SQL Server 2012 Service Pack 2 - RTM version isn't supported. For some reason, it is only mentioned in documentation regarding SQL Server 2014: Hardware and Software Requirements for Installing SQL Server.
Hopefully, with Express edition you can download the correct version with SP already integrated into it. However, it might be wiser to install SP3 instead and save yourself some hassle in the future.

Trying to attach a database fails because it is version 782

I recently reinstalled Windows and am trying to set up SQL Server again with an existing database. I've tried installing SQL Server 2012 and 2014, and continuously get the same error. The error says that the database is version 782 and this version of SQL Server is only compatible with 706 and below. I get this error with both SQL Server 2012 and 2014. I thought 2014 was compatible with 782+.. Can anyone provide me with some guidance as to how to attach a damn database? Frustrated...
Image from SQL Server 2014..
and just to note, I get the same error in 2012. Everything was functioning before the OS reinstall.
Database must be set to older or same version of the server. You cannot use 2012 server with 2014 database.
According to this link: http://sqlserverbuilds.blogspot.com/2014/01/sql-server-internal-database-versions.html 782 is version 2014 and you cannot use earlier versions.
If you tried SQL Server 2014, update to latest version.
Also make sure you install server not just management tools, since you say that the image is from 2014 but server supports 706, which means it's 2012.
You can do 'SELECT ##version' from your management studio to see on which version of server you're running.
If you are using a LocalDB 2014 the all you need to do is make sure that your connection string is pointing to the correct instance.
So change
"Data Source=(Localdb)\v11.0"
to
"Data Source=(Localdb)\v12.0"
or
"Data Source=(Localdb)\mssqllocaldb"
I find out two SQL instances were running and on the server name I was mentioning the old SQLExpress instance.
ServerName\SQLExpress
I just change the instance to the newer instance, in this case SQLServer2014 instance and it solved my problem.
ServerName\SQLServer2014
From this answer to "The database cannot be opened because it is version 782. This server supports version 706 and earlier. A downgrade path is not supported".
Try to change the compatibility level - it worked for me.
To verify what level it is:
USE VJ_DATABASE;
GO
SELECT compatibility_level
FROM sys.databases WHERE name = 'VJ_DATABASE';
GO
Then, to 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)
Another solution is to migrate the database to e.g 2012 when you "export" the DB from e.g. Sql Server manager 2014. Please find the solution here:
The database cannot be opened because it is version 782. This server supports version 706 and earlier. A downgrade path is not supported
Possibly:
You already have installed LocalDB with SQL version older than now.
You did not remove an old SQL express LocalDB, and the connection is to the old LocalDB.
Handling:
Update your sql express to the newest version.
Go to the new installed SqlLocalDB (the default is: "C:\Program Files\Microsoft SQL Server\130\LocalDB\Binn")
list, stop, delete the old LocalDB and other old instance with cmd.exe at administrator's privilege.
list: SqlLocalDB.exe i
stop: SqlLocalDB.exe p "MSSQLLocalDN"
delete: SqlLocalDB.exe delete "MSSQlLocalDB"
Finally, reboot your Visual studio and reload your project.

How can I resolve the "LOCALDB_ERROR_AUTO_INSTANCE_CREATE_FAILED" error after installing SQL Server 2014 Express LocalDB?

I have been using SQL Server 2012 and Visual Studio 2013 on Windows 8.1. All working fine.
Recently I installed SQL Server 2014 Express LocalDB. After installing, I am not able to work with LocalDB. I get odd errors, one I get is LOCALDB_ERROR_AUTO_INSTANCE_CREATE_FAILED
And according to Technet I should find information in the event log, but there is nothing at all in the event log.
When sqllocaldb command works and I can check the LocalDB installed as this:
C:\> sqllocaldb v
Microsoft SQL Server 2014 (12.0.2000.8)
but whenever I try to work with my projects I get connection related errors. The underlying error mentions that automatic instance creation didn't work.
UPDATE: this is resolved by changing connection strings from (LocalDB)\v11.0 to (LocalDB)\v12.0
May be it's:
(localdb)\projectsv12
I have also encountered similar problem. Try it :D
use for SQLExpress 2014 (LocalDB)\MSSQLLocalDB
see also http://www.michael-whelan.net/sql-server-localdb-2014-connection-string/

Error: ORA-12154 SQL Server Link Server with Oracle 11g in Windows Server 2012 R2

I need to create Link Server in SQL Server 2012 Enterprise 64 using Oracle ODAC.
I have done everything I know, including multiple re-installation of Windows Server 2012 Standard R2 64. The ODAC is also 64bit.
I am able to connect to Oracle 11g using Oracle SQL Developer using TNS as Connection Type.
I am beginning to think this may have something to do with Windows Server. Because I have never experience this issue on other systems not running Windows Server.
I get this error:
returned message "ORA-12154: TNS:could not resolve the connect identifier specified.
Thanks
After combining through hundreds of internet posts and install/reinstall. I discovered the problem was the ORACLE ODAC Components. Every article on the internet tells you to install 64bit ODAC if you are running 64bit database, however, this is not accurate.
After spending two days trying to get this to work, I decided to try the 32bit ODAC and it worked.
In case anyone is having this same issue.

Install order for SQL Server 2005 developer and VS 2008 on Windows 7

I always seem to battle with this so on my new Windows 7 dev PC build, I thought I'd try and get it right!
Do you install VS 2008 first and then SQL Server 2005 developer or the other way around? And for either way, are there any special options/settings that have to be enabled/disabled?
I've just take an Acronis image of my PC, configured IIS for use with SQL Server 2005 (see below) and proceed to install SQL Server 2005 developer. It's warned about SQL Server 2005 needing SP3 (no problem) but it's also warned about VS 2005 not been compatible. Can I ignore this and go ahead and install VS 2008?
Cheers, Rob.
PS. The page to configure IIS features for use with SQL Server 2005 is http://support.microsoft.com/default.aspx/kb/920201
I always install in the following order
IIS
Windows Installer
Sql Server
VS any version
whenever i tried to go the other way, i always faced a problem approx thrice i faced this problem. Usually some components becomes missing in other way

Resources