473,498 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

changing object owner syntax

Hi there,
We have a user name convention here that specifies users in the
following way:
jane.doe
john.smith

In order to change a database object I must specify the owner name along
with the object name. Does anyone know the proper syntax for doing this
with a user name that contains a period? When I put the user name
followed by the object name in quotes such as 'jane.doe.tb_test_table',
SQL Server can not find the object.
Any help is appreciated.
Kelly
Jul 20 '05 #1
1 3419

"Kelly Prendergast" <ke***************@noaa.gov> wrote in message
news:40***************@noaa.gov...
Hi there,
We have a user name convention here that specifies users in the
following way:
jane.doe
john.smith

In order to change a database object I must specify the owner name along
with the object name. Does anyone know the proper syntax for doing this
with a user name that contains a period? When I put the user name
followed by the object name in quotes such as 'jane.doe.tb_test_table',
SQL Server can not find the object.
Any help is appreciated.
Kelly


You will need to quote the owner name:

exec sp_changeobjectowner '[jane.doe].tb_test_table', 'dbo'

You may want to consider changing your naming convention - since the .
character delimits object name parts in MSSQL, it would probably be best to
avoid confusiong by not allowing it in user names. Although of course I
appreciate this may be beyond your control.

Simon
Jul 20 '05 #2

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

Similar topics

3
81138
by: Manning | last post by:
Hi- apologies for asking a stupid newbie question, but I'm really stuck at the moment. I need to change table ownership. I've got an asp script which is looking for a table owned by the dbo role,...
1
3717
by: Robbie | last post by:
Hi Guys Wonder if you could help me. Basically I produce an accounts package that uses a SQL 2000 DB as the RDBMS. I always instruct users to login as 'sa' and the relevant password when...
4
2257
by: Zork | last post by:
Hi, I am trying to stop object creation (in this case ill use a ball as the object) via use of exceptions. In essence, if the ball does not have an owner, I do not want the ball object created....
9
2647
by: aliensite | last post by:
Can I have an array of objects without numbering? I have an array I frequently edit, and its a pain to renumber the entire array if I insert an object in between existing objects. // define...
16
2415
by: StenKoll | last post by:
Help needed in order to create a register of stocks in a company. In accordance with local laws I need to give each individual share a number. I have accomplished this by establishing three tables...
4
15053
by: Ashok | last post by:
Hello I need to programmatically change the permissions (ACL) on a specific registry key in a .NET app. Is there a way to do this in .NET? Thanks for the help, Ashok
0
1519
by: Manning | last post by:
Hi - apologies for asking a stupid newbie question but I'm a bit out of my depth here and could really use some help. I've got an ASP module which can't find a table because the table owner is...
2
6508
by: Francisco Reyes | last post by:
Is there a way to change a schema owner other than dump/restore? How about changing the nspowner in pg_namespace? Will that do the trick without any negative consecuences? ...
28
2089
by: ensemble | last post by:
I'm trying to utilized a more object-oriented approach to managing window events in javascript. Thus, I am creating a "controller" object to handle events and interact with the server. However, I...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7004
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
7208
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
7379
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...
1
4915
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...
0
3095
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...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
657
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
292
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.