开发者

Revert my database permissions to "admin"

开发者 https://www.devze.com 2023-02-09 23:42 出处:网络
I am having an unusual problem with MS SQL Server 2008 R2. My problem is a bit odd: * Installed MS SQL and used in in my application. The app logs onto the server with the \'local Windows authenticati

I am having an unusual problem with MS SQL Server 2008 R2. My problem is a bit odd: * Installed MS SQL and used in in my application. The app logs onto the server with the 'local Windows authentication'. Mixed mode is disabled. * We had to rename our server. So now the 'local authentication' stops working. That's ok, because we use 'sa' in Mixed Mode as a temporary workaround. * However, we can't seem to get back to 'local Windows authentication'. It seems that our newly created user account doesn't have full permissions. We checking pretty much every option, and can see things improving as we find the right permission tick boxes to click. However, we end up with problems as every so often a permission error occurs.

My question: What's the way to give 'god' permissions to a local role, or at least to revert it to the original permissions 开发者_开发问答we have when the server was installed?


If you can log in using SA, then you can manually add the user again as a sysadmin user.

-- if the login already exists. don't mind any errors or warnings
drop login [mpcuat\richard]
GO

Recreate the login as a SQL Server user

create login [mpcuat\richard] from windows
GO

Add the user as a sysadmin

exec sp_addsrvrolemember [mpcuat\richard], sysadmin
GO
0

精彩评论

暂无评论...
验证码 换一张
取 消