WCF-SQL Adapter and idle SQL Server sessions

Hi,
I have a BizTalk 2013 server with a send port that periodically send SQL statements to a remote SQL Server. The remote SQL Server hosts the database of a Dynamics NAV server.
The DBA of this SQL Server warned me that a lot of SQL Server sessions remain idle after a long period of time (about 20 idle sessions coming from my BizTalk server with a Idle time that is more than 10 days). He thinks that we have a trouble in BizTalk to
close the connections to the SQL Server.
I wondered if I can handle the situation by changing some settings in the sqlBinding used by my send port, for example the MaxPoolSize or other parameters.
Any idea?
Thanks.

So, is this causing an actual problem or is this something the DBA just happened to see?
20 idle sessions isn't a lot at all and is well below the default Connection Pool size, 100 in most cases.
So long as it does not keep increasing unchecked, I'd say what you're seeing is the expected and desired behavior.
You maybe have had a burst at some point causing 20 connections, then normal continuous operations only uses 1 or 2.

Similar Messages

  • Issues with creating and sending BOM XML IDOC to SAP using 2010 WCF-SAP Adapter (without using Biztalk Server)

      I'm trying to replace an existing Biztalk 2006 Send BOM IDOC process, and completely remove Biztalk server from the equation.   The existing Bizatalk 2006 server receives an input BOM (Bill of Materials) flat file, and using a Biztalk Map (BM08),
    and Orchestration, generates an Idoc and sends it to SAP.
      In my replacement C# program, I'm using the 2010 WCF-SAP Adapter, and am trying to generate the BOMMAT03 XML IDOC it to SAP.  
      I generated the BOMMAT03 schema from SAP using the Add Adapter Service in VS 2010.  I was able to generate a BM08 XSLT from the existing BMO8 map in the current Biztalk 2006 process.  I am able to run a XSLT transform on the input BOM flat
    file, and generate an XML file from that.  
      However, I've run into a few issues.   First of which, is that the XML file that is generated from the XSLT transform is NOT the same schema as the BOMMAT03 schema expects.  It's somewhat similar, but different enough that I have to manually
    translate between the two in my code.  I've verified that both the original Bitztalk 2006 process and my replacement program use BOMMAT V3 from SAP.  Question--Is Biztalk 2006 server doing some other magic to turn that transormed XML into the BOMMAT03
    schema?    
     I ended writing code which translates the transformed XML into the BOMMAT03 schema (which is a strong typed XML IDOC at this point).
      However, when I try to send the BOMMAT03 XML IDOC, I get an exception "Object reference not set to an instance of an object."
                   idocClient.Send(idocData, ref sadapterTxGuid);
    idocData is of type BOMMAT03, and I've verified that the various fields are populated.  
      Any help is appreciated. 

    Well, putting in a MSDN subscription support ticket for Biztalk server actually helped with the issue.  They didn't find, or fix the issue directly.  But one of the examples (https://randypaulo.wordpress.com/tag/idoc/) they sent over, jogged my
    memory, and I realized in the code snippet below, I had accidentally deleted the 1st line.  Such a simple mistake, yet was easy to overlook.  The URL example is almost EXACTLY like my code, but without the transform and translation code to convert
    from input XML file to IDOC XML.  If someone is interested in that, let me know.    
    //Forgot the 1st line.  
    idocClient = new IdocBOMMAT03SIEIS_WED_BOMMAT03V3R700Client(binding, endpointAddress);
     idocClient.Send(idocData, ref sadapterTxGuid);
    For anyone else interested in knowing, you CAN send a strongly typed IDOC to SAP using C#.NET and the WCF SAP 2010 Adapter, using the IDOC Binding Client class you generated using the Add Adapter Service Reference in VS2010.  
    The one difference, which no one, not even the tech support from MS could tell me, was why the XSLT which I generated from the original map, did not transform the input BOM XML into the BOMMAT03 XML.  Instead, it transformed it into an intermediate
    XML, which resembled the BOMMAT03 IDOC XML, but still needed to be translated to the BOMMAT03 IDOC format.  
    The tech support person swore up and down that it should.  But I believe that something happens in Biztalk server, after the Mapping occurs, maybe in the Pipeline, which converts that
    intermediate XML into the final BOMMAT03 IDOC XML format.
    I do think that the examples are severely lacking in showing how to send a strong typed IDOC using C# and the WCF-SAP Adapter.  Even worse, the examples are completely lacking in how to actually generate a weakly typed IDOC.  They show how to send
    that weakly typed IDOC, but show me, or give me a class to be able to generate it.
    I realize that this is not quite the "recommended way" to do it, but in reality, not everyone wants or even needs a full Biztalk installation.   For some simple stuff like this, a C#.NET program and WCF-SAP adapter do the trick.  

  • SQL, PL/SQL Expression and PL/SQL function

    In a Post Calculation Computation field I wanted the following computation:
    if B is X
    then
    field = A
    else
    field = B
    end if;
    or as a decode
    Decode(B,X,A,B)
    I could not get this to work so I wrote a database function that simulates the decode. So when I put:
    My_decode(B,X,A,B)
    in the field it did work.
    Basically I am not sure what kind of code one is expected to put into SQL, PL/SQL Expression and PL/SQL function fields. Can someone give an example of each? Also the APEX help is sometimes incorrect.
    For example if you click the "Post Calculation Computation" label it says:
    The For example, if this item is named P1_X, you could use post calculation expressions such as UPPER(:P1_X), INITCAP(:P2_Y), MIN(:P1_X,:P2_Y-200), NVL(:P1_X,:P2_Y), or a function call such as return my_func(:P1_X); to set the final value of the item.
    But if you put return my_func(:P1_X); in the field you get an error. It should be just my_func(:P1_X);
    thanks Rene

    DECODE is only available in SQL, so would have to be used in a SQL Expression.Yes, that's what APEX keeps telling me when I use in in a field that has "SQL or PL/SQL expression" above it. So what do you put in the field?

  • Differ java.sql.* and javax.sql.*

    Dear Friends,
    What is differenece between java.sql.* and javax.sql.*?.
    Advance in thanks

    java.sql is the package you can use for all basic kinds of database access. If you are not developing a full scale enterprise application, java.sql package is all that you need.
    javax.sql is extension to the basic java.sql package. It includes classes that allow connection pooling and rowsets, among others.
    If you are just getting started with JDBC, you just need to get familiar with java.sql and leave the wonders of javax.sql until later.

  • I need some working examples with pl/sql records and pl/sql tables.

    i am new to pl/sql tables and pl/sql records. i need some working examples on pl/sql records and pl/sql tables from basics to hoghlevel.how to use then procedures and functions and packages.

    i am new to pl/sql tables and pl/sql records. i need some working examples on pl/sql records and pl/sql tables from basics to hoghlevelThere is no such thing as PL/SQL "+tables+". This is a misnomer and creates the perception that a PL/SQL "table" is somewhat like a SQL table. Nothing can be further from the truth. The correct term is "+collection+" or "+associative array+". Compared to SQL tables, these are very primitive structures, very rigid structures, cannot scale, and can be quite expensive memory wise.
    That is not to say do not use an associative array or collection. These are very useful tools.. but only when applied correctly. Like using a collection for a bulk fetch to transfer more rows between the PL and SQL engines and thus decrease context switching.
    Unfortunately, quite often we see the row-by-row and slow-by-slow approach - where the developer uses SQL as an I/O only layer, pulls rows into expensive PL engine memory into record structures and arrays, and then process the rows there.
    So before looking at working example (even the wrong approach's code will compile and run and work in practice), make sure that you know the fundamentals of correctly using the PL engine and correctly using the SQL engine. And these fundamentals can be summed up into a very basic rule:
    Maximize SQL. Minimize PL/SQL+
    Get this rule right, and you will have a sound foundation for writing performant and scalable Oracle applications.

  • Can you run Embedded PL/SQL Gateway and Oracle HTTP Server at the same time

    Hi,
    I know this will sound a bit odd but their is a business case for asking this. Can you run APEX via the Embedded PL/SQL Gateway and the Oracle HTTP Server at the same time? Would their be any security/stability/etc issues I'd need to worry about? I know that I'll need to run them on different ports.
    Thank you,
    Martin Giffy D'Souza
    [http://apex-smb.blogspot.com/]

    I think I've done this in the past. Theres no technical reason why you can't do this as far as I know.
    I can't remember if I used different ports or same port.

  • How to get the SQL Primary and Mirrored Database Server Name from Witness Server

    Hello,
                    Can Someone help me with the way to get SQL Primary and Mirrored server name from Witness server?
    Any Powershell script/SQL Query..etc or share the alternative?
    Regards,
    Julie

    select principal_server_name,mirror_server_name,* from sys.database_mirroring_witnesses
    -Prashanth

  • SQL PRO AND ORACLE SQL URGENT HELP

    Can any one help me out here withe these questions:
    Pro C Qusetions:
    1.     What are the SQLCA and SQLDA ?
    2.     What is a mutating table ?
    3.     What are indicator variables and how are they used ?
    4.     What are the components of the Oracle VARCHAR type and how should such a structure be loaded into a C Char type ?
    5.     Why would you use the ‘ALTER SESSION’ command in conjunction with the tkprof program and what is the purpose of each step ?
    ORACLE SQL QUESTIONS:
    1.0     How would you move data from one Oracle database to another Oracle database?
    2.0     How would you import data into an Oracle database from another DBMS or flat file?
    3.0     What is an Outer Join and how does the output differ from a simple join?
    4.0     What is the difference between the conditional expressions IN and EXISTS ? In what circumstances would you USE EACH.
    5.0      You cannot create a unique index on a table due to duplicate values. Describe how you find the offending row and subsequently delete it.

    1. What are the SQLCA and SQLDA ?
    SQLCA = SQL Communications area: stores status variable and error message text. manual reference
    SQLDA = SQL Descriptor Area - stores information about bind variables. manual reference
    2. What is a mutating table ?
    A table that is being modified and that you are trying to select from. Usually encountered in a before insert/update trigger when trying to select from the table that is being inserted/updated, which causes the dreaded ORA-04091 error.
    3. What are indicator variables and how are they used ?
    Used in Pro*C to tell if the table column contains the value NULL.
    4. What are the components of the Oracle VARCHAR type and how should such a structure be loaded into a C Char type ?
    varchar2 is a null-terminated string. Use Pro*C extended type VARCHAR. Manual Reference
    5. Why would you use the "ALTER SESSION" command in conjunction with the tkprof program and what is the purpose of each step ?
    Use alter session to set tracing on for your session:
    alter session set sql_trace = true ;
    this will create a trace file in the user dump destination
    (select value from v$parameter where name = 'user_dump_dest'). Use tkprof to format the trace file.
    1.0 How would you move data from one Oracle database to another Oracle database?
    Export / Import Oracle utility, Database link and INSERT ... SELECT ..., Database link and COPY command, save to flat file and use SQL*Loader, transportable tablespaces, database "cloning" by copying database files over to a new server and creating a new instance based on those files. List of manuals look up CREATE DATABASE LINK in the SQL Reference, COPY command in the SQL*Plus reference, Export/Import or SQL*Loader in the Utilities manual.
    2.0 How would you import data into an Oracle database from another DBMS or flat file?
    SQL*Loader Oracle Utility
    3.0 What is an Outer Join and how does the output differ from a simple join?
    An example is worth 1000 words.
    SQL> select * from emp ;
       EMP_NO EMP_NAME     DEPT_NO
            1 SMITH              1
            2 JONES              1
            3 BROWN              2
            4 BOND               5
    SQL> select * from dept ;
      DEPT_NO DEPT_NAME
            1 SALES
            2 MARKETING
    SQL> -- inner or "ordinary" join
    SQL> select a.emp_name, b.dept_name
      2  from emp a, dept b
      3  where a.dept_no = b.dept_no ;
    EMP_NAME   DEPT_NAME
    SMITH      SALES
    JONES      SALES
    BROWN      MARKETING
    SQL> -- outer join
    SQL> select a.emp_name, b.dept_name
      2  from emp a, dept b
      3  where a.dept_no = b.dept_no (+) ;
    EMP_NAME   DEPT_NAME
    SMITH      SALES
    JONES      SALES
    BROWN      MARKETING
    BOND5.0 You cannot create a unique index on a table due to duplicate values. Describe how you find the offending row and subsequently delete it.
    Using exceptions clause of enable constraint
    ALTER TABLE employees
    ENABLE VALIDATE CONSTRAINT emp_manager_fk
    EXCEPTIONS INTO exceptions ;
    Find rowids in exceptions table and use those rowids to delete the "bad" data. See SQL reference on alter table for more details.

  • Problem with java.sql.Clob and oracle.sql.CLOB

    Hi,
    I am using oracle9i and SAP web application server. I am getClob method and storing that in java.sql.Clob and using the getClass().getName() I am getting the class name as oracle.sql.CLOB. But when I am trying to cast this to oracle.sql.CLOB i am getting ClassCastException. The code is given below
    java.sql.Clob lOracleClob = lResultSet.getClob(lColIndex + 1);
    lPrintWriter = new PrintWriter(new BufferedWriter (((oracle.sql.CLOB) lOracleClob).getCharacterOutputStream()));
    lResourceStatus = true;
    can anybody please tell me the what is the problem with this and solution.
    thanks,
    Ashok.

    Hi Ashok
    You can get a "ClassCastException" when the JVM doesn't have access to the specific class (in your case, "oracle.sql.CLOB").
    Just check your classpath and see if you are referring to the correct jar files.
    cheers
    Sameer
    PS: Please award points if you find the answer useful

  • What is the Diffrence between Adaptive and Webi Job Server

    Hello,
    What is the diffrence between Adaptive Job server and Webi Job server?
    In my BO server we didn't have Webi Job server but we are able to schedule the webi reports successfully.
    Any Idea on this.
    Thanks,
    Nimesh.

    I believe the Adaptive Job Server is on a generic shell server that behave as a Webi Job Server when it processes webi reports, as a program job server when it processes program object etc.

  • Difference between Static SQL Query and Dynamic SQL Query.

    Hi,
    Please explain the basic difference between static and dynamic sql queries. Please explain with example.

    Static: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/static.htm
    Dynamic: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/dynamic.htm

  • Performance between SQL Statement and Dynamic SQL

    Select emp_id
    into id_val
    from emp
    where emp_id = 100
    EXECUTE IMMEDIATE
    'Select '|| t_emp_id ||
    'from emp '
    'where emp_id = 100'
    into id_valWill there be more impact in performance while using Dynamic SQL?

    CP wrote:
    Will there be more impact in performance while using Dynamic SQL?All SQLs are parsed and executed as SQL cursors.
    The 2 SQLs (dynamic and static) results in the exact same SQL cursor. So both methods will use an identical cursor. There are therefore no performance differences ito of how fast that SQL cursor will be.
    If an identical SQL cursor is not found (a soft parse), the SQL engine needs to compile the SQL source code supplied, into a SQL cursor (a hard parse).
    Hard parsing burns a lot of CPU cycles. Soft parsing burns less CPU cycles and is therefore better. However, no parsing at all is the best.
    To explain: if the code creates a cursor (e.g. INSERT INTO tab VALUES( :1, :2, :3 ) for inserting data), it can do it as follows:
    while More Data Found loop
      parse INSERT cursor
      bind variables to INSERT cursor
      execute INSERT cursor
      close INSERT cursor
    end loopIf that INSERT cursor does not yet exists, it will be hard parsed and a cursor created. Each subsequent loop iteration will result in a soft parse.
    However, the code will be far more optimal as follows:
    parse INSERT cursor
    while More Data Found loop
      bind variables to INSERT cursor
      execute INSERT cursor
    end loop
    close INSERT cursorWith this approach the cursor is parsed (hard or soft), once only. The cursor handle is then used again and again. And when the application is done inserting data, the cursor handle is released.
    With dynamic SQL in PL/SQL, you cannot really follow the optimal approach - unless you use DBMS_SQL (a complex cursor interface). With static SQL, the PL/SQL's optimiser can kick in and it can optimise its access to the cursors your code create and minimise parsing all together.
    This is however not the only consideration when using dynamic SQL. Dynamic SQL makes coding a lot more complex. The SQL code can now only be checked at execution time and not at development time. There is the issue of creating shareable SQL cursors using bind variables. There is the risk of SQL injection. Etc.
    So dynamic SQL is seldom a good idea. And IMO, the vast majority of people that post problems here relating to dynamic SQL, are using dynamic SQL unnecessary. For no justified and logical reasons. Creating unstable code, insecure code and non-performing code.

  • Oracle.sql.BLOB and oracle.sql.STRUCT

    I'm development a application in Java with oracle, to manage media files. When I try to insert into oracle , I have this problem "oracle.sql.BLOB cannot be cast to oracle.sql.STRUCT" , and I don't know what that can be ..
    This is my code , please help with that.. If you have a smaple code of java and oracle to insert media , that will be a great help ..
    public void loadDataFromStream(OracleConnection con)
    try {
    Statement s = con.createStatement();
    OracleResultSet rs = (OracleResultSet)
    s.executeQuery("select * from blobs where id='video2.avi' for update ");
    String index = "";
    while(rs.next())
    index = rs.getString(1);
    index+="1";
    System.out.println("llego hasta aki");
    // el error esta en esta linea de abajo ...
    OrdVideo vidObj = (OrdVideo) rs.getCustomDatum(2, OrdVideo.getFactory());
    //rs.getBfile(3);///
    FileInputStream fStream = new FileInputStream("/home/jova/movie.avi");
    vidObj.loadDataFromInputStream(fStream);
    vidObj.getDataInFile("/home/jova/movie.avi");
    fStream.close();
    System.out.println(" getContentLength output : " +
    vidObj.getContentLength());
    OraclePreparedStatement stmt1 =
    (OraclePreparedStatement) con.prepareCall("update blob_col set image = ? where id = " + index);
    stmt1.setCustomDatum(1,vidObj);
    stmt1.execute();
    stmt1.close() ;
    index+="1";
    System.out.println("OK");
    catch(Exception e) {
    System.out.println("exception raised " + e);
    System.out.println("load data from stream unsuccessful");
    }

    I'm development a application in Java with oracle, to manage media files. When I try to insert into oracle , I have this problem "oracle.sql.BLOB cannot be cast to oracle.sql.STRUCT" , and I don't know what that can be ..
    This is my code , please help with that.. If you have a smaple code of java and oracle to insert media , that will be a great help ..
    public void loadDataFromStream(OracleConnection con)
    try {
    Statement s = con.createStatement();
    OracleResultSet rs = (OracleResultSet)
    s.executeQuery("select * from blobs where id='video2.avi' for update ");
    String index = "";
    while(rs.next())
    index = rs.getString(1);
    index+="1";
    System.out.println("llego hasta aki");
    // el error esta en esta linea de abajo ...
    OrdVideo vidObj = (OrdVideo) rs.getCustomDatum(2, OrdVideo.getFactory());
    //rs.getBfile(3);///
    FileInputStream fStream = new FileInputStream("/home/jova/movie.avi");
    vidObj.loadDataFromInputStream(fStream);
    vidObj.getDataInFile("/home/jova/movie.avi");
    fStream.close();
    System.out.println(" getContentLength output : " +
    vidObj.getContentLength());
    OraclePreparedStatement stmt1 =
    (OraclePreparedStatement) con.prepareCall("update blob_col set image = ? where id = " + index);
    stmt1.setCustomDatum(1,vidObj);
    stmt1.execute();
    stmt1.close() ;
    index+="1";
    System.out.println("OK");
    catch(Exception e) {
    System.out.println("exception raised " + e);
    System.out.println("load data from stream unsuccessful");
    }

  • SQL*PLUS and PL/SQL

    HI !
    There is any way to run a command SQL*PLUS through a block pl/sql. For example to run the "copy from" command in a block pl/sql.
    Thanks for you time.

    APC wrote:
    No.
    SQL*Plus is an interactive, client-side tool. PL/SQL is a batch-oriented server side tool.I would make more distinction ...
    SQL*Plus is an interactive, client-side tool - a specialized command processor. PL/SQL is a batch-oriented server side programming language.
    >
    There are ways of doing the same sort of things in both languages, but they are different commands.
    Cheers, APC

  • Help Needed -- Oracle XML/SQL utility and PL/SQL parser

    Let's say we have an xml file
    <?xml version="1.0" standalone="no"?>
    <abc>
    <def>
    <ghi>test</ghi>
    </def>
    <jkl>
    <mno>testing</mno>
    </jkl>
    </abc>
    We can store the <def> tag in one table say def and <jkl> tag in another table say jkl.
    Is there a way to combine def and jkl and insert in one table so that there in one row with two columns test and testing??
    null

    Hi,
    Are u sure that it is a java enabled database? The most common
    case of failure with the xmlgen package is because the loadjava
    command did not succeed.
    Please make sure that oraclexmlsqlload.bat file loaded all the
    java procedures successfully. If not then u would have to java-
    enable your database by running the initjvm script. (please see
    the docs).
    Thx
    Murali
    Iveta Vojtko (guest) wrote:
    : Hi,
    : I have downloaded XML SQL Utility for Java against Oracle
    8.0.5
    : on WindowsNT. The xmlgen package was created successfully but
    : its body is invalid and my PL/SQL test has failed because of
    : following error: PLS-00103: Encountered the symbol "NAME"
    : when expecting one of the following: := . ( @ % ; not null
    range
    : renames default character. The symbol ":= was inserted abefore
    : "NAME" to continue.
    : Is it because I am not using Oracle8i? I just want to use the
    : server side of XML SQL. Please, reply asap. Thank you.
    Oracle Technology Network
    http://technet.oracle.com
    null

Maybe you are looking for

  • What are the dimensions of the macbook pro 13 inch shipping box

    What are the dimensions of the brown shipping box that the 13-INCH MBP is shipped in including the weight. Please give the dimensions in the order Length, Height, and Width .

  • Help, my mini REFUSES to shut down/restart

    Hey guys. I'm looking for some help figuring out what is making my mini hang on shut down. My icons all dissappear and then I just see the osx backdrop. From there the system refuses to take any keyboard input, though I can move the mouse around. It

  • Music wont play after pause

    I have a little issue with mpd+ncmpcpp. When i start a song, and then pause it, if i want to listen to youtube fx. when i then wanna hear the music again it wont start. When i start a song, it says playing for about 1 second, then just change back to

  • Characterisics combination-sales order error

    Hi, While editting the sales order I am getting the error message"Characteristics combination for item /000000 was not found". Internal error: Item /000010(0001). Please suggest.

  • Where is the AutoText stored?

    I do not know if I should ask this question here. I am using Mac OS 10.4.11 on my G4. Recently, I need to transfer the AutoText file of MS Word from it to another computer. Where can I find the AutoText file for copying and transfer? Thansk. Robert