SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Show Other Owner Objects

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Show Other Owner Objects
Author Message
hcoello



Joined: 05 Feb 2009
Posts: 5
Country: Honduras

Post Show Other Owner Objects Reply with quote
I have on a database 3 owners of objects: dbo, dev, tes.

and when i type the owner i doesn't show me the object that this user contains, only show me dbo objects.

select *
from dev.
Thu Feb 05, 2009 3:55 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Is this SQL 2000, 2005 or 2008? or Sybase database?
Thu Feb 05, 2009 4:40 pm View user's profile Send private message
hcoello



Joined: 05 Feb 2009
Posts: 5
Country: Honduras

Post Reply with quote
Is SQL 2000.
Thu Feb 05, 2009 5:59 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
what do you get when you run the following query? Dp you get your other 2 schemas in the output


select
name collate Latin1_General_CI_AS,
case when issqlrole + isapprole > 0 then 'SR' else 'SC' end,
cast(uid as int)
from
/*db.*/dbo.sysusers
where
issqluser = 1 or isntname = 1
or issqlrole = 1 or isapprole = 1
Thu Feb 05, 2009 8:36 pm View user's profile Send private message
hcoello



Joined: 05 Feb 2009
Posts: 5
Country: Honduras

Post Reply with quote
Yes, it returnme a list of names, and the two profiles are there. but when i use "SELECT * FROM " and type the profile "dev." it does not show the tables that this profile own.

Working around i change the DB Queries for Object with this, basic comment the section asking for SCHEMA_ID, and now it show me, but i feel that there is something wrong because sometimes work nice, but others when i show tables and try to see the fields on the plus sing it doesn't work.

select
name = case when sysusers.name = 'dbo' then sysobjects.name else sysusers.name + '.' + sysobjects.name end,
xtype,
id
from
dbo.sysobjects sysobjects JOIN dbo.sysusers sysusers on sysusers.uid = sysobjects.uid where
sysobjects.xtype in ('U','S','V','P','X','RF','FN','TF','IF','SN','PC','FT','FS')
--and (
-- sysobjects.uid = :SCHEMA_ID
-- or (user_name() = 'dbo' and sysobjects.uid = 4 and id between -299 and -101 and sysobjects.name like 'sys%')
-- )
and not (sysobjects.name = 'dtproperties') and not (sysobjects.name like 'dt%' and sysobjects.xtype = 'P')
Fri Feb 06, 2009 11:10 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
This changed query is not valid.


Please try to restore pre-defined queries, check your login privileges (the one you use with SQL Assistant) and figure out why the Schema query doesn't return all schema names, and/or why for it returns, you cannot see object names when you expand that schema using the [+] sign. The next step is to compare uid returned for these schemas and whether they match uid in the sysobjects table. Please let us know what you find out.
Fri Feb 06, 2009 12:32 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.