Showing posts with label sql2k. Show all posts
Showing posts with label sql2k. Show all posts

Saturday, February 25, 2012

need urgent help with sa account...

background sql2k on win2k3
i started getting this error msg when accessing properties page of 'sa'
and 'buildin/administrators' accounts in sql.
Error 21776 [SQL-DMO]the name 'dbo' was not found in the Users
Collection. If the name is qualified name,
use [] to separate various parts of the name, and try again.
i previously disabled the sa right for 'buildin/administrators' and now
i can't add the sa rights back to the group because of this err. i
can't modifiy the 'sa' account for the same reason. i tried to delete
'buildin/administrators' group and add it back but now i can't add it
back either.
1. how to add back the 'buildin/administrators' group?
2. how to fix this error? it doesn't happen to other non-sa accounts.
thank you!!What commadn where you executing to add the security group to sql server
again, Where you able to connect anyway (so did you turned on mixed auth. ?)
Jens Suessmeyer.
"=== Steve L ===" <steve.lin@.powells.com> schrieb im Newsbeitrag
news:1114720021.174631.14500@.g14g2000cwa.googlegroups.com...
> background sql2k on win2k3
> i started getting this error msg when accessing properties page of 'sa'
> and 'buildin/administrators' accounts in sql.
> Error 21776 [SQL-DMO]the name 'dbo' was not found in the Users
> Collection. If the name is qualified name,
> use [] to separate various parts of the name, and try again.
> i previously disabled the sa right for 'buildin/administrators' and now
> i can't add the sa rights back to the group because of this err. i
> can't modifiy the 'sa' account for the same reason. i tried to delete
> 'buildin/administrators' group and add it back but now i can't add it
> back either.
> 1. how to add back the 'buildin/administrators' group?
> 2. how to fix this error? it doesn't happen to other non-sa accounts.
> thank you!!
>|||> 1. how to add back the 'buildin/administrators' group?
EXEC sp_grantlogin 'BUILTIN\Administrators'
EXEC sp_addsrvrolemember 'BUILTIN\Administrators', 'symin'

> 2. how to fix this error? it doesn't happen to other non-sa accounts.
This error may be caused by an incorrect database owner in one or more of
your databases. You can correct the owner with sp_changedbowner like the
example below. See http://support.microsoft.com/kb/q218172/ for more
information.
USE MyDatabase
EXEC sp_changedbowner ''MyOwnerLogin'
Hope this helps.
Dan Guzman
SQL Server MVP
"=== Steve L ===" <steve.lin@.powells.com> wrote in message
news:1114720021.174631.14500@.g14g2000cwa.googlegroups.com...
> background sql2k on win2k3
> i started getting this error msg when accessing properties page of 'sa'
> and 'buildin/administrators' accounts in sql.
> Error 21776 [SQL-DMO]the name 'dbo' was not found in the Users
> Collection. If the name is qualified name,
> use [] to separate various parts of the name, and try again.
> i previously disabled the sa right for 'buildin/administrators' and now
> i can't add the sa rights back to the group because of this err. i
> can't modifiy the 'sa' account for the same reason. i tried to delete
> 'buildin/administrators' group and add it back but now i can't add it
> back either.
> 1. how to add back the 'buildin/administrators' group?
> 2. how to fix this error? it doesn't happen to other non-sa accounts.
> thank you!!
>|||Dan, Thanks for saving my day!!! simply executed the two commands you
sent me. 'BUILTIN\Administrators' was back and all the problems
mysteriously went away. i did detach like 8 databases from the other
server and attached to this server before this happened. i think that
might be one of the problems. although i'm not sure in general, who
should be the owner of all the databases in SQL Server land. since my
accout has sa right, quite often it showes i'm the owner of a database,
but sometimes it's sa, and sometimes it's the domain account created
for running the service (with sa privileges).|||I usually specify the 'sa' login as the owner of production databases and
make it a practice to change the owner following a database restore or
attach. This works well when only symin role members can create
dbo-owned objects. In cases where non-symin role members create
dbo-owned objects, you can create a login that is used only for database
ownership.
Hope this helps.
Dan Guzman
SQL Server MVP
"=== Steve L ===" <steve.lin@.powells.com> wrote in message
news:1114788026.433970.131740@.o13g2000cwo.googlegroups.com...
> Dan, Thanks for saving my day!!! simply executed the two commands you
> sent me. 'BUILTIN\Administrators' was back and all the problems
> mysteriously went away. i did detach like 8 databases from the other
> server and attached to this server before this happened. i think that
> might be one of the problems. although i'm not sure in general, who
> should be the owner of all the databases in SQL Server land. since my
> accout has sa right, quite often it showes i'm the owner of a database,
> but sometimes it's sa, and sometimes it's the domain account created
> for running the service (with sa privileges).
>

Monday, February 20, 2012

Need to understand writing to the Eventlog.

SQL2K
SP4
Howdy all. Im trying to have info written to the Eventlog when a deadlock
occurs, and growing frustrated trying to understand. My original
understanding was that I should RClick the server/ all tasks/ Manage
messages/ 1205 in the Error number/ Find/ Edit/ check Always write to
Eventlog/ OK/ OK.
I took those actions and purposely generated some deadlocks to no avail.
Then I found out what I really need to do is start SQL server by doing
"sqlservr -c -T1204" as instructed in
http://support.microsoft.com/default.aspx?scid=kb;en-us;169960.
Is this the only way? I really dont want to have to bounce all my production
boxes to accomplish this task.
TIA, ChrisR.You don't need to use -T1204 or run sqlsrvr -c -T1204 in order to log the
event in the app eventlog. The trace flag is to log a deadlock graph.
To log the deadlock in the app eventlog, it's sufficient to change the
logging behavior of error 1205 to 'Always write to eventlog'. This is the
same as executing the following:
EXEC sp_altermessage 1205, 'with_log', 'true'
But my experience is that after you have made that change, you need to
recycle the SQL Server instance. I have never had luck not recycling the SQL
instance, and I don't know whether this is a bug or a feature by design.
Linchi
"ChrisR" wrote:
> SQL2K
> SP4
> Howdy all. Im trying to have info written to the Eventlog when a deadlock
> occurs, and growing frustrated trying to understand. My original
> understanding was that I should RClick the server/ all tasks/ Manage
> messages/ 1205 in the Error number/ Find/ Edit/ check Always write to
> Eventlog/ OK/ OK.
> I took those actions and purposely generated some deadlocks to no avail.
> Then I found out what I really need to do is start SQL server by doing
> "sqlservr -c -T1204" as instructed in
> http://support.microsoft.com/default.aspx?scid=kb;en-us;169960.
> Is this the only way? I really dont want to have to bounce all my production
> boxes to accomplish this task.
> TIA, ChrisR.
>|||Perfect, thanks.
"Linchi Shea" wrote:
> You don't need to use -T1204 or run sqlsrvr -c -T1204 in order to log the
> event in the app eventlog. The trace flag is to log a deadlock graph.
> To log the deadlock in the app eventlog, it's sufficient to change the
> logging behavior of error 1205 to 'Always write to eventlog'. This is the
> same as executing the following:
> EXEC sp_altermessage 1205, 'with_log', 'true'
> But my experience is that after you have made that change, you need to
> recycle the SQL Server instance. I have never had luck not recycling the SQL
> instance, and I don't know whether this is a bug or a feature by design.
> Linchi
> "ChrisR" wrote:
> > SQL2K
> > SP4
> >
> > Howdy all. Im trying to have info written to the Eventlog when a deadlock
> > occurs, and growing frustrated trying to understand. My original
> > understanding was that I should RClick the server/ all tasks/ Manage
> > messages/ 1205 in the Error number/ Find/ Edit/ check Always write to
> > Eventlog/ OK/ OK.
> > I took those actions and purposely generated some deadlocks to no avail.
> > Then I found out what I really need to do is start SQL server by doing
> > "sqlservr -c -T1204" as instructed in
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;169960.
> >
> > Is this the only way? I really dont want to have to bounce all my production
> > boxes to accomplish this task.
> >
> > TIA, ChrisR.
> >