Writing SQL at backend Vs writing in middle/front end layer

Dear all,
Are their any performance differences if we write the simple sql queries at backend Vs front end/middf for populating the list boxes? e.g. select department code, department name from department
Regards,
Vinay

All things being equal (i.e. the same query etc), then the query that runs "inside" the database should be a "bit" faster (obviously the definition of "bit" will vary depending on what the query actually does).
I'd also say that keeping code like that inside the database means that it's more maintainable and could well perform a lot better due to making better use of bind variables (i.e. one central place for that query versus X different app servers calling the query in different ways).
It also means that if you decide to move from using product X to product Y to rewrite your front end/middle tier then you don't have to rewrite all of the SQL again (since it's inside the database, where it should be).
Hope this helps.

Similar Messages

  • Could you tell me if it would be supported to pair a two node enterprise edition front end pool inc mirror sql with a one node enterprise edition front end pool inc single sql?

    Hi all,
    Could anyone tell me if it would be supported to pair a two node enterprise edition front end pool inc mirror sql with a one node enterprise edition front end pool inc single sql?
    MUCH THANKS.

    The answer from TechNet found at http://technet.microsoft.com/en-us/library/jj204697.aspx Is, and I quote:-
    Enterprise Edition pools can be paired only with other Enterprise Edition pools. Similarly, Standard Edition pools can be paired only with other Standard Edition pools.
    Also, "Neither Topology Builder nor topology validation will prohibit pairing two pools in a way that does not follow
    these recommendations. For example, Topology Builder allows you to pair an Enterprise Edition pool with a Standard Edition pool.
    However, these types of pairings are not supported."
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"

  • SQL Server 2005 replaced with SQL Server 2014 trying to connect front end Access as guest (read only ODBC)

    We have replaced a SQL Server 2005 with a SQL Server 2014 (new physical server.)  Have the new server set up to use SQL Server login OR Windows user login. Had old server connecting (for a particular DB) to front end Access (2010 or 2013) as guest for
    anyone logged into the Windows NT Network with a read only ODBC connection. Have the DB in the new server set to include guest as db_datareader (with only SELECT permission for the securables of each table and view being linked) but when any Windows user not
    specifically listed as a SQL DB user tries to use the front end they get an error of:
    Microsoft SQL Server Login
    Connection failed:
    SQL State: '28000'
    SQL Server Error: 18456
    [Microsoft][OCBC SQL Server Driver][SQL Server] Login failed for user {domain\user}.
    After closing that pop-up window a server login window appears. Of course, since the guest user is not specifically listed as a user in the DB that fails also. It seems like there should be a very simple solution to this, but I can't seem to find it. I want
    to allow anyone logged in on the Windows system (locally) to be able to open the MS Access file (on their work station machine) and run their own (read only; select) queries on the SQL Server database. Any suggestions?
    Thanks a billion in advance ----

    Thanks for the response Olaf. I have now spent weeks researching this. I realize that using the guest account in most situations is not advised. As mentioned, I have restricted the guest account to allow the db_datareader role only, and have explicitly denied
    all other roles, as well as allowing select only, and still have no access for the guest account.
    The suggested fix in the second link you provided, of using Windows groups is not plausible for my situation either. We are a scientific field research institution, with a few long term users and lots of users that may have Windows accounts for a few months,
    and then they are gone. It would be a nightmare for the network tech to try to keep a group account up to date, and we need to give access (read only, of course) to anyone logged into the system. Realize that the ONLY access of any kind to this database is
    thru MS Access ACCDB, using a (by default) read only OCDB connection.
    This type of access is used particularly because researchers need to be able to set up their own queries, and the MS Access query interface is particularly convenient for people who are not themselves SQL experts, yet are trying to get some very advanced
    levels of output. Putting the database online is not practical because then we are back to the need for a comprehensive query interface, and just picking up general subsets of the data online (from a basic web page search feature) would be out of the question,
    since the result set would involve hundreds of thousands if not millions of records.
    So - that said - what exactly would you suggest, assuming we don't have the funds to buy a whole new system, and have spent plenty of money with Microsoft's Enterprise level MS Office so that all work stations have MS Access, and Microsoft's SQL Server,
    as well as running our network on Microsoft's network software.

  • I can view the data in front end form, but data is not avilable in backend

    Hi,
    i created a form with three blocks.In first block i entered the data.Based on the data it will fetch recodrs from A & B tables and insert into C table.This logic i have written in backend and put commit in front end and back end. In the 2nd block iam using C table. i can view the data in front end(C table) . But i unable to
    see the data in C table when i go and see in back end.
    Form is used for only querying purpose. for the C block insert allowed and update allowed is false.
    Plz do the need ful

    Please try and post sufficient information for someone to replicate your problem. We are not looking over your shoulder and do not have access to your database.
    We need a minimum table structure, example data, a walk-through of how the form works - you mention 3 blocks and only half-way describe 1. Is another for the C block? Or is that a different form?
    e.g. Enter search data in Block A. Execute Query. Blocks A and B populated with data from database tables based on FK relationship B to A. User presses Save button, procedure in form updates table C based on data in form and issues commit. Execute Query in Block C retrieves just inserted data in table C.
    Is that remotely what's happening? Or something completely different?

  • To avoid writing database code in the front end

    Hello,
    I am working on a database application using 10g database as backend and dotnet as front end. I wish to execute only oracle stored procedure for all the select (to avoid hard parse and use of bind variable), DDL and DML operations; just to avoid writing database code in the front end. Can anyone please give me a little examples of :
    1.Select query's output to be return as resultset by stored procedure.
    2.DML example by stored procedure.
    3.Any DDL example by stored procedure.
    using scott.emp, so that i would just call the stored procedure, rather than giving select,DML and/or DDL commands in the front end. Even though i have read in the documentation, but a clear cut examples will help me to get into clear concept as well.
    Thanks & Regards
    Girish Sharma

    Hi...
    -->Select example
    create or replace procedure get_emp(rc out sys_refcursor)
    is
    begin
    open rc for select * from emp;
    end;
    -->DML example
    create or replace procedure do_dml_emp(pempid in number,
    pempname varchar2,
    result out number)
    is
    begin
    insert into emp(empid,empname) values(pempid,pempname) returning empid into result;
    exception
    when others then
    result:=-1;
    end;
    -->DDL example
    create or replace procedure ddl_emp(colname varchar2,
    coltype varchar2,
    result out number)
    is
    begin
    result:=-1;
    execute immediate 'alter table emp add column ' || colname || ' ' || coltype ;
    result:=1;
    end;

  • Front end query writing.

    Hi gurus,
       I know about query designer, Bex analyzer, Bex browser and other related topics such as variables, Conditions and exceptions? But i cant understand what's this Front end query writing or Back end data modelling. Will you plz give me detailed description on this topic, how it should be used  in real time scenario.
    Thanks,
    Sameer.

    Hi Sameer
    If I understand ur question correctly
    <b>query designer, Bex analyzer, Bex browser and other related topics such as variables, Conditions and exceptions?</b> all these are for creating queries and used for generating reports. So these come front end side.
    And abt <b>Back end data modelling</b>, it is modelling thing we do in Adminstrator work bench(RSA1) i.e creating infoobjects, datatargets etc.,
    In real time we will get the data from source system and store it in the data targets and infoobjects we modelled in AWB and then we report on this datatargets.
    So this ETL and modelling part becomes back end and Reporting becomes front end.
    I think it's clear for u now
    Any doubts let me know
    Regards
    Kiran

  • Correct Way to use Bind variables when using an MS SQL server backend

    Hey,
    I'm having some trouble figuring out how to use bind variables in a view when using an MS SQL server backend. For some reason when I'm using an ApplicationModule that has a MS SQL Server JDBC library loaded and I attempt to click OK when editing the following query:
    SELECT kit_status, component_id
    FROM numbered_inv
    WHERE trialname = :1
    I get an error stating that "SQL Query Error Message Incorrect Syntax near ':'". Is JDeveloper compatible with SQL server for bind variables because this query runs just fine if I replace the :1 with a say "Testing testing".
    Thanks in advance
    Edited by: NullCheck on Dec 15, 2010 2:06 PM

    Gotcha. I had tried %1% %0% ?0 and ?1 and various other permutations none of which worked. Got it working by setting the query to:
    SELECT kit_status, component_id
    FROM numbered_inv
    WHERE trialname = ?
    ORDER BY kit_status
    And then adding a bind variable with "Bind position" set to 0.
    Thanks again Shay!

  • Named Pipes provider, error:40 could not open a connection to sql server. Only happens on one of the front end SRS servers

    when testing a datasource connection I get the following error.
    Named Pipes provider, error:40 could not open a connection to sql server.
    I've read all the posts on this and nothing works.  This is a scale out deployment and the connection
    works from the other server I have setup with SRS that is connected to the same backend SRS databases.  It just doesn't work from one of the SRS front ends.  I'm at a loss..  please help

    Enable both named pipe and TCP communications.
    Make sure client is using the same (named) pipe name as server for connection.
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • How front end query invoke error message at backend

    Dear all,
    Please help me this out! I'm working on servlets(using Apache server). I'm sending sql statement to (dbaccess) database. If I do a sql statement directly at backend, the db will generate an error message. Now I'm sending the query at front end. When error occurs, the backend doesn't show the error message. I have no idea how to 1) generate the error messages at backend when a sql from front end is executed. 2) And then how the backend send the error message to the frontend.
    If you have any idea, please help me. I greatly appreciate that!
    Regards,
    Grace

    Thanks. Backend means database. But I just wonder why this exception not shown on my webpage. I made it to print out in html file.
    And are you sure that the exception front end caught is the same error message that I get if I run the sql statement at backend directly? Because I'm thinking of ways to make the error message both detail and user friendly to understand.
    What would you think?
    Thanks again!
    Grace

  • Diffrence between backend insert and front end insert into a table.

    I am developing a conversion program for tax exemption. For this program only ZX_EXEMPTIONS table is used to populate the data and we got confirmation from Oracle also regarding this.For inserting the data into this table we are taking the max of tax_exemption_id which is pk for this table and adding one to it and inserting into the table. But problem here is after inserting from back end we are not able to insert from front end.
    It seems backend data is holding the tax_exemption_id which is suppose to reserve by front end data.Please explain the different behavior of populating of tax_exemption_id from front end and back end.

    Hi,
    i think the problem is that you are using max-value + 1 for tax_exemption_id. But as ZX_EXEMPTIONS is using sequence ZX_EXEMPTIONS_S
    for primary key generation, you encounter situation that you are increasing PK Id for this table without increasing sequence value.
    When trying to insert rows from front end - which probably uses sequence value - it tries to use a sequence value already used by your backend
    process (which generated it by Maxvalue + 1) and would then encounter a primary key violation.
    I think you should use sequence mentioned above to generate your PK Ids in backend process as well. And before doing so, check current value
    of ZX_EXEMPTIONS_S, as you might need to rebuild the sequence in order to select nextval sucessfully for both frontend and backend.
    Regards

  • Regarding connection between front end HTML and back end SQL 7.0

    Hi!!
    I am working on the project 'ERM'. I have designed 12 forms using HTML. Can u please give me brief idea how to establish the connection between a back end and front end i.e. between HTML and SQL 7.0. If possible can u provide me the source code for the same.
    I will be very thankful to you.
    Thanks,
    Jigar.

    Read up about multi-tier applications.
    You need servlet and JSPs for the server-side presentation layer, some classes for the business logic, and some mor for the persistence layer either using JDBC or some framework like Hibernate.

  • Https front end and http backend

    Hi there....I am having a small issue....I have a web app that is https based....I have installed the cert on the CSS, and DNS for this app points to the VIP....the client is wanting to have an https front end, and then load balance in http to the backend servers....the issue I am running into is that this only works if I have an active port 80 rule on that same VIP....if I suspend the port 80 rule and only leave the port 443 rule active on that VIP, it doesn't work....please see appropriate config portions below....Thanks in advance!
    Sandeep
    ANy suggestions? I have been trying this for a couple of days now...it works fine if the backend sessions are also https, but the client has changed their requirement....
    ssl-proxy-list SSL1
    ssl-server 1
    ssl-server 1 rsakey app1-test
    ssl-server 1 rsacert app1-test
    ssl-server 1 vip address 10.19.55.10
    ssl-server 1 cipher rsa-with-rc4-128-md5 10.19.55.10 81
    backend-server 1
    backend-server 1 port 81
    backend-server 1 server-ip 10.19.55.132
    backend-server 1 ip address 10.19.55.132
    backend-server 2
    backend-server 2 port 81
    backend-server 2 server-ip 10.19.55.133
    backend-server 2 ip address 10.19.55.133
    backend-server 3
    backend-server 3 port 83
    backend-server 3 server-ip 10.19.55.132
    backend-server 3 ip address 10.19.55.132
    backend-server 4
    backend-server 4 port 83
    backend-server 4 server-ip 10.19.55.133
    backend-server 4 ip address 10.19.55.133
    backend-server 5
    backend-server 5 port 85
    backend-server 5 server-ip 10.19.55.132
    backend-server 5 ip address 10.19.55.132
    backend-server 6
    backend-server 6 port 85
    backend-server 6 server-ip 10.19.55.133
    backend-server 6 ip address 10.19.55.133
    active
    service webserver002:81
    ip address 10.19.55.132
    port 81
    keepalive port 2199
    keepalive type tcp
    protocol tcp
    active
    service webserver003:81
    ip address 10.19.55.133
    port 81
    keepalive port 2199
    keepalive type tcp
    protocol tcp
    add ssl-proxy-list SSL1
    active
    service webserver002:83
    ip address 10.19.55.132
    port 83
    add ssl-proxy-list SSL1
    keepalive port 2399
    keepalive type tcp
    protocol tcp
    active
    service webserver003:83
    ip address 10.19.55.133
    port 83
    keepalive port 2399
    keepalive type tcp
    protocol tcp
    add ssl-proxy-list SSL1
    active
    service webserver002:85
    ip address 10.19.55.132
    port 85
    add ssl-proxy-list SSL1
    keepalive port 2599
    keepalive type tcp
    protocol tcp
    active
    service webserver003:85
    ip address 10.19.55.133
    port 85
    keepalive port 2599
    keepalive type tcp
    protocol tcp
    add ssl-proxy-list SSL1
    active
    service SSL_Front
    slot 2
    type ssl-accel
    keepalive type none
    add ssl-proxy-list SSL1
    active
    owner app1-test
    content app-test_back
    vip address 10.19.55.10
    add service webserver002:81
    add service webserver003:81
    add service webserver002:83
    add service webserver003:83
    add service webserver002:85
    add service webserver003:85
    balance aca
    protocol tcp
    port 81
    active
    content app1-test_front
    vip address 10.19.55.10
    application ssl
    add service SSL_Front
    protocol tcp
    port 443
    advanced-balance ssl
    balance aca
    active

    Thanks for the quick reply....there is another port 80 rule setup for that vip....I was using that to test with the app until I got the front end https rules working....
    my port 80 rules just says listen to 10.19.55.10 on port 80 and load balance btwn the webervers on port 8x in the back end...
    I am trying to do https front end and http backend....
    no where in my SSL config have I configured port 80....but when I suspend that rule it all fails....
    I am wondering if the backend server sessions are happening properly?
    I don't fully get what you mean by "You need to have the rule in port 443 to match traffic coming from the client and the clear text rule (port 81) to match traffic already decrypted coming from the SSL module"
    Haven'tI done that?
    Thanks again!
    Sandeep

  • Front end of PL/SQL for Sun solaris

    Hi,
    What are the popular front ends and also Which is best front end of PL/SQL under
    UNIX (Sun Solaris) platform.

    You can use Sql Navigator from Qwest Software
    which can run on Win95/NT/2000. You can use SQL*NET to connect to your Sun Solaris or any other Oracle instance running on UNIX platform.
    Jack
    null

  • Connecting to SQl server ( MS acess front end) and pull the data into BI

    Dear all,
    i need to extract the data from SQl server ( MS acess front end) and pull the data into BI .
    i need to know what are the steps need to follow on this..
    can any one help me on this...!
    Thanks,
    Siva

    Hi,
    1. login to sql server u2013 with ur server credentials  and connect.
    2. select ur sql for ex: sap bw
    3. Right click u2013 sapbw - task - export data  From sql to excel I m exporting So give sql details 
    4. Destination u2013 select excel.. and browse where u want to save the fileu2026
    5. give next
    6. select from which table u want to export
    7. click on  next
    8. click on finish
    9. close
    10. go to desktop and open the xyz.xls file
    11. not make it as csv file and load the data to BI as a flat file
    Hope it will help you.
    Regards,

  • Lotus notes as a front end and oracle as backend

    Dear All,
    Can i use lotus notes as a front end and oracle as backend atleast for few forms in my application.
    If Yes how to go about it.
    I have not tried it even once
    Kindly also advice if this is appropriate forum to ask this question
    Best Regards,
    Devendra Shelke

    Dear All,
    Context for asking above question :
    We use Form 6i and Report 6i, Application Server 9i and 9i DB.
    But for some forms we want the user to enter the data through Lotus Notes but get updated in 9i DB used by Form 6i.
    Best Regards,
    Devendra

Maybe you are looking for