Showing posts with label appear. Show all posts
Showing posts with label appear. Show all posts

Saturday, February 11, 2012

"dbo" user lost after having a database restore

Sometimes (but not always), "dbo" user will be lost after having a database
restore, how can I make the "dbo" user appear again ?Probably because the database was owned by some login which doesn't exist on
the destination SQL Server. Use sp_changedbowner and change the owner to sa
or some other existing login.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"cpchan" <cpchaney@.netvigator.com> wrote in message
news:c1svec$pq94@.imsp212.netvigator.com...
> Sometimes (but not always), "dbo" user will be lost after having a
database
> restore, how can I make the "dbo" user appear again ?
>

"dbo" user lost after having a database restore

Sometimes (but not always), "dbo" user will be lost after having a database
restore, how can I make the "dbo" user appear again ?Probably because the database was owned by some login which doesn't exist on
the destination SQL Server. Use sp_changedbowner and change the owner to sa
or some other existing login.
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"cpchan" <cpchaney@.netvigator.com> wrote in message
news:c1svec$pq94@.imsp212.netvigator.com...
> Sometimes (but not always), "dbo" user will be lost after having a
database
> restore, how can I make the "dbo" user appear again ?
>

Thursday, February 9, 2012

"Best" error messages contest

Server: Msg 1015, Level 15, State 1, Line 1
An aggregate cannot appear in an ON clause unless it is in a subquery
contained in a HAVING clause or select list, and the column being aggregated
is an outer reference.Why not to post the statement also?
AMB
"Ian Boyd" wrote:

> Server: Msg 1015, Level 15, State 1, Line 1
> An aggregate cannot appear in an ON clause unless it is in a subquery
> contained in a HAVING clause or select list, and the column being aggregat
ed
> is an outer reference.
>
>|||Cause it was querying a view, with a self aggregate join. It wouldn't make
sense.
Besides, that's not the contest.

> Why not to post the statement also?|||"Ian Boyd" <ian.msnews010@.avatopia.com> wrote in message
news:%23iiDq5LTFHA.3840@.tk2msftngp13.phx.gbl...
> Server: Msg 1015, Level 15, State 1, Line 1
> An aggregate cannot appear in an ON clause unless it is in a subquery
> contained in a HAVING clause or select list, and the column being
> aggregated is an outer reference.
>
RAISERROR('Two guys walk into a bar...',0,1)|||Q: "Who Killed the Monkey in Raiders of the Lost Ark?"
A: "Bad Date."
"Chris Hohmann" <nospam@.thankyou.com> wrote in message
news:eUuKDXOTFHA.584@.TK2MSFTNGP15.phx.gbl...
> "Ian Boyd" <ian.msnews010@.avatopia.com> wrote in message
> news:%23iiDq5LTFHA.3840@.tk2msftngp13.phx.gbl...
> RAISERROR('Two guys walk into a bar...',0,1)
>|||"Michael C#" <howsa@.boutdat.com> wrote in message
news:uQjzyhOTFHA.2520@.TK2MSFTNGP09.phx.gbl...
> Q: "Who Killed the Monkey in Raiders of the Lost Ark?"
> A: "Bad Date."
> "Chris Hohmann" <nospam@.thankyou.com> wrote in message
> news:eUuKDXOTFHA.584@.TK2MSFTNGP15.phx.gbl...
>
Dilbert: What color do you want that database?
PHB: I think mauve has more RAM.