[CDBI] I need to specify the db owner as dbo..table_name

Bradley C Bailey class-dbi at brad.memoryleak.org
Fri Feb 15 03:58:17 GMT 2008


I haven't tried it, but what about something like this in your class:

__PACKAGE__->set_up_table("table_name");
__PACKAGE__->table('owner..' . __PACKAGE__->table)

That'll call sp_columns with the table name, and then after that is done 
it will reset the table name to include the owner.

Regards,
Bradley C Bailey


> I thought of that, but hadn't tried it.  When I did, it worked in
> general, a in it did pass the entire string right through to the db.
> That was cool.
> 
> Unfortunately, sp_columns which is called by cdbi::Sybase can't handle
> that.  We could move away from the Sybase automatic setup stuff, but
> we're not at this point.
> 
> We're thinking it may be something else at this point, however.
> 
> In an case, now we know.
> 
> Thanks, Michael.
> 
> Eric
> 
> -----Original Message-----
> From: Michael G Schwern [mailto:schwern at pobox.com] 
> Sent: Thursday, February 14, 2008 5:23 PM
> To: Berg, Eric
> Cc: classdbi at svr02.digitalcraftsmen.net
> Subject: Re: [CDBI] I need to specify the db owner as dbo..table_name
> 
> Berg, Eric wrote:
>> I'm having some issues with queries against a Sybase cluster, and am 
>> told by my DBAs that I need to specify not only the table name, but 
>> the owner using the folloiwing syntax:
>>
>>    owner..table_name
>>
>> Is this possible? 
> 
> Try it?
> 
> 	Some::Table->table('owner..table_name');
> 
> CDBI doesn't do much with the table name other than stick it into the
> query so it should work.
> 
> 





More information about the ClassDBI mailing list