473,231 Members | 1,902 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,231 software developers and data experts.

SQL Server 7 vs 2000 question

This may be a simple question to answer, but I don't have a clue since I'm
not a dba.

I am using sql server 2000, while a client of ours is using sql server 7.
Both using Windows 2000 as an OS, but I don't think that means anything
here.

My question is, why does he have to specify the dbowner in his query
statements, while I don't? Is this a setting somewhere in Enterprise
Manager?

For example, I can simply use the query "select * from tablename" while he
must use something like "select * from sa.tablename".

Any help would be appreciated.

Thanks,
Frank
Jul 20 '05 #1
2 5438
This is unlikely to be related to the version. MSSQL allows multiple objects
to have the same name, but different owners. When you create an object, you
can either specify the owner name explicitly, or leave it blank:

CREATE TABLE MyTable
CREATE TABLE dbo.MyTable
CREATE TABLE MyAccount.MyTable

If you are a member of sysadmin, db_owner or db_ddladmin, you can create an
object using someone else's user name. If you don't give a username, then
the object will always be owned by your username, or by dbo if you are in
the sysadmin role. When you reference it later in code, you can do the same:

SELECT * FROM MyTable
SELECT * FROM dbo.MyTable
SELECT * FROM MyAccount.MyTable

If you don't specify a user name, MSSQL looks for an object owned by your
user account. If there is none, it then looks for one owned by dbo. See
"Object Visibility and Qualification Rules" in BOL for examples.

In your scenario, it's not clear who has which permissions, but I guess your
client has created objects owned by sa, and is referencing them explicitly.
You may be accessing your own objects (MyAccount.Table), or dbo-owned
objects (dbo.Table), depending on who created them and what permissions you
have.

Simon

"Maze" <fl*****@configsc.com> wrote in message
news:bd***********@msunews.cl.msu.edu...
This may be a simple question to answer, but I don't have a clue since I'm
not a dba.

I am using sql server 2000, while a client of ours is using sql server 7.
Both using Windows 2000 as an OS, but I don't think that means anything
here.

My question is, why does he have to specify the dbowner in his query
statements, while I don't? Is this a setting somewhere in Enterprise
Manager?

For example, I can simply use the query "select * from tablename" while he
must use something like "select * from sa.tablename".

Any help would be appreciated.

Thanks,
Frank

Jul 20 '05 #2
Thank you Simon, very helpful....

Frank

"Simon Hayes" <sq*@hayes.ch> wrote in message
news:3e********@news.bluewin.ch...
This is unlikely to be related to the version. MSSQL allows multiple objects to have the same name, but different owners. When you create an object, you can either specify the owner name explicitly, or leave it blank:

CREATE TABLE MyTable
CREATE TABLE dbo.MyTable
CREATE TABLE MyAccount.MyTable

If you are a member of sysadmin, db_owner or db_ddladmin, you can create an object using someone else's user name. If you don't give a username, then
the object will always be owned by your username, or by dbo if you are in
the sysadmin role. When you reference it later in code, you can do the same:
SELECT * FROM MyTable
SELECT * FROM dbo.MyTable
SELECT * FROM MyAccount.MyTable

If you don't specify a user name, MSSQL looks for an object owned by your
user account. If there is none, it then looks for one owned by dbo. See
"Object Visibility and Qualification Rules" in BOL for examples.

In your scenario, it's not clear who has which permissions, but I guess your client has created objects owned by sa, and is referencing them explicitly. You may be accessing your own objects (MyAccount.Table), or dbo-owned
objects (dbo.Table), depending on who created them and what permissions you have.

Simon

"Maze" <fl*****@configsc.com> wrote in message
news:bd***********@msunews.cl.msu.edu...
This may be a simple question to answer, but I don't have a clue since I'm not a dba.

I am using sql server 2000, while a client of ours is using sql server 7. Both using Windows 2000 as an OS, but I don't think that means anything
here.

My question is, why does he have to specify the dbowner in his query
statements, while I don't? Is this a setting somewhere in Enterprise
Manager?

For example, I can simply use the query "select * from tablename" while he must use something like "select * from sa.tablename".

Any help would be appreciated.

Thanks,
Frank


Jul 20 '05 #3

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

Similar topics

8
by: Brad Tilley | last post by:
Does Python run on Windows Server 2003? http://www.python.org/download/download_windows.html only lists the following: Python for Windows 95, 98, NT, 2000, ME, XP
4
by: turnstyle | last post by:
Hey all, sorry for asking such a grunt question, and thanks in advance for any help... My hosting ISP offers access to their MS-SQL database, and my understanding is that it's generally simplest...
2
by: lcifers | last post by:
First off, sorry if my cross posting offends anyone. I'm posting this in Access and SQL Server groups - not sure which one is appropriate. I have a relatively simple ASP.NET/VB.NET application...
5
by: Ken Cox [Microsoft MVP] | last post by:
MS has posted this here: http://www.asp.net/faq/ms03-32-issue.aspx Fix for: 'Server Application Unavailable' Error after Applying Security Update for IE...
22
by: EP | last post by:
When running my asp.net hosting service (asp.net without IIS), on server 2003 with IIS not installed, I get the following when trying to process a request. "System.DllNotFoundException: Unable to...
3
by: datapro01 | last post by:
I am a DB2 DBA that has been asked to become familiar enough with SQL Server in order to become actively involved in its installation, implementation, and to review database backup/recovery...
14
by: Developer | last post by:
Hello All, i have recently installed VS2005 and was trying to install SQL sever 2000. I have Win XP' SP2. But when I tried installing, it only installed client tools and not the database. Can...
8
by: rbg | last post by:
I did use query plans to find out more. ( Please see the thread BELOW) I have a question on this, if someone can help me with that it will be great. In my SQL query that selects data from table,...
12
by: Light | last post by:
Hi all, I posted this question in the sqlserver.newusers group but I am not getting any response there so I am going to try it on the fine folks here:). I inherited some legacy ASP codes in my...
10
by: Scott M. | last post by:
I've seen many posts and ready articles discussing how changing the membership & roles "provider" in VS .NET is easy, but have yet to see instructions on how to do it. If I already have SQL...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.