Re: cannot acees two databases as owner



You are going to be able to login to your SQL Server as a sysadmin as long as you have Builtin\Administrators Login exists (in terms of default settings...) Otherwise, it does not matter you are a member of the Administrators group on your Windows or not... You need to be a member of the sysadmin fixed server role on SQL Server to be able to manage it as you wish.

Well, if you do not know any other Login's password which is a member of the sysadmin fixed server role or if there is no any other Login which is a member of the sysadmin (like Domain Admins group or Enterprise Admins group if it's a domain) and you can login to your SQL Server with, then it means you locked yourself out of your SQL Server box.

Try to find out the "sa" password from your web application?

You can not change sa' s password when you are a normal user nor create a Login which is a member of the sysadmin fixed server role.

--
Ekrem Önsoy



"David" <dav@xxxxxxxxxxxx> wrote in message news:OjGWxaORIHA.1208@xxxxxxxxxxxxxxxxxxxxxxx
Thanks for replying (again).

You're right: Buitlin\administrators has gone ...
But i don't understand that "myaccount", which is present and which is member of the built-in group Administrators, is not sysadmin.
Now i tried several things, but all failed:
1) login with 'sa': i don't now the password. And i cant' change it in Studio Management because of "not enough permissions..."
2) create in Studio Management Built-in\Administrators: "not enough permissions..."
3) make "myaccount" sysadmin: still "not enough permissions..."

So there is nothing i can do with "myaccount" .. and i can't log in with 'sa'.
Hopeless?

"Ekrem Önsoy" <ekrem@xxxxxxxxxxxx> schreef in bericht news:8880F628-D025-4CA5-86F6-ED21FF56D6CD@xxxxxxxxxxxxxxxx
There is a Login created when you were installing SQL Server. It's name is BUILTIN\Administrators. It lets members of Local Administrators login to SQL Server
as a member of sysadmin fixed server role. Which makes you System Administrator of SQL Server.

I think, your web application uses "sa" account to connect to your SQL Server. As you probably know "sa" account is a builtin account and it's also a member of the sysadmin fixed server role.

I think, someone removed BUILTIN\Administrators from the sysadmin fixed server role. Or deleted it and you are connecting your SQL Server as a public user (in this case I assume there is another Login which lets you login to your SQL Server)

Try to connect to your SQL Server using your "sa" account and investigate your Login if possible.

--
Ekrem Önsoy



"David" <dav@xxxxxxxxxxxx> wrote in message news:eCUQdSMRIHA.536@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

i have already posted this in other forums but so far nobody could tell me how to solve this.

i log in to Sql server with Studio Management with Windows Authentification. My account ("myaccount") is local 'administrator' on this computer. There are several databases and "myaccount" is owner of all databases.

On one day, as far as i know nothing changed to the configuration of sql server, two databases were no longer accessible: when trying to expand them: error: "this database is not accessible" and when trying to rightclick on them in order to see the properties:
Cannot show requested dialog. (Microsoft.SqlServer.Express.SqlMgmt)
------------------------------
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
The server principal "SERVERNAME\myaccount" is not able to access the database
"sales" under the current security context. (Microsoft SQL Server, Error:
916)

But the webapplication still runs: i can insert records, update, delete ...
from asp.net.

Any attempt to grant myself privileges or make me sysadmin gives the error: "user does no have permission for performing ..."

I also tried "reconfigure with override" with the same error. Same thing when trying to remove a login ...

So i have the idea that the account "myaccount" has lost its owner privileges because of unknown reason.

Can somebody tell me the right steps to do for recovering the two databases?
Thanks
David








.



Relevant Pages

  • Re: SQL Login
    ... The sa login account is a member of that role as well. ... Dejan Sarka, SQL Server MVP ... > But how do we add the User X to the sysadmin / ...
    (microsoft.public.sqlserver.security)
  • Re: Other way of Changing Password if does not have Server Role
    ... A user can change his password without being a member of the sysadmin role. ... You just have to login as the user and then omit the 3rd parameter ... Dejan Sarka, SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • Re: Help with sp_start_job and xp_sqlagent_proxy_account
    ... A user who is not a member of the sysadmin role can use ... >user is not a member of the sysadmin fixed server role and the job has not ... >sp_start_job will impersonate the SQL Server Agent proxy account, ... >user group to the sysadmin server role. ...
    (microsoft.public.sqlserver.security)
  • Re: Unexpected Login Screen When Accessing SQL Data Via .NET Intra
    ... >> data and the SQL Server is on the same server. ... >> My problem is that one user has started getting a login popup ... >> right in via Windows Authentication like everyone else and like they ...
    (microsoft.public.sqlserver.connect)
  • Re: cannot acees two databases as owner
    ... it does not matter you are a member of the ... the sysadmin fixed server role or if there is no any other Login which is ... group if it's a domain) and you can login to your SQL Server with, ...
    (microsoft.public.sqlserver.setup)