Problem with installing AdventureWorks on SQL Server 2016 - sql-server

I have encountered a problem with importing a backup of AdventureWorksDW2017. I tried to install the backup of it, following this guide: https://learn.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-ver15, however most of the options listed in there, like Tasks, Restore Database, etc. seem to be missing in my installation.
Currently, I am using SQL Server 2016 and SQL Server Management Studio 18. I tried reinstalling it, hoping that the reason could be a corrupted installation, but it didn't help.
Thanks in advance

Related

SQL Server installation error SQLCLI component

I am trying to install SQL Server 2016 but getting error on installing SQL Server Native Client, I have tried installing SQL Server 2012, 2014, 2016 and 2017 RC well but all are failing on installing client comopnet. I get following error.
There is a problem with this Windows Installer package. A DLL required for this installation to complete could not be run. Contact your support personnel or package vendor.
Can anybody help how can I fix this issue?
Only SQL Server 2008 R2 works fine.
I found this here
I had the exact same problem. The solution is to go into
c:\users\"username"\AppData\Local\ then right click on "temp" and choose
"properies". Choose "security" --> edit --> add, and add the username you
are using, and give yourself all rights. After that it'll work :)
Another suggestion is to re-install the installer. You can do that here.

Sql management Studio 2014 crashed + backup databases before reinstall

I have installed sql server 2014 standard edition on windows server 2012R2, it was working fine. but after few days i try to open management studio but it says cannot find one or more components try reinstalling the application. i have seen many solution for recovery and reinstalling but my first concern is data backup. as its a live system i dont want to lose any data. can any one tell so surely that how i can backup data and recover management studio. are there any files which need to be copied and can be replaced after reinstalling. i will be thankful if some one can give sure answer. Again remember its a live system i cannot lose any data. Thanks
I hope that SQL services are still online, you can take backup using sqlcmd and try to repair the management studio.
example.
SqlCmd -E -S Server_Name –Q “BACKUP DATABASE [Name_of_Database] TO DISK=’X:PathToBackupLocation[Name_of_Database].bak'”

Can't Open Database, Wrong Version

I'm working on a project for my Internship with a collague.
but when he sent me hisasdf(Visual Studio 2015 Enterprise) and I tried to Open his Database, I got the Following Error:
The database cannot be opened because it is version 852. This server supports version 782 and earlier. A downgrade path is not supported.
Could not open new database. CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file {Filename} failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I updated my Sql Server Data Tools to version 14.0.61021.0 and tried again. Unfortunately this didn't work either. (yes I tried turning it off and on again)
So I was wondering if any of you guys could help me out,
Thanks in Advance!
With kind regards,
Yours Truely
The error is saying that you are trying to attach to a database that is from a newer version of SQL Server than you are using on your machine.
I am thinking that your colleague is using SQL Server 2016 and you are using SQL Server 2014. See the versions here in the "internal version" column.
Regarding solutions, I would start by ensuring that you and you're colleague have the same versions installed. You can also try downloading SQL Server 2016 express edition and opening the database there. You can also try this answer as it is a very similar issue.
If you have any questions about this, provide more details on the steps you've taken and I'll be happy to help.

VS2013 schema compare: "Source is unavailable" when running against SQL Server 2016 Express

I'm trying to run a schema comparison using Visual Studio 2013.5 with SQL Server Data Tools 12.0.50730.0 against a SQL Server 2016 (13.0.300) Express database.
I can configure the source connection OK, and when I hit 'Test Connection' in the connection properties dialog it says "Test connection succeeded."
However, when I hit 'Compare' in the schema comparison window it says "Initializing Comparison..." for a few seconds, then "Source is unavailable: "
This only happens if I use a SQL Server 2016 as the source, other servers work fine.
Is this a bug?
EDIT: I have also tried using SSDT 14.0.50730.0 in VS2015 and I get the same error.
In Visual Studio 2017 I had the same issue and the only solution that worked for me was:
Close Visual Studio, open it and try again :) It seems to be a caching issue. Another option is to rename the DB but that's not a nice way of workarounding this issue.
SQL Server Data Tools support for SQL Server 2016 is now GA and the latest update through Extensions and Updates in VS2013 and VS2015 will resolve this issue for you. You can also download directly from this page for VS2015, and this page for VS2013.
I had this error. Once I changed the server name from "pcname" to its IP "192.168.1.xxx" it worked.
The tools for SQL Server 2016, like the database engine itself, are still in preview. The July RTM release of SSDT doesn't include support for SQL Server 2016. You'll need to download and install the "SSDT June Preview" release from here: https://msdn.microsoft.com/library/mt204009.aspx
I have found that using username#servername as the username for connecting will fix the issue when it happens against Azure databases. Not sure if this works for non-Azure. I've had connections that have historically worked without doing this suddenly stop and then this has fixed it for me.
For instance, when using a login of mylogin and connecting to myserver.database.windows.net, if I instead use mylogin#myserver.database.windows.net as the username I won't get the "Source is unavailable" issue.
I was having the same problem connecting to AWS RDS instance. The only changes that I can tell caused the problem were upgrading to VS2015 and SSDT 14.0.61021.0
I added the following to the connection string and some combination of them fixed the problem:
;Connect Timeout=60;Encrypt=False;TrustServerCertificate=True;Persist Security Info=True
I figured this out by recreating the comparison then comparing the two .scmp files
When I had this error message, the solution was to use a login that had the sysadmin server role.
It seems to be a cache issue. I get it resolved by
Connect to some other Database on the same server
Compare schema against target project
Remove history of your main database from the connections
Restart Visual Studio
Create connection with your main database and compare schema again
Hope it works for you!

sql server 2008 express setup problem

I previously had sql server 2005 express and uninstalled it.. I also uninstalled any vs related programs and installed visual web developer 2008 express edition with SP1. now that I am trying to install sql server 2008, I am seing error messages like no other and leave that alone without any suggestions..
the latest one which I could not come to a proper solution on the internet is;
consistency validation for sql server registry keys error which suggests
"The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix registry keys.
as you might have guessed nothing so informative in the documentation... Also, when I try to delete any sql server related registry key, it does not let me. (yes I stopped all the related services..)
anybody here that can be of any assistance?
You can try with this procedure :
Stop all SQL Server Services
Remove all SQL Server Services with sc delete servicename
Control Panel - Add/Remove Programs - Select and Remove all Microsoft
SQL Server programs
Open regedit and remove all SQL Server folders in this registry key: HKEY_LOCAL_MACHINE/ SOFTWARE/MICROSOFT
Remove SQL Server folders from Program Files directory
Reboot
This procedure should resolve the issue, i've resolved with this procedure ...
i found this to happen if you had an add-in for SSMS installed which hasn't been uninstalled before ssms was uninstalled.
You may need to change the permissions on the relevant registry keys using regedt32 first so that you can then delete the keys via normal regedit
Well actually, I believe, one should not go through such mess in order to accomplish a simple task like this. In the end, I ended up formatting my PC and re-installing SQL Server.
I know this is an old question and you already said in comments that you reformatted the machine. However, I just ran into this exact message and wanted to share my solution because it was so easy, but the error message didn't help at all!
I was using the wrong installation package. I had a 64-bit Intel Windows 7 computer and I was trying to use the x86 version of SQL Server 2008. Once I found the correct version (x64) I did not get this error and the install proceeded normally.
I had a similar problem because I still had some remnants of SQL Server 2005 left - not the services, it was some parts of the IDE. Anyway, to resolve it I used the option to upgrade (sorry, I can't remember the exact option just now). After running the upgrade portion, which took a few minutes, I could then run the full install with no problems.

Resources