473,396 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Default owner using ALTER AUTHORIZATION

Hello,

I have an SQL Server 2005 database that I'm trying to create using script.
Everything works fine, but when I click on "Database Diagrams" I get an
error message that there is no database owner, and of course when I show the
Database Properties, the database was created without one. Is there any way
to ALTER AUTHORIZATION to a default owner or system administrator, something
valid?

Any direction would be appreciated.

Thanks!
Rick
Jan 8 '07 #1
1 31726
Rico wrote:
Hello,

I have an SQL Server 2005 database that I'm trying to create using script.
Everything works fine, but when I click on "Database Diagrams" I get an
error message that there is no database owner, and of course when I show the
Database Properties, the database was created without one. Is there any way
to ALTER AUTHORIZATION to a default owner or system administrator, something
valid?

Any direction would be appreciated.
I'm not sure if I understood you correctly, but please refer to
sp_changedbowner stored procedure. Actually ALTER AUTHORIZATION
statement is also valid.

Try:

EXEC sp_changedbowner 'sa'

or

ALTER AUTHORIZATION ON DATABASE::database_name TO sa
--
Best regards,
Marcin Guzowski
http://guzowski.info
Jan 8 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: kai | last post by:
Hi, All On Northwind database in SQL Server 2000, I try to setup default value at table design windows for "OrderDate" using GETDATE(), but it does not work. How do I use setup GETDATE default...
6
by: Brian Basquille | last post by:
Just started learning SQL recently. But one thing i'm still not clear on is about altering relationships between tables after they've been created. Instead of creating a foreign key when the...
5
by: Przemek Wrzesinski | last post by:
Hi, I'm trying to add additional column using 'alter table' command via OleDB to Excel workbook (one sheet called queExportBOND): Dim strConn As String strConn =...
0
by: spatik | last post by:
Hi, I have a tableevent] with a columnevent_description] as ntext and default value ''. Now, I want to change the column type to nvarchar(max) using this script, alter table alter column ...
6
by: Peter Nurse | last post by:
For reasons that are not relevant (though I explain them below *), I want, for all my users whatever privelige level, an SP which creates and inserts into a temporary table and then another SP...
2
by: chandu0104 | last post by:
how to use constraints using alter command in oracle 9i(sql) i want syntax and exampes. Can i get oracle9i material in net examples for triggers,cursors in pl/sql
2
by: pavi | last post by:
Anyone know how to set the Default homepage using javascript without prompting a pop up. Below is the code i used to set default home page. <a href="#"...
8
by: ncsthbell | last post by:
Is there a way to change my default printer using vb? I have some reports I want to print to a certain printer and some to a different one. I have a routine that loops through all of the reports to...
0
by: Tony Johansson | last post by:
Hello! If you intend to use a Oracle database it it then possible to access the oracle database using window authorization which mean that you don't have to use an account or password on the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.