OCI8 - dedicated or shared connection

Does anyone know what type of connection is created through ruby-OCI8 using database.yml? Is it a dedicated or shared connection?
Thanks,
James

I think it's a shared connection.
In rails/activerecord/lib/active_record/base.rb, it says:
Connections are usually created through ActiveRecord::Base.establish_connection and retrieved by ActiveRecord::Base.connection. All classes inheriting from ActiveRecord::Base will use this connection. But you can also set a class-specific connection. For example, if Course is a ActiveRecord::Base, but resides in a different database you can just say Course.establish_connection and Course and all its subclasses will use this connection instead.
This feature is implemented by keeping a connection pool in ActiveRecord::Base that is a Hash indexed by the class. If a connection is requested, the retrieve_connection method will go up the class-hierarchy until a connection is found in the connection pool.

Similar Messages

  • Dedicated or shared connections with tomcat?

    Tomcat does it's own connection pooling. That being the case, should I use dedicated or shared connections in Oracle? If Tomcat can properly maintain a small number of dedicated connections, then I'd prefer to avoid the setup/teardown overhead of using shared connections. I'm not sure if Tomcat (5.5.17) will operate properly in this regard or not, though. Does anyone have any experience with this?

    Using shared server or dedicated server is just a matter of which kind of applications you are planning to use. Shared server architecture is meant as a resource saver, considering the OLTP applications spend most of the CPU and network time idle. There is no reason to allocate private and exclusive resources to a connection. On the other hand, dedicated connections are meant for batch and reporting (Full Table Scans) operation, which are mostly found on DDS and DWH systems.
    If you use shared servers (no matter the client) and the application starts to behave in a DDS fashion, you will find Oracle Server will have to dispatch more processes to perform the operation, causing a raise in the High Water Mark resource usage.
    Shared servers is a more complex architecture than the dedicated server, for a few number of connections it is not worth to use it. But in the long run you'll find a meaningful memory and cpu consumption reduction, which is the main goal of this connection mode.
    ~ Madrid

  • SAP Database is in dedicated or shared

    Hi Gurus
    I have a doubt. Our SAP Database is working on dedicated or shared mode. when i was passing thro some oracle documents i have read as per tnsnames.ora file we could come to know whether the dedicated or shared mode. I have checked our SAP systems in one of the SAP system which has seperate database server and two other separate application servers which does not show the connect_data as dedicated but as (SID=%sid%) but in another SAP suystem where it is stanalone system which shows dedicated mode in connect_data parameter in tnsnames.ora file.
    i want to know the basic mode our SAP works in dedicated mode or shared mode. if it is dedicated mode in what all circumstances it will be decided or if it shared mode then what are all the conditions are set for shared
    Pls help
    regards
    bala

    Hello Bala,
    > i want to know the basic mode our SAP works in dedicated mode or shared mode.
    Just query the view V$SESSION (http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2088.htm#i1414383)
    > SQL> SELECT SID, SERVER FROM V$SESSION;
    Here is a really nice explanation about dedicated and shared connections:
    /message/2114775#2114775 [original link is broken]
    Please read this, because i think you don't understand the concept about dedicated/shared .. it is just a "connect option" not really a mode in that the oracle server is running.
    Regards
    Stefan

  • Dedicated/Shared connections

    Hello friends I have a quick question about shared connections. I have a listener setup for a database with everything set to specifically use dedicated connections, yet I see some shared connections on the database. I would like to know how I can go about finding why/what is making these connections and should be they be there?
    Thanks
    Luke

    Unfortunately you don't mention your database version (always a good idea to do this). Check your pfile/spfile for parameter 'dispatchers', I assume there are default settings for XDB. If you don't need these services, comment it out.
    Werner

  • SAP db upgrade to Oracle 10G 64 bit - Dedicated or Shared Server ?

    We current run 32bit servers ( approx 150 users ) and plan to migrate to ECC 6.0 on 64bit bit server. Question about upgrade <br>from Oracle 9.2.0.8 32bit to 10.2.0.4 64 bit . Database upgrade Oracle 64 bit should be Dedicated or Shared Server? <br><br>
    My understanding ( limited), is Oracle 64bit dedicated server connection has the dedicated resource so whether or not a user is<br> doing work the connection remains allocated to that user. So for example, in our case a small Windows "shop" will needs <br>around 2MB of kernel space. So 150 threads, for 150 dedicated server connections, approx 150 x 2MB RAM.  Correct ? <br><br>
    Whereas Shared server the user connection is shared, that is user is connecting by dispatchers and when a user is idle his <br>resource can be used by other users, thus lessen the load on system. So in this case maybe 5 dispatcher processes and <br>30 shared server processes to service the 150 sessions of the 150 users which seems very effective to me . <br>My main concern however is with some of the Finance people who get problems with huge COPA and SIS reports now which is <br>why we are moving to 64bit OS/DB/SAP<br><br>
    Question is which does SAP ECC 6.0 support ( or recommend ) Oracle 64 bit Dedicated or Shared Server db migration ?

    > Question is which does SAP ECC 6.0 support ( or recommend ) Oracle 64 bit Dedicated or Shared Server db migration ?
    Never heard that anyone uses shared Server Setup with SAP.
    With SAP, it is NOT the user having a DB connection.
    It is the workprocess, and it is keeping it even if all users are idle.
    You allways have dedicated Oracle processes for SAP Workprocesses.
    The rather old note 70197 states, that Oracle MTS (multi threaded server)
    allowed, but you are on your own to configure it and there are some pitfalls.
    Volker

  • Dedicated vs Shared Question

    I am trying to understand if my DB is running dedicated or shared. I have read several posts here but some of the information is contradicting each other on my server. This is my analysis so far and it leads me to believe that I am running in dedicated server mode but I would love some help to better understand if I am right. Thanks in advance for your help!
    1. We have a dispatcher but you always get on when you create a DB with DBCA and this does not mean the DB runs in shared.
    SQL> show parameter dispatcher
    NAME TYPE
    VALUE
    dispatchers string
    (PROTOCOL=TCP)
    max_dispatchers integer
    2. Large_poole_size is 0 and I think if the DB is shared then it will use the large pool, otherwise use the shared pool.
    SQL> show parameter large_pool
    NAME TYPE
    VALUE
    large_pool_size big integer
    0
    3. If shared_servers is greater than 1 then the server is shared but ours is set to 1.
    SQL> show parameter SHARED_SERVERS
    NAME TYPE
    VALUE
    max_shared_servers integer
    shared_servers integer
    1
    4. The tnsnames.ora file has SERVER=DEDICATED which means the DB will NOT be shared regardless of above.
    5. ps -ef|grep $ORACLE_SID|grep d000 shows a dispatcher but I think this is just the default one.
    oracle 4456 1 0 Mar17 ? 00:00:55 ora_d000_ENGTREQ1

    995322 wrote:
    Alright so my senior said that when our java developers connect through the database using JDBC and don't put SERVER=DEDICATED on the HTML string it ignores tnsnames.ora and automatically creates a shared connection. Your senior is wrong and there's more to it than that. Didn't take me long to put together a proof, even though I've never worked directly with setting up jdbc connections. For this test I created a connection in SQL Developer using jdbc thin. The "connection string" (url) looks like this:
    jdbc:oracle:thin:@vblnxsrv01:1521/orclNo specification of shared or dedicated.
    listener shows
    Services Summary...
    Service "+ASM" has 1 instance(s).
      Instance "+ASM", status READY, has 1 handler(s) for this service...
    Service "orcl" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfullythe orclXDB is associated with the dispatchers.
    Behold. Costello is using the jdbc connection from SQL Developer.
      1  select username, program, server
      2  from v$session
      3* where username in ('ABBOT','COSTELLO')
    SQL> /
    USERNAME   PROGRAM                                          SERVER
    ABBOT      sqlplus.exe                                      DEDICATED
    COSTELLO   SQL Developer                                    DEDICATEDBut if I change the connection definition properties to
    jdbc:oracle:thin:@vblnxsrv01:1521/orclXDBwe get
      1  select username, program, server
      2  from v$session
      3* where username in ('ABBOT','COSTELLO')
    SQL> /
    USERNAME   PROGRAM                                          SERVER
    ABBOT      sqlplus.exe                                      DEDICATED
    COSTELLO   SQL Developer                                    NONE
    We had a problem where SERVER=DEDICATED was left off and their queries were mysteriously taking random 4 seconds to complete and when they added SERVER=DEDICATED the wait went away.....this confuses me because it looks like the DB is not setup to use shared at all.

  • Dedicated or Shared Sessions?

    I have a 10g SE1 + ASM running in Windows 2003 ES with 4GB RAM with /3GB switch and 7TB JBOD storage. Our custom data mining applications access this database from a grid of 15 servers. Application architecture uses a mixture of hibernate, roll-your-own connection pooling in Java, and daemons with dedicated sessions. In all, we typically have 200 sessions but only 3 to 9 are active at any given moment. Individual queries and transactions range from sub-second to 3 hours in duration.
    I’ve run the system with MTS and in dedicated server mode; it runs either way. I have never tried tweaking multiple shared_servers, dispatchers or circuits.
    Right now it seems to run fine with 200 dedicated sessions, but it does gobble up a lot of unused PGA memory for the inactive sessions.
    In our situation, what is the best configuration, MTS, or shared, or dedicated, and why?

    Mark, I think that physically a shared server process is no different than a dedicated server process in Oracle on Windows - both are threads in the oracle.exe process image.
    The only real difference is that one deals directly with the client, and the other with a virtual circuit.
    This then raises the question about the PGA and UGA. As the thread runs in the oracle.exe space, it has direct access to, and uses, the data segment (DS) of oracle. The PGA is likely a dynamic memory allocation - so too the UGA for a dedicated thread, while a shared thread will use the SGA instead (for the UGA).
    Now assuming that my speculation is not far of, there are very little overheads between dedicated and shared server threads on Oracle in Windows - except for the dedicated servers being more and thus more PGAs given the nature of these threads versus shared server threads.
    This is unlike Unix where there is a large physical difference as each process (dedicated or shared) has data segment and code segment. The resource footprint for a process is a lot bigger.
    A concern of mine... Windows is excellent at running threads.. it really strains running lots of physical processes (unlike Unix/Linux). But as threads share the same code and data segments, a single thread running into a severe bug can potentially corrupt the entire physical process image, crashing all other threads in it. At least, this has been my experience doing Windows server development.
    Would be nice to read a technical paper on just how Oracle implements their shared and dedicated server models on the Win32 API.

  • Personal File Sharing Connection Timing Out

    I'm having trouble personal file sharing connecting to one computer in my office. All the others work just fine and I can retrieve files and all. Oddly the computer that I can't read can connect to me.
    When I try and connect, I go to the Network, I can see her computer, I double click it and get the following message:
    Contacting xx.xx.xx.xx
    Timeout in 120 seconds
    And then it counts down the seconds and eventually nothing happens. I went into her System settings and checked and everything (that I know to check) is on and the IP address is the same one that is showing in my dialog box.
    Any ideas?

    Several restarts later and it is still doing it. I can connect to others, but this one machine doesn't want to go. Anybody?

  • How to Delete Smartview In Excel Advanced Option Shared Connections URLs

    I searched every forum and every blog for an answer to what I believe is a very simple fix but just havn't find an answer to.
    How do I clear all the old stored Shared Connection URL's in Excel -> Smartview Option -> Advanced -> Shared Connections Drop-Box in Version 11.1.2 ?
    Thank you in advance for your time and reply.

    Please check the image from this link
    http://www.google.com/imgres?q=smartview+advance+option+in+excel&num=10&hl=en&biw=1120&bih=694&tbm=isch&tbnid=coGQG8eoKxEPIM:&imgrefurl=http://appliedbi.blogspot.com/2011/09/smart-view-11121-and-intricacies.html&docid=vcWxoZD3eiXntM&imgurl=http://3.bp.blogspot.com/-LYnum3mQIis/Tmt2HWLX8GI/AAAAAAAACA4/S1kLXtZluQI/s1600/LogFile.png&w=507&h=272&ei=5X5gUKO0Ism2igKC1oDwCQ&zoom=1&iact=hc&vpx=771&vpy=213&dur=1230&hovh=164&hovw=307&tx=246&ty=85&sig=118263283618459905455&page=1&tbnh=114&tbnw=212&start=0&ndsp=15&ved=1t:429,r:4,s:0,i:87
    It is from the top url update connection link in the photo is what I am trying to clear out.
    Thank you

  • How to add another Planning Server to the Shared Connections?

    Hi,
    This is for version 11.1.2.1.103
    Currently all of our users use Planning in Prod environment. I would like to open the UAT environment to a smaller set of users. UAT environment is in our Test environment. I couldn't figure it how to add the UAT environment to the current Prod Shared Connections. I was hoping it would be as easy as right click on the Prod Planning Server > click on Add > Add the UAT server > Click OK.
    Instead I had to follow couple of steps to add the UAT environment to the SV:
    1. SmartView > Options > Advanced > Edit Shared Connections URL with UAT environment URL > Click OK
    2. Connect to Shared Connections > Planning
    3. Right click on the Plan Type > Click on Add to Private Connections
    4. Follow the same steps for the PROD Plan Type.
    Now, I do have two environments under Private Connections and I do not need to follow the first step every time I want to switch between environments.
    Was it a overkill or I did it right?
    Thanks,
    Mehmet
    p.s. I just noticed that in Shared Connections, you can add another Essbase Server, but that's not an option for Planning.
    Edited by: Mehmet Sevinc on May 8, 2012 2:48 PM

    Hi Again,
    following up my previous comment on this, you can create a macro and assign to an event or macro in the excel to change shared connection URL.
    Declare Function HypSetSharedConnectionsURL Lib "HsAddin" (ByVal vtAPSURL As Variant) As Long
    Sub SubHypSetSharedConnectionsURLTest()
    Dim lRet As Long
    lRet = HypSetSharedConnectionsURL("http://UATserver:19000/workspace/SmartViewProviders")
    End Sub
    http://docs.oracle.com/cd/E17236_01/epm.1112/sv_user/ch17s01s08s10.html
    Hope this helps,
    Ahmet

  • Smartview Shared Connections 11.1.2.2

    We have upgraded to 11.1.2.2 from 11.1.1.3 and the shared connection doesn't display essbase servers alone. It displays R&A framework and Planning but not essbase .
    Couple of diagnostics that I ran :
    1. http://server:port/13080/aps/APS returns hyperion provider services
    2. service are up and running (oracle http server, provider web services and everything related)
    3. added provider services server on EAS too
    4. I have changed the Shared connections url to http://server:port/workspace/SmartViewProviders and it doesn't display the essbase servers alone whereas the planning and R&A seem to be fine. Essbase works fine from private connections.
    5.On workspace , I find the enabled products checked for provider services.
    Has anyone faced this problem ?

    Sometimes all it takes is updating the proper URL. I did that and it worked for me

  • Smart View Shared Connections - Oracle Essbase - How is list derived?

    Testing out the new build of Smart view 11.1.2.2.310 on Office Excel 2010.  In Shared connections I show three Essbase servers
    EssbaseCluster-1
    EssbaseCluster-2
    EssbaseCluster-3
    Via EAS there is only EssbaseCluster-3.  What file or lookup is Shared Connections pointing to for 1 and 2?  If I try to open them they give a 'cannot connect to Essbase server' error.
    How can I remove these?  Right-click delete option not available...
    JTS

    It is usually being picked up from the Shared Services Registry, if you run a registry report do you have 3 clusters?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to know Dedicated or Shared ...

    Hi there,
    I want to know what is the default architecture (dedicated or shared) when a database is created thru Installtion or Creation Wizard and how we can verify from the database? And also I wanna know how we can manually configure a database to dedicated or shared architecture? Can anybody help me in this regard?
    Thanks in advance.
    Regards,
    Aqueel.

    I want to know what is the default architecture (dedicated or shared) when a database is created thru Installtion or Creation Wizard ?
    r.- The installer is going to request from you the option but the default is dedicated
    we can verify from the database?
    lsnrctl services
    It is one of the method to realize if the database is in shared or dedicated way.
    another can be checking the parameters.
    Depending if you are working in 8i or 9i the parameters
    are different for a Shared Server(9i) or Multi-Thread Server(8i)
    parameters in 8i for a dedicated Server:
    mts_dispatchers = "(protocol=TCP)(disp=15)(con=25)"
    mts_max_dispatchers = 20
    mts_servers = 12
    mts_max_servers = 18
    I wanna know how we can manually configure a database to dedicated or shared architecture ?
    The parameters to set the kind of mode is going to depend of what release you are using.
    What release you are using, 8i or 9i ?
    Joel P�rez

  • Change SmartView 11.1.2 shared connections default names?

    Is there any way to change the descriptions of the available shared connections descriptions? i.e. if I add a new Planning server connection to my shared connections list it appears in the list as "HP-11.1.2 - Oracle Hyperion Planning, Fusion Edition". I'd like to change it to something more meaningful.
    thx

    From the SV user guide - You cannot add, edit, or rename shared connections, but you save them as private connections, which you can edit and rename.
    HTH-
    Jasmine.

  • Smartview lost shared connection

    We are using smartview 11.1.2.1.
    All of a sudden, our shared connections list is empty when we connect.
    We had similar problems for a while in 11.1.2.0. But somehow,we got it working.
    Running the following url:
    http://<servername>:19000/workspace/debug/listApps.jsp
    brings up this message:
    Logical Web Applications and their Products:
    No Logical Web Applications available in the Registry!
    Re configuring logical web apps and redeploying doesn't seem to help at all.
    All other web apps are working fine-workspace, planning etc.
    Does anybody have any suggestions?
    Thanks.
    Edited by: 784749 on Nov 7, 2011 8:15 AM

    KVC wrote:
    i thinks IIS is missing try to installing that ..it may helpSorry what it got to do with IIS
    You could try running the configurator again and choosing Foundation > Configure Logical Addresses for Web Applications or Configure Web Server
    Cheers
    John
    http://john-goodwin.blogspot.com/

Maybe you are looking for