Showing posts with label valid. Show all posts
Showing posts with label valid. Show all posts

Sunday, March 11, 2012

Database Diagrams

TITLE: Microsoft SQL Server Management Studio

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.


BUTTONS:

OK

I don't know what is the meaning of the above message, which I get when I 'right click' the Database Diagrams node of the Northwind database. Every thing seems OK, since I am the owner of this database.

I am using the trial version of MS SQL Server 2005.

Hi there,

Check the database compatability level for your database. To do this:

1) Right click on the desired database and select "Properties" from the context menu that appears

2) The "Database Properties" dialog box will appear on your screen. There will be an item on the left hand side of the dialog called "Options". Click on this.

3) The "Database Properties" dialog will change its appearance. There should be an entry in the dialog called "Compatability Level".

Now, from my experience, if the database compatability level is set to anything other than "SQL Server 2005 (90)" then diagramming won't work. You need to change the compatability level to "SQL Server 2005 (90)" if it is not currently set to this.

If that was your problem then after changing the compatability level you should be able to create database diagrams.

Also, while you have the "Database Properties" dialog open, it wouldn't hurt just to check that the owner is valid (if you have not already done so). You can check and edit the database owner by clicking on the "Files" item on the left hand side of the "Database Properties" dialog.

Hope that helps a bit, but sorry if it doesn't
|||

Thanks a lot for your reply

But unfortunately it did not work

I am using Windows Authentication when I log in. And when I click Files in the Database properties windows I find the owner is the same as the log in user.

|||did you create your database with detach/attach?|||

I did not create it

I do not remember, either I imported the database, or it came with the engine.

|||

you might want to eliminate the issue from your local instance by creating a new dummy database. If you have no problem with the new database, the issue might be caused by the source database you got.

I have noticed a similar issue after I shared my database in another machine.

|||

Nate -

Thanks for this post! That worked perfectly for me.

Regards,

Tim

|||

If there is no issue with a fresh database locally, the issue could be likely caused by credential inherited from external database when attached. I found out the similar issue in this scenario and resolved by doing the following,

Alter authorization on database::issue_database_name_here to [domain\user]

Just share my experience.

|||

Sorry, I was offline for few days.

Thank you for your replies. I'll try your solution.

Somebody suggested the following solution to me:

Use Northwind
EXEC sp_helpdb Northwind
EXEC Sp_ChangeDBOwner 'sa'
EXEC sp_helpdb Northwind

I don't have enough experience with SQL Server. So I wish to get your views about the above solution.

database diagrams

Using SQL 2005, I am not able to access existing database diagrams created i
n
SQL 2000. It tells me there is no valid owner for the database and can not
install the diagram support objects. The database properties say SA is the
owner and that is also how I am connected. I have tried everything I can
think of to get to the diagrams.
Any help would be appreciated.You need to set the database compatibility level of the database to 90. You
can do this by running the following statement, or by selecting the
Properties page of the database in SQL Server Mangement Studio.
EXEC sp_dbcmptlevel <database_name> , 90
This is documented in the readme, but is easy to miss. The Books Online
topics on database diagrams will be updated with this information in the
April download of BOL.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"Richard Kohler" <Richard Kohler@.discussions.microsoft.com> wrote in message
news:EDC8EBA9-E131-4553-B965-82FE1AD38CA7@.microsoft.com...
> Using SQL 2005, I am not able to access existing database diagrams created
> in
> SQL 2000. It tells me there is no valid owner for the database and can not
> install the diagram support objects. The database properties say SA is the
> owner and that is also how I am connected. I have tried everything I can
> think of to get to the diagrams.
> Any help would be appreciated.|||That worked! Thank you for your quick reply.
"Gail Erickson [MS]" wrote:

> You need to set the database compatibility level of the database to 90. Y
ou
> can do this by running the following statement, or by selecting the
> Properties page of the database in SQL Server Mangement Studio.
> EXEC sp_dbcmptlevel <database_name> , 90
> This is documented in the readme, but is easy to miss. The Books Online
> topics on database diagrams will be updated with this information in the
> April download of BOL.
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> "Richard Kohler" <Richard Kohler@.discussions.microsoft.com> wrote in messa
ge
> news:EDC8EBA9-E131-4553-B965-82FE1AD38CA7@.microsoft.com...
>
>

Thursday, March 8, 2012

Database Diagrams

TITLE: Microsoft SQL Server Management Studio

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.


BUTTONS:

OK

I don't know what is the meaning of the above message, which I get when I 'right click' the Database Diagrams node of the Northwind database. Every thing seems OK, since I am the owner of this database.

I am using the trial version of MS SQL Server 2005.

Hi there,

Check the database compatability level for your database. To do this:

1) Right click on the desired database and select "Properties" from the context menu that appears

2) The "Database Properties" dialog box will appear on your screen. There will be an item on the left hand side of the dialog called "Options". Click on this.

3) The "Database Properties" dialog will change its appearance. There should be an entry in the dialog called "Compatability Level".

Now, from my experience, if the database compatability level is set to anything other than "SQL Server 2005 (90)" then diagramming won't work. You need to change the compatability level to "SQL Server 2005 (90)" if it is not currently set to this.

If that was your problem then after changing the compatability level you should be able to create database diagrams.

Also, while you have the "Database Properties" dialog open, it wouldn't hurt just to check that the owner is valid (if you have not already done so). You can check and edit the database owner by clicking on the "Files" item on the left hand side of the "Database Properties" dialog.

Hope that helps a bit, but sorry if it doesn't
|||

Thanks a lot for your reply

But unfortunately it did not work

I am using Windows Authentication when I log in. And when I click Files in the Database properties windows I find the owner is the same as the log in user.

|||did you create your database with detach/attach?|||

I did not create it

I do not remember, either I imported the database, or it came with the engine.

|||

you might want to eliminate the issue from your local instance by creating a new dummy database. If you have no problem with the new database, the issue might be caused by the source database you got.

I have noticed a similar issue after I shared my database in another machine.

|||

Nate -

Thanks for this post! That worked perfectly for me.

Regards,

Tim

|||

If there is no issue with a fresh database locally, the issue could be likely caused by credential inherited from external database when attached. I found out the similar issue in this scenario and resolved by doing the following,

Alter authorization on database::issue_database_name_here to [domain\user]

Just share my experience.

|||

Sorry, I was offline for few days.

Thank you for your replies. I'll try your solution.

Somebody suggested the following solution to me:

Use Northwind
EXEC sp_helpdb Northwind
EXEC Sp_ChangeDBOwner 'sa'
EXEC sp_helpdb Northwind

I don't have enough experience with SQL Server. So I wish to get your views about the above solution.

Database diagram in SQL Server 2005

I cannot create a database diagram in SQL Server 2005.
When I try to create a diagram I receive the message that the database does
not have a valid owner. I changed the database owner to sa and yet the
message persists.
I get this invalid owner messsage when I try to create a new database
diagram or install support for diagrams.
Has anyone else experienced this problem?Dave
Did you upgrade the database to SQL Server 2005 or it was initialy created
?
"Dave" <davefrick@.newsgroup.nospam> wrote in message
news:uChrIOS9GHA.1012@.TK2MSFTNGP05.phx.gbl...
>I cannot create a database diagram in SQL Server 2005.
> When I try to create a diagram I receive the message that the database
> does not have a valid owner. I changed the database owner to sa and yet
> the message persists.
> I get this invalid owner messsage when I try to create a new database
> diagram or install support for diagrams.
> Has anyone else experienced this problem?
>|||What is the compatibility mode of the database?
You can check with:
select compatibility_level
from sys.databases
where name = 'YourDatabase'
It needs to be at 90 to use the diagrams. You can change it
to 90 with:
EXEC sp_dbcmptlevel YourDatabase, 90
I think this was fixed in the service pack so the other
alternative is to apply SP1.
-Sue
On Sat, 21 Oct 2006 09:03:22 -0700, "Dave"
<davefrick@.newsgroup.nospam> wrote:
>I cannot create a database diagram in SQL Server 2005.
>When I try to create a diagram I receive the message that the database does
>not have a valid owner. I changed the database owner to sa and yet the
>message persists.
>I get this invalid owner messsage when I try to create a new database
>diagram or install support for diagrams.
>Has anyone else experienced this problem?
>|||Hi,
My understanding of your issue is that:
You cannot create a database diagram on your database due to the invalid
owner error:
Database diagram support objects cannot be installed because this database
does not have a valid owner. To continue, first use the Files page of the
Database Properties dialog box or the ALTER AUTHORIZATION statement to set
the database owner to a valid login, then add the database diagram support
objects.
If I have misunderstood, please let me know.
This issue is caused by the database compatibility. If the database is not
in 90 compatibility level, the error will occcur.
Please run the following statements to resolve this issue:
USE master
GO
EXEC sp_dbcmptlevel 'your_database_name', '90';
ALTER AUTHORIZATION ON DATABASE::your_database_name TO [your_login_name]
GO
For more information, please refer to:
Understanding Database Diagram Ownership (Visual Database Tools)
http://msdn2.microsoft.com/en-us/library/ms186345.aspx
If you have any other questions or concerns, please feel free to let me
know. It's my pleasure to be of assistance.
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hi,
I am interested in this issue. Would you mind letting me know the result of
the suggestions? If you need further assistance, feel free to let me know.
I will be more than happy to be of assistance.
Have a great day!
Charles Wang
Microsoft Online Community Support|||I have this same issue at the moment, and I am on compatibility level 90. I
have other databases on the same server for which I am able to use database
diagramming.
"Charles Wang[MSFT]" wrote:
> Hi,
> I am interested in this issue. Would you mind letting me know the result of
> the suggestions? If you need further assistance, feel free to let me know.
> I will be more than happy to be of assistance.
> Have a great day!
> Charles Wang
> Microsoft Online Community Support
>|||I have the same issue. My database is set with compatibility level 90. I
have other databases in the same instance of SQL server for which I can use
database diagrams.
"Charles Wang[MSFT]" wrote:
> Hi,
> I am interested in this issue. Would you mind letting me know the result of
> the suggestions? If you need further assistance, feel free to let me know.
> I will be more than happy to be of assistance.
> Have a great day!
> Charles Wang
> Microsoft Online Community Support
>|||what i did to fix this was go to database your working with, go to
properties, click on FILES and then add the SA account to the owner... done!
"lund0529" wrote:
> I have the same issue. My database is set with compatibility level 90. I
> have other databases in the same instance of SQL server for which I can use
> database diagrams.
> "Charles Wang[MSFT]" wrote:
> > Hi,
> >
> > I am interested in this issue. Would you mind letting me know the result of
> > the suggestions? If you need further assistance, feel free to let me know.
> > I will be more than happy to be of assistance.
> >
> > Have a great day!
> >
> > Charles Wang
> > Microsoft Online Community Support
> >
> >|||Thanks Charles.
Setting the compatibility level to 90 solved my problem.
Dave
"Charles Wang[MSFT]" <changliw@.online.microsoft.com> wrote in message
news:PJRiU9N%23GHA.4432@.TK2MSFTNGXA01.phx.gbl...
> Hi,
> I am interested in this issue. Would you mind letting me know the result
> of
> the suggestions? If you need further assistance, feel free to let me know.
> I will be more than happy to be of assistance.
> Have a great day!
> Charles Wang
> Microsoft Online Community Support
>|||Hi Dave,
Appreciate your update and response. I am glad to hear that the problem has
been fixed. If you have any other questions or concerns, please do not
hesitate to contact us. It is always our pleasure to be of assistance.
Have a nice day!
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================

Database diagram in SQL Server 2005

I cannot create a database diagram in SQL Server 2005.
When I try to create a diagram I receive the message that the database does
not have a valid owner. I changed the database owner to sa and yet the
message persists.
I get this invalid owner messsage when I try to create a new database
diagram or install support for diagrams.
Has anyone else experienced this problem?Hi,
I am interested in this issue. Would you mind letting me know the result of
the suggestions? If you need further assistance, feel free to let me know.
I will be more than happy to be of assistance.
Have a great day!
Charles Wang
Microsoft Online Community Support|||I have this same issue at the moment, and I am on compatibility level 90. I
have other databases on the same server for which I am able to use database
diagramming.
"Charles Wang[MSFT]" wrote:

> Hi,
> I am interested in this issue. Would you mind letting me know the result o
f
> the suggestions? If you need further assistance, feel free to let me know.
> I will be more than happy to be of assistance.
> Have a great day!
> Charles Wang
> Microsoft Online Community Support
>|||I have the same issue. My database is set with compatibility level 90. I
have other databases in the same instance of SQL server for which I can use
database diagrams.
"Charles Wang[MSFT]" wrote:

> Hi,
> I am interested in this issue. Would you mind letting me know the result o
f
> the suggestions? If you need further assistance, feel free to let me know.
> I will be more than happy to be of assistance.
> Have a great day!
> Charles Wang
> Microsoft Online Community Support
>|||what i did to fix this was go to database your working with, go to
properties, click on FILES and then add the SA account to the owner... done!
"lund0529" wrote:
[vbcol=seagreen]
> I have the same issue. My database is set with compatibility level 90. I
> have other databases in the same instance of SQL server for which I can us
e
> database diagrams.
> "Charles Wang[MSFT]" wrote:
>|||Thanks Charles.
Setting the compatibility level to 90 solved my problem.
Dave
"Charles Wang[MSFT]" <changliw@.online.microsoft.com> wrote in message
news:PJRiU9N%23GHA.4432@.TK2MSFTNGXA01.phx.gbl...
> Hi,
> I am interested in this issue. Would you mind letting me know the result
> of
> the suggestions? If you need further assistance, feel free to let me know.
> I will be more than happy to be of assistance.
> Have a great day!
> Charles Wang
> Microsoft Online Community Support
>|||Hi Dave,
Appreciate your update and response. I am glad to hear that the problem has
been fixed. If you have any other questions or concerns, please do not
hesitate to contact us. It is always our pleasure to be of assistance.
Have a nice day!
Charles Wang
Microsoft Online Community Support
========================================
==============
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
========================================
==============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============|||Charles,
I am having a same problem where I could not create database diagrams.
I have update the database compatibility mode to 90 and also ran ALTER
AUTHORIZATION ON DATABASE command but no success.
Do you have any other idea of how to fix it?
Thanks.
Bader Cheema
*** Sent via Developersdex http://www.codecomments.com ***

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
>

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.comwhen 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/Forum...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...green">
> when i executed sp_helpdb, i found out that the owner is incorrect. so, ho
w
> will i change it?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...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/Forum...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/Forum...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 Win
dows NT? user. login cannot
become the owner of the current database if it already has access to the dat
abase 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 m
apped to the new owner
of the current database. false indicates that existing aliases to the old da
tabase 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 i
nside 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 store
d procedure.
Executing sp_changedbowner with only the login parameter changes database ow
nership to login and
maps the aliases of users who were previously aliased to dbo to the new data
base 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 map
s 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...green">
> 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/Forum...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 Serv
er 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-7808
659449c5.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...green">
> what is login? im sorry but im a newbie. i don't know what to put in 'logi
n'.
> 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/...&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...green">
> how will i run that link? on internet browser? nothing happens. ty
> --
> Message posted via http://www.droptable.com
>

Wednesday, March 7, 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.sqlmonster.comwhen i executed sp_helpdb, i found out that the owner is incorrect. so, how
will i change it?
--
Message posted via SQLMonster.com
http://www.sqlmonster.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 SQLMonster.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 SQLMonster.com
> http://www.sqlmonster.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 SQLMonster.com
http://www.sqlmonster.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 SQLMonster.com
http://www.sqlmonster.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 SQLMonster.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 SQLMonster.com
> http://www.sqlmonster.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.sqlmonster.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 SQLMonster.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.sqlmonster.com
>|||how will i run that link? on internet browser? nothing happens. ty
--
Message posted via http://www.sqlmonster.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 SQLMonster.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.sqlmonster.com
>|||ok, tnx! u know what i did? i change my computer name on its previous name.
now, database diagram works. how i wish no error will come up because of what
i did..
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200704/1