Re: Thanks Re: Query Analyser Owner, table access



Just a lucky guess :-).
I'm glad you sorted it out.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/


"Jim Bunton" <jBunton@xxxxxxxxxxxxxxxx> wrote in message news:OSO4f.135780$RW.86495@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for the reply Tibor - of course - I clicked ALL the roles "to make
sure I had all accesses!!"

Well I feel like a fool but you look like a real WIZ

thanks again

"Tibor Karaszi" <tibor_please.no.email_karaszi@xxxxxxxxxxxxxxxxxx> wrote in
message news:O8ts5iy0FHA.3756@xxxxxxxxxxxxxxxxxxxxxxx
Perhaps Jim is in the db_denydatareader role?

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/


"Jim Bunton" <jBunton@xxxxxxxxxxxxxxxx> wrote in message news:CmO4f.135772$RW.6675@xxxxxxxxxxxxxxxxxxxxxxxxxxxx

SQL SERVER 2000 Personal Edition
Win 2000

Connect using SqlServer Authentification
Jim **pw**

Run the following to create a new table:-
--------------------------
USE SolutionsNet
GO
CREATE TABLE
  Companies
  (CompanyId INT PRIMARY KEY IDENTITY(1,1),
   Companyname VarChar(50) NOT NULL,
   IsaRestaurant BIT,
   . . . . .
  )
GO
--------------------------

Then the following:-
--------------------------
Use SolutionsNet
GO
SELECT * FROM Companies
REM OR select * from jim.Companies
GO
--------------------------
Server: Msg 229, Level 14, State 5, Line 1
SELECT permission denied on object 'Companies', database 'SolutionsNet',
owner 'Jim'.

BUT connect as sa **pw** -------------------------- USE SolutionsNet GO SELECT * FROM Jim.Companies GO -------------------------- Displays the empty table Ok

[NB. just Companies without tyhe prefix Jim. does not display the empty
table
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'Companies'. ]

????
Why can I not access the table connected as Jim - it's owner !!!
???



Jim Bunton




.



Relevant Pages

  • Re: executing querys from a batch file
    ... Mike Epprecht, Microsoft SQL Server MVP ... Blog: http://www.msmvps.com/epprecht/ ... >>>Can I execute a query to sql server from a bat file? ...
    (comp.databases.ms-sqlserver)
  • Re: executing querys from a batch file
    ... Mike Epprecht, Microsoft SQL Server MVP ... Blog: http://www.msmvps.com/epprecht/ ... >>>Can I execute a query to sql server from a bat file? ...
    (comp.databases.ms-sqlserver)
  • Re: Question about SQL Server 2005
    ... >> Mike Epprecht, Microsoft SQL Server MVP ... >> MVP Program: http://www.microsoft.com/mvp ... >> Blog: http://www.msmvps.com/epprecht/ ...
    (microsoft.public.sqlserver.setup)
  • Re: SQl server processors and threads
    ... Mike Epprecht, Microsoft SQL Server MVP ... Blog: http://www.msmvps.com/epprecht/ ... > to the threads running and the priority is w.r.t. what? ...
    (comp.databases.ms-sqlserver)
  • Re: Return Key (identity) on INSERT operation (SQL/ASP)
    ... hopefully he can expedite processing your full subscription. ... SQL Server MVP ... Columnist, SQL Server Professional ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.general)