Re: cannot acees two databases as owner



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: MSSQL$SBSMONITORING Login to Disabled Account?
    ... SQL Server installed, I can't have the tools you were using, can I? ... I still don't know what that process is doing trying to login to the ... Administrator account and I don't understand why this login attempt is ...
    (microsoft.public.windows.server.sbs)
  • Re: xp_cmdshell issue, local system
    ... So initially I tried to change the login using EM, ... account to the localsystem for SQL Server and the same for agent which worked ... Now when I go and try the same for the agent startup account it ...
    (microsoft.public.sqlserver.security)
  • Re: Problems changing the password for the service account in SQL
    ... It is because there is BULTIN\Administrstors Login that alllow access to ... You have a domaim account group that SQL Server ... this domain account in SQL Server ...
    (microsoft.public.sqlserver.security)
  • Re: Builtin Administrators Group and SQL Agent Jobs
    ... >gave that login full access to all SQL DB's. ... >group and rights to all the SQL Server databases. ... >Administrator Server role explicitly. ... >account that is a member of the DBA group and this group ...
    (microsoft.public.sqlserver.security)
  • Re: The SA Mess
    ... I agree - no one needs to use the sa account. ... How does a firewall know that there was an unsuccessful login to SQL ... That info has to come from SQL Server. ...
    (microsoft.public.sqlserver.security)

Loading