Thursday, March 8, 2012

database diagram

i am about to create a database diagram but this error appears. what does
this mean and what should i do? tnx
This database does not have a valid dbo user or you do not have permissions
to impersonate the dbo user, so database diagramming is not available.
Ensure the dbo account is valid and ensure that you have impersonate
permission on the dbo account.
Message posted via http://www.droptable.com
when i executed sp_helpdb, i found out that the owner is incorrect. so, how
will i change it?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server/200703/1
|||sp_changedbowner
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"yshie via droptable.com" <u32884@.uwe> wrote in message news:6fffe869c5ee4@.uwe...
> when i executed sp_helpdb, i found out that the owner is incorrect. so, how
> will i change it?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums.aspx/sql-server/200703/1
>
|||exec sp_changedbowner 'login'
what will i put in the login name? computer name?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server/200703/1
|||exec sp_changedbowner 'login'
what will i put in the login name? computer name?
another thing...
i remembered changing my computer name. and what i see in the dbo owner is
the previous computer name. so, how will i change it to current name?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server/200703/1
|||It is documented in Books Online. Here is a quote (200 BOL):
New Information - SQL Server 2000 SP3.
Changes the owner of the current database.
Syntax
sp_changedbowner [ @.loginame = ] 'login'
[ , [ @.map = ] remap_alias_flag ]
Arguments
[@.loginame =] 'login'
Is the login ID of the new owner of the current database. login is sysname, with no default. login
must be an already existing Microsoft? SQL Server? login or Microsoft Windows NT? user. login cannot
become the owner of the current database if it already has access to the database through an
existing alias or user security account within the database. To avoid this, drop the alias or user
within the current database first.
[@.map =] remap_alias_flag
Is the value true or false, which indicates whether existing aliases to the old database owner (dbo)
are mapped to the new owner of the current database or dropped. remap_alias_flag is varchar(5), with
a default of NULL, indicating that any existing aliases to the old dbo are mapped to the new owner
of the current database. false indicates that existing aliases to the old database owner are
dropped.
Return Code Values
0 (success) or 1 (failure)
Remarks
After sp_changedbowner is executed, the new owner is known as the dbo user inside the database. The
dbo has implied permissions to perform all activities in the database.
The owner of the master, model, or tempdb system databases cannot be changed.
To display a list of the valid login values, execute the sp_helplogins stored procedure.
Executing sp_changedbowner with only the login parameter changes database ownership to login and
maps the aliases of users who were previously aliased to dbo to the new database owner.
Permissions
Only members of the sysadmin fixed server role can execute sp_changedbowner.
Examples
This example makes the user Albert the owner of the current database and maps existing aliases to
the old database owner to Albert.
EXEC sp_changedbowner 'Albert'
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"yshie via droptable.com" <u32884@.uwe> wrote in message news:700044dbf3878@.uwe...
> exec sp_changedbowner 'login'
> what will i put in the login name? computer name?
> another thing...
> i remembered changing my computer name. and what i see in the dbo owner is
> the previous computer name. so, how will i change it to current name?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums.aspx/sql-server/200703/1
>
|||what is login? im sorry but im a newbie. i don't know what to put in 'login'.
pls explain it in the easiest way? i thought it was the computer name.
Message posted via http://www.droptable.com
|||A login is similar to what you login to windows with. But this is a SQL Server login. I suggest you
study below topic in Books Online:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/5d43fefc-5aa4-43d7-aedb-7808659449c5.htm
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"yshie via droptable.com" <u32884@.uwe> wrote in message news:700cc635c361b@.uwe...
> what is login? im sorry but im a newbie. i don't know what to put in 'login'.
> pls explain it in the easiest way? i thought it was the computer name.
> --
> Message posted via http://www.droptable.com
>
|||how will i run that link? on internet browser? nothing happens. ty
Message posted via http://www.droptable.com
|||It is a link to be used in the documentation (SQL Server Books Online) that comes with SQL Server.
That documentation is also available as a separate download:
http://www.microsoft.com/downloads/details.aspx?FamilyId=BE6A2C5D-00DF-4220-B133-29C1E0B6585F&displaylang=en
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"yshie via droptable.com" <u32884@.uwe> wrote in message news:700e8fec996e3@.uwe...
> how will i run that link? on internet browser? nothing happens. ty
> --
> Message posted via http://www.droptable.com
>

No comments:

Post a Comment