473,526 Members | 2,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 31729
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
51404
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 value for date type? Thanks Kai
6
12076
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 table is first created - i create the table and then run a query to set the foreign key and relationship (one-to-one, one-to-many etc) Anyways,...
5
10299
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 = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\Temp\BOND.xls;" & _ "Extended Properties=""Excel 8.0;HDR=YES;""" Dim oCn As New OleDbConnection(strConn)
0
2782
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 nvarchar(max) null ; The event_description column was created with a default value ''. Now this constraint is not allowing me to alter the column...
6
7691
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 which reads and drops the same temporary table. My users are not able to create dbo tables (eg dbo.tblTest), but are permitted to create tables under...
2
2325
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
6960
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="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http:// www.xyz.com');">set the homepage</a> The problem with this code is when i click the link it prompts me a
8
19083
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 print them so I would like to be able to change the default printer, print the odd reports and then change it back to the default printer after. I...
0
921
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 oracle database. I have used window authorization when accessing sql database and here I don't use an account or password.
0
7476
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7653
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7236
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7604
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5782
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3316
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
890
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.