Not all privileges or groups referenced are assigned to the caller - sql-server

I'm a noob on DBA profile. I was installing a SQL server 2008 R2 on Windows 2008 R2. while installing sql-server i received the following error. I was not able to locate any log at *C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap*
TITLE: Microsoft SQL Server 2008 R2 Setup
The following error has occurred:
Not all privileges or groups referenced are assigned to the caller.
Click 'Retry' to retry the failed action, or click 'Cancel' to cancel
this action and continue setup.
For help, click:
http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.50.1600.1&EvtType=0xB2652E58%25400xDC80C325
BUTTONS:
&Retry Cancel
Could you please help me troubleshoot/fix this issue?

As it was a new instance, rebuilding the system databases worked for me. Be careful if it is an old instance as all data will be wiped out (you still can take backups and restore data, just a bit more complicated). Details as to how to rebuild the databases here

If you are trying to install MSSQL Server 2008 R2 after uninstalling any higher or lower version of MSSQL Server i.e MS SQL Server 2012,2014. Please make sure that you have removed every single file with the name SQL Server except the following three files from the control panel >> Programs >> Uninstall a Program.
Microsoft SQL Server Compact 3.5 SP2 ENU
Microsoft SQL Server Compact 3.5 SP2 Query Tool ENU
Microsoft SQL Server Compact 4.0 SP1 x64 ENU CTP1
Also, removed the MSSQL Server folder from the following path
C:\Program Files\
C:\Program Files(x86)
C:\ProgramData\Microsoft
After then restart the system and try to install it.
Please let me know if you receive any errors.

Related

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.

SQL server 2012. Exception: attempted to read or write protected memory (MS.VS.OLE.Interop)

I am more an end-user of SQL Server 2012. When I right click on a table name and select "Edit top 200 rows" menu item. I get this message:
Exception has been thrown by the target of an invocation. (mscorlib)
Additional information:
Attempted to read or write protected memory. This is often an indication that
other memory is corrupt. (Microsoft.VisualStudio.OLE.Interop)
If I try to do the right click again, SQL server will stop working and close. I still can use SQL commands to insert or update database. I have been searching around for a solution, and found this link: http://social.msdn.microsoft.com/Forums/vstudio/en-US/42b79da5-6f1e-4122-a2cb-00def87a1ae2/microsoftvisualstudiooleinterop-attempted-to-read-or-write-protected-memory-this-is-often-an?forum=visualstudiogeneral
But it still does not help me to understand clearly the cause or find the solution to the issue. Any help to resolve this problem is highly appreciated. Thanks.
Are you attempting to edit a SQL 2014 database with the 2012 version (or earlier) of SQL Management Studio?
You can determine the SQL version of your database by running this query against your master database:
SELECT ##VERSION
I had the same problem and I was able to direct edit tables ('Edit Top 200') by installing and using SQL Server Management Studio 2014. Even if both your DB and Management Studio are version 2012, it might not hurt to upgrade Management Studio.
I have also faced the same issue. And I noticed one thing that if you are using SQL database newer then the SQL management studio version, You will received that message. To overcome this issue just install SQL management studio equal or greater then version of database. i.e if you have SQL 2012 then you need to install SQL management studio 2012 or 2014.
If anyone experiences the same issue in MS SQL SERVER from a different scenario ( eg - creating new database diagram )
And if this happened after fully uninstalling MS VISUAL STUDIO
Follow the Steps Below;
Delete Folders MSDesigners8 and Visual Database Tools from the paths below.
C:\Program Files (x86)\Common Files\Microsoft Shared\MSDesigners8
C:\Program Files (x86)\Common Files\Microsoft Shared\Visual Database
Tools
Reinstall Visual Studio and Run Repair Tools from the Visual Studio Installer.
This Will Regenerate the folders we removed above and will repair partial fragments.
Now your SQL SERVER Database Diagrams should be working fine. Cheers :)
I have found a solution which does not require restart. Go to:
C:\Users\<User Name>\AppData\Local\Temp
and delete all the files. Before deleting, close the SSMS window.

Remote Procedure call failed with sql server 2008 R2

I am working with SQL Server 2008 R2. I am unable to connect to my database remotely. I got the following error.
A network-related or instance-specific error occurred while establishing a connection
to SQL Server. The server was not found or was not accessible. Verify that the instance
name is correct and that SQL Server is configured to allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I have checked the SQL Server properties and I enable the Allow remote connections.
I have checked the Service manager and SQL Server service are running.
I have checked the configuration manager, I can't see any services under SQL Server Services
and it shows Remote Procedure call failed
So please guide me.
Open Control Panel > Administrative Tools > Services > Select Standard services tab (under the bottom) > Find start SQL Server Agent
Right Click and select properties,
Startup Type : Automatic,
Apply, Ok.
Done.
I just had the same issue and was able to solve it by installing Service Pack 1.
This error occurs only after I have installed the Microsoft Visual Studio 2012 setup in my work machine.
Since it is being a WMI error, I recompiled the MOF file –> mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"
I also un-registered and re-registered the sql provider DLL –> regsvr32 "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmprovider.dll" but issue not resolved.
Solution:
I have applied SQL Server 2008 R2 SP2 on my SQL 2008 R2 instance and that fixed the issue with Sql Server Configuration Manager. You can download setup from here... http://www.microsoft.com/en-us/download/details.aspx?id=30437 .
After trying everything between Stackoverflow and Google, I finally found a solution : http://blogs.lessthandot.com/index.php/datamgmt/dbadmin/remote-procedure-call-failed/
TL;DR :
If you are (or were) running multiple versions of SQL Server on your machine, that Configuration Manager shortcut on your start menu might be pointing to an older version, which it shouldn't be. It was pointing to an old Sql Server 2008 instance in my case.
The solution was to :
Go to either C:\Windows\SysWOW64 or C:\Windows\System32, depending on your system.
Look for an executable called SQLServerManagerXX.msc, and run the latest version if you have multiple ones. In my case, I had both SQLServerManager11.msc and SQLServerManager10.msc, where the 10th gave the error, and the 11th worked perfectly.
I can't comment yet, but make sure you made all the checks in this quide: How to enable remote connections in SQL Server 2008? It should work fine if all steps are made.
Upgrade your SQL Server to SP3
You can install it from:
http://www.microsoft.com/en-us/download/details.aspx?id=27594
This error appears to happen when .mof files (Managed Object Format (MOF)) don’t get installed and registered correctly during set-up. To resolve this issue, I executed the following mofcomp command in command prompt to re-register the *.mof files:
mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"
This one worked for me
start SQL Server Agent from the command prompt using:
SQLAGENT90 -C -V>C:\SQLAGENT.OUT
You might need to install SQL Server 2008 SP3.
SQL Server 2008 Service Pack 3
SQL Server 2012 Configuration Manager WMI Error – Remote Procedure call failed [0x800706be]
I got the samilar issue, while both SQLServer and SQLServerAgent services are running. The error is fixed by a restart of services.
Server Manager > Service >
SQL Server > Stop
SQL Server > Start
SQL Server Agent > Start
Open Control Panel
Administrative Tools
Services
Select Extended services tab
Find SQL Server(MSSQLSERVER) & SQL Server(SQLEXPRESS)
Stop these services and Start again (from the start & stop button displayed above)
Done.

SQL Server 2005 Express successfully installed, but is nowhere to be found!

I've SQL Server 2008 Express installed. I've just download and installed SQL Server 2005 Express, but I changed the name of instance into SQLEXPRESS2005 (I added 2005 at the end to avoid conflicting names).
Unfortunately, when I try to access the 2005 instance either using the SQL Server Management Studio or the VWD 2008 Express (Database Explorer window), I don't see it.
I just disk-recovered my system, so I lost many of my files. But, before that, I had both versions, one having 2005 as instance name.
So here are the summary of the issues:
I was able to download and install successfully the Express 2005
When I try to connect to a server, I only see.\SQLEXPRESS as option (there's no SQLEXPRESS2005)
When I try to connect from the VWD, I get the Server not found ERROR!
I can see the SQL SERVER 2005 icon on the Control Panel window. But, when I try to
uninstall it, I get a error message telling that this program is not found
When do Start -> All Programs, I can see the The Microsoft SQL Server 2005 folder
It's really strange as I was successfully able to install both versions before I experienced problem with my system.
Thanks for helping.
Do you see the service for the SQLEXPRESS2005 instance? If it isn't there then the instance doesn't exist and you'll need to reinstall.

SQL Server 2005 SP2 or SP3 not updating Management Studio?

I applied SQL Server 2005 SP2 and marked all the components to be updated, including Client tools, but the version in the Help -> About box still has version 1399, while the server does indeed had 3042.
I then re-applied SP2 to only Client tools, and everything ran successfully (again, first time did too) but still, no version update for management studio.
Now, I just applied SP3 with everything successfully, but still management studio version did not get updated.
How can I update it? Or at least how can I uninstall just Management studio so I can install it from a newer DVD?
Thanks.
If you go to Control Panel > Add Remove programs and then choose the appropriate SQL Server installation, this will start the typical install wizard for SQL Server.
You can then select the specific components that you wish to uninstall.
If you are having difficulties with SQL Server 2005 Service Pack 3 may I suggest that you visit the SQL Server Central forums as there are a wealth of resources for SQL Server SP3. It was actually due to user demand from this forum that resulted in there even being an SP3 release.
http://www.sqlservercentral.com/Forums/Forum146-1.aspx
Let me know how you get on.
Cheers, John
I got the Error in sql server sp3 installation log which caused this:
Error Number : 29538
Error Description : MSP Error: 29538 SQL Server Setup did not have the administrator permissions required to rename a file: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mssqlsystemresource1.ldf. To continue, verify that the file exists, and either grant administrator permissions to the account currently running Setup or log in with an administrator account. Then run SQL Server Setup again.
Hate to answer my own question, but I had to manually un-install Client Tools, re-install them using SQL Server 2005 setup, and THEN apply the updates.
It wasn't working by just trying to apply updates over the existing original installation.
And i mention un-installing using the SQL Server 2005 Setup because trying to do it from the Add/Remove Programs dialog won't let you or will give you trouble.

Resources