Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
support oci8 privilege.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
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:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Colin Jack  
View profile  
 More options Dec 17 2008, 9:29 pm
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Raimonds Simanovskis  
View profile  
 More options Dec 18 2008, 3:40 am
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Colin Jack  
View profile  
 More options Dec 19 2008, 7:01 pm
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Raimonds Simanovskis  
View profile  
 More options Dec 20 2008, 3:50 am
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Colin J  
View profile  
 More options Dec 20 2008, 7:59 am
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>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »