The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
Colin Jack <jichen3... @gmail.com>
Date: Wed, 17 Dec 2008 18:29:37 -0800 (PST)
Local: Wed, Dec 17 2008 9:29 pm
Subject: support oci8 privilege.
hello everybody, I'm bad in english.
oci8 support privilege, that can connect oracle as sysdba.
But Oracle enhanced adapter not surpport.
I hope Oracle enhanced adapter can surpport it too. Thank you.
Actually, supportion is simple.
first in class OCI8EnhancedAutoRecover
def initialize(config, factory =
OracleEnhancedConnectionFactory.new)
@active = true
@username, @password, @database, = config[:username].to_s, config
[:password].to_s, config[:database].to_s
@async = config[:allow_concurrency]
@prefetch_rows = config[:prefetch_rows] || 100
@cursor_sharing = config[:cursor_sharing] || 'similar'
@factory = factory
@privilege = config[:privilege] # add
@connection = @factory.new_connection @username, @password,
@database, @async, @prefetch_rows, @cursor_sharing, @privilege #
add
super @connection
end
second in class OracleEnhancedConnectionFactory
def new_connection(username, password, database, async,
prefetch_rows, cursor_sharing, privilege) #add
conn = OCI8.new username, password, database, privilege #add
conn.exec %q{alter session set nls_date_format = 'YYYY-MM-DD
HH24:MI:SS'}
conn.exec %q{alter session set nls_timestamp_format = 'YYYY-MM-
DD HH24:MI:SS'} rescue nil
conn.autocommit = true
conn.non_blocking = true if async
conn.prefetch_rows = prefetch_rows
conn.exec "alter session set cursor_sharing = #{cursor_sharing}"
rescue nil
conn
end
last in class OCI8EnhancedAutoRecover
def reset!
logoff rescue nil
begin
@connection = @factory.new_connection @username, @password,
@database, @async, @prefetch_rows, @cursor_sharing, @privilege #add
__setobj__ @connection
@active = true
rescue
@active = false
raise
end
end
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Raimonds Simanovskis <raimonds.simanovs... @gmail.com>
Date: Thu, 18 Dec 2008 00:40:14 -0800 (PST)
Local: Thurs, Dec 18 2008 3:40 am
Subject: Re: support oci8 privilege.
I am just wondering why you need connect to Oracle as SYSDBA in Rails
application?
I think that you need SYSDBA privilege just for administration tasks
and it should not be used when running applications.
Raimonds
On Dec 18, 4:29 am, Colin Jack <jichen3... @gmail.com> wrote:
> hello everybody, I'm bad in english.
> oci8 support privilege, that can connect oracle as sysdba.
> But Oracle enhanced adapter not surpport.
> I hope Oracle enhanced adapter can surpport it too. Thank you.
> Actually, supportion is simple.
> first in class OCI8EnhancedAutoRecover
> def initialize(config, factory =
> OracleEnhancedConnectionFactory.new)
> @active = true
> @username, @password, @database, = config[:username].to_s, config
> [:password].to_s, config[:database].to_s
> @async = config[:allow_concurrency]
> @prefetch_rows = config[:prefetch_rows] || 100
> @cursor_sharing = config[:cursor_sharing] || 'similar'
> @factory = factory
> @privilege = config[:privilege] # add
> @connection = @factory.new_connection @username, @password,
> @database, @async, @prefetch_rows, @cursor_sharing, @privilege #
> add
> super @connection
> end
> second in class OracleEnhancedConnectionFactory
> def new_connection(username, password, database, async,
> prefetch_rows, cursor_sharing, privilege) #add
> conn = OCI8.new username, password, database, privilege #add
> conn.exec %q{alter session set nls_date_format = 'YYYY-MM-DD
> HH24:MI:SS'}
> conn.exec %q{alter session set nls_timestamp_format = 'YYYY-MM-
> DD HH24:MI:SS'} rescue nil
> conn.autocommit = true
> conn.non_blocking = true if async
> conn.prefetch_rows = prefetch_rows
> conn.exec "alter session set cursor_sharing = #{cursor_sharing}"
> rescue nil
> conn
> end
> last in class OCI8EnhancedAutoRecover
> def reset!
> logoff rescue nil
> begin
> @connection = @factory.new_connection @username, @password,
> @database, @async, @prefetch_rows, @cursor_sharing, @privilege #add
> __setobj__ @connection
> @active = true
> rescue
> @active = false
> raise
> end
> end
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Colin Jack <jichen3... @gmail.com>
Date: Fri, 19 Dec 2008 16:01:46 -0800 (PST)
Local: Fri, Dec 19 2008 7:01 pm
Subject: Re: support oci8 privilege.
Yes, you right.
I'm not use in rails. I just ues ActiveRecord in my project.
If the Database at standby, do sql must need SYSDBA privilege.
Of course, I can just use oci8, but it's so inconvenient, when I used
to ActiveRecord.
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Raimonds Simanovskis <raimonds.simanovs... @gmail.com>
Date: Sat, 20 Dec 2008 00:50:15 -0800 (PST)
Local: Sat, Dec 20 2008 3:50 am
Subject: Re: support oci8 privilege.
OK, I will add this to feature list and hopefully will include this in
next version of adapter.
Raimonds
On Dec 20, 2:01 am, Colin Jack <jichen3... @gmail.com> wrote:
> Yes, you right.
> I'm not use in rails. I just ues ActiveRecord in my project.
> If the Database at standby, do sql must need SYSDBA privilege.
> Of course, I can just use oci8, but it's so inconvenient, when I used
> to ActiveRecord.
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Colin J" <jichen3... @gmail.com>
Date: Sat, 20 Dec 2008 20:59:41 +0800
Local: Sat, Dec 20 2008 7:59 am
Subject: Re: support oci8 privilege.
Thank you so much, that very help to me.
2008/12/20 Raimonds Simanovskis <raimonds.simanovs... @gmail.com>
> OK, I will add this to feature list and hopefully will include this in
> next version of adapter.
> Raimonds
> On Dec 20, 2:01 am, Colin Jack <jichen3... @gmail.com> wrote:
> > Yes, you right.
> > I'm not use in rails. I just ues ActiveRecord in my project.
> > If the Database at standby, do sql must need SYSDBA privilege.
> > Of course, I can just use oci8, but it's so inconvenient, when I used
> > to ActiveRecord.
You must
Sign in before you can post messages.
You do not have the permission required to post.