467,188 Members | 1,436 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,188 developers. It's quick & easy.

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
  • viewed: 3248
Share:
1 Reply

"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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Manning | last post: by
4 posts views Thread by Zork | last post: by
9 posts views Thread by aliensite | last post: by
4 posts views Thread by Ashok | last post: by
reply views Thread by Manning | last post: by
2 posts views Thread by Francisco Reyes | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.