Official documents on escaping characters in SQL Server query statements

Hi,
Are there any official documents on how to escaping special characters in SQL Server query statements? I find a lot of online resources discussing about this, but there are no definitive conclusions on:
Which characters should be escaped? (Some only said single-quote needs to be escaped, double-quote does not need. While others said both need to be escaped)
How to escape characters? (Some said using two single-quote to escape a single-quote. Others said using a backslash, etc.)
So I just wonder if there is an official document from Microsoft regarding this?
Thanks
Alan

Depends on where you're using them
If its string values then single quotes(') should be escaped by putting one more single quote before it.
If its LIKE operator you can use ESCAPE keyword or use [] to escapre special characters 
see
http://visakhm.blogspot.in/2013/01/wildcard-character-based-pattern-search.html
If inside SSIS expression you can escape characters like \ " etc by adding an extra \ before the characters
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • From SharePoint Content Database, Using SQL-Server Query how to fetch the 'Document GUID' based on 'Content Type'

    I want to get all the documents based on content type using SQL Server Query. I know that, querying the content database without using API is not advisable, but still i want to perform this action through SQL Server Query. Can someone assist ?

    You're right, it's not advisable, may result in corruption of your databases and might impact performance and stability. But assuming you're happy to do that then it is possible.
    Before you go down that route, have you considered using something more safe like PowerShell? I've seen a script exactly like the one you describe and it would take far less time to do it through PS than it would through SQL.

  • Inserting Japanese characters to SQL Server via CFMX

    What is necessary in the setup to save non-Latin characters
    to SQL Server via CFMX form? The ColdFusion data source has the
    Unicode option enabled (Enable Unicode for data sources configured
    for non-Latin characters). The target field in the database is an
    nvarchar. What else is necessary to properly insert and then later
    display the non-Latin characters?
    On Microsoft's site they describe the need to convert to and
    from UCS-2 when accessing SQL Server via ASP. Is this type of
    conversion relevant to CFMX?

    jegrubbs wrote:
    > What is necessary in the setup to save non-Latin
    characters to SQL Server via
    > CFMX form? The ColdFusion data source has the Unicode
    option enabled (Enable
    > Unicode for data sources configured for non-Latin
    characters). The target field
    > in the database is an nvarchar. What else is necessary
    to properly insert and
    > then later display the non-Latin characters?
    - define db columns as "N" types
    - ensure cf pages are utf-8 encoding:
    --tag the files w/a BOM
    --use
    <cfprocessingDirective pageencoding="utf-8">
    on each page
    --use
    <cfset setEncoding("form","utf-8")>
    <cfcontent type="text/html; charset=utf-8">
    in application.cfm or .cfc
    - when doing INSERT/UPDATE make sure to use either unicode
    hinting (N'text') or
    cfqueryparam (making sure to turn on the unicode option for
    that DSN in
    cfadmin). cfqueryparam is the best choice.
    also see:
    http://www.sustainablegis.com/unicode/greekTest.cfm
    > On Microsoft's site they describe the need to convert to
    and from UCS-2 when
    > accessing SQL Server via ASP. Is this type of conversion
    relevant to CFMX?
    nope the JDBC driver will handle that gruff. make sure you
    use the JDBC driver
    (name as ms sql server in cfadmin) and NOT the odbc bridge
    thnig.

  • Sql server query

    sql server query to rearrange the rows after inserting the rows in a table

    You want to re-arrange the data physically?!!! Why? I believe its something impossible other than having a clustered key(there could be some strange ways of doing it) and a thing that should not worry about. Always there is a ORDER BY CLAUSE to order your
    data while retrieving 
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Problem : SQL Server Delete Statement vs Oracle Delete Statement

    Hi,
    I am currently involved in a SQL Server - Oracle Migration effort and I have hit a roadblock on one of the queries.
    I have created two tables named DUMMY and DUMMY1 in MSDE with the same structure :-
    CREATE TABLE DUMMY
         CLIENT_ID                                             INT,
         NME                                                   VARCHAR(80),
         BATCH_ID                                              INT,
         CATALOG_NAME                                          VARCHAR(50),
         DATA_SOURCE                                           VARCHAR(50)
    GOI have a DELETE statement that deletes from the two tables, by selecting common data using Joins:-
    DELETE  DUMMY
    FROM      DUMMY src
            JOIN
         DUMMY1 dst 
              ON
                  src.batch_id = dst.batch_id 
              AND src.catalog_name = dst.catalog_name 
              AND src.data_source = dst.data_source
         WHERE
                   src.batch_id     = 1
              AND      src.catalog_name = '1'
                  AND      src.data_source  = '1'Now, I have created the same Tables ( DUMMY and DUMMY1 ) in Oracle :-
    CREATE TABLE DUMMY
         CLIENT_ID                                             NUMBER(5),
         NME                                                      VARCHAR2(80),
         BATCH_ID                                             NUMBER(10),
         CATALOG_NAME                                  VARCHAR2(50),
         DATA_SOURCE                                     VARCHAR2(50)
    )I have written a Delete statement to mimic the fucntionality in this manner :-
    DELETE FROM 
              DUMMY 
    WHERE
                   client_id,
                   nme,
                   batch_id,
                   catalog_name,
                   data_source
              IN
                   SELECT *
                   FROM
                        DUMMY  src
                                           JOIN 
                        DUMMY1  dst 
                             ON
                                  src.batch_id = dst.batch_id
                             AND      src.catalog_name = dst.catalog_name
                             AND      src.data_source = dst.data_source
                        WHERE
                                  src.batch_id = 1
                             AND      src.catalog_name= '1'
                             AND      src.data_source = '1'
              )However, I keep getting this error whe I try to test it :-
    ORA-06550: line 1, column 89:
    PL/SQL: ORA-00913: too many values
    Can you please help me modify the query to simulate the same functionality as the orignial SQL Server Query ?
    Thanks,
    Sandeep

    There is probably a mismatch between the number of columns.
    Try this * Not Tested *
    DELETE FROM 
              DUMMY 
    WHERE
                   client_id,
                   nme,
                   batch_id,
                   catalog_name,
                   data_source
              IN
                   SELECT      src.client_id,
                   src.nme,
                   src.batch_id,
                   src.catalog_name,
                   src.data_source
                   FROM
                        DUMMY  src
                                           JOIN 
                        DUMMY1  dst 
                             ON
                                  src.batch_id = dst.batch_id
                             AND      src.catalog_name = dst.catalog_name
                             AND      src.data_source = dst.data_source
                        WHERE
                                  src.batch_id = 1
                             AND      src.catalog_name= '1'
                             AND      src.data_source = '1'
              );

  • Converting SQL Server Query to Oracle

    Hello TechFriends,
    Can any one of u please tell me equivalent of following SQL Server Query?
    The same query runs in Oracle but givesa same reocrds in different order!! I want such an equivalent oracle query that gives records in same order as Sql Server does.
    select
    ProfValue_ProfScaleFK ProfScale,
    ProfValue_Value ProfValue,
    isnull(ProfValueDesc.name, ProfValue_name) ProfName
    from
    ProfValueDesc inner join TBL_LMS_Lang
    on lang_fk = lang_pk and langid = 'en'
    right outer join ProfValue
    on ProfValue_ProfScaleFK = ProfScale_fk and ProfValue_Value = ProfValue_FK ;
    Regards & TIA.
    Anand.

    If you want a specific ordering why don't you add an ORDER BY clause?
    Donal

  • Retrieving Chinese Characters from SQL Server with JDBC

    Im having problems correctly recieving Simplified Chinese from the database (SQL Server 2000).
    Driver: sun.jdbc.odbc.JdbcOdbcDriver
    It seems that I cannot force the Results Set's getString(String s) method to the correct character encoding UTF-16. Java claims to have 16-bit characters but the native windows encoding cp1242 (somehting like that) seems to not be working for me.
    I can read it in from a unicode text file using the InputStreamReader object, and it will display correctly.
    All I ask is this: Has anyone successfully retrieved information from a database and displayed it correctly in a Swing application?
    Any help is welcome

    Thanks for the help.
    I was suspecting there was a problem with the driver. Microsoft's Driver worked perfectly for SQL 2000, but my target database is SQL 7 and the driver is not reverse compatible.
    I am looking for a Free liscenced JDBC driver that will work with SQL 7 (other than the sun.jdbc.odbc.JdbcOdbcDriver)
    Nothing fancy needs to be supported, just scrollable result sets, and basic insert, update, select, exec commands.

  • Escape characters for SQL

    Help me out here! i'm having a problem updating our database with this call:
    update table
    set name = 'dave's store'
    where id = '2';
    The problem of course is that single quote in the name. i've check many sites and have tired everything.
    -i have tried to escape the quote with a back (and forward!) slash, and nothing.
    -i have padded the quote with another single quite (ie ''), but that doesn't work.
    -i have have nearly all combinations of single and double quotes, with and without escape characters!
    according to the documention, just the blackslash so be fine! any one have this problem as well?
    any help would be greatly appreciated! thanks.

    Very related question.
    Is there a way to make sure that all 'weird' characters in an SQL statement are escaped properly before the statement is executed?
    I'm hoping that there is a method like this:
    Statement stmt = stmt.escapeAllBadChars();
    Is there such a method anywhere?
    I can't find it anywhere :(
    If not, is there a list of all 'bad characters' anywhere?
    Thanks,
    Otis
    null

  • Why am I getting "There is already an object named '#TempTable...' in the database." within my SQL Server IF Statement

    The creation of My #TempTable is based on my input Parameter and I am getting "There is already an object named '#TempTable_Service_X_Claims' in the database." Why???
    USE [Report]
    GO
    DECLARE @ProviderType CHAR(1)
    SET @ProviderType = 'G'
    IF Object_ID('TempDB..#TempTable_Service_X_Claims') IS NOT NULL DROP TABLE [#TempTable_Service_X_Claims]
    IF @ProviderType = 'I'
    BEGIN
    SELECT...
    INTO [#TempTable_Service_X_Claims]
    FROM [dbo].[service_x]
    LEFT JOIN [dbo].[affiliation]
    ON [affiliation].[AFF_NBR] = [service_x].[AFF_NBR]
    AND [affiliation].[PROV_NBR] = [service_x].[Prov_Nbr]
    AND [affiliation].[VOID] = ''
    AND [affiliation].[c_ymdeff] <= [service_x].[C_EFF_DATE]
    AND [affiliation].[c_ymdend] >= [service_x].[C_EFF_DATE]
    WHERE [service_x].[C_EFF_DATE] >= '1/1/2013'
    AND [service_x].[C_EFF_DATE] <= '12/31/2013' --AND [affiliation].[PRAC_NBR] = @PracticeNbr
    AND [affiliation].[PRAC_NBR] = 'F330'
    END
    -- THEREFORE, USE THIS QUERY FOR "G" GROUP SELECTION SINCE IT USES [NPI]
    IF @ProviderType = 'G'
    BEGIN
    SELECT...
    INTO [#TempTable_Service_X_Claims]
    FROM [dbo].[service_x]
    LEFT JOIN [dbo].[affiliation]
    ON [affiliation].[AFF_NBR] = [service_x].[AFF_NBR]
    AND [affiliation].[PROV_NBR] = [service_x].[Prov_Nbr]
    AND [affiliation].[VOID] = ''
    AND [affiliation].[c_ymdeff] <= [service_x].[C_EFF_DATE]
    AND [affiliation].[c_ymdend] >= [service_x].[C_EFF_DATE]
    WHERE [service_x].[C_EFF_DATE] >= '1/1/2013'
    AND [service_x].[C_EFF_DATE] <= '12/31/2013'
    AND [affiliation].[NPI] = '1700947884 '
    END
    Thanks in advance for your review and am hopeful for a reply.
    PSULionRP

    The creation of My #TempTable is based on my input Parameter and I am getting "There is already an object named '#TempTable_Service_X_Claims' in the database." Why???
    USE [Report]
    GO
    DECLARE @ProviderType CHAR(1)
    SET @ProviderType = 'G'
    IF Object_ID('TempDB..#TempTable_Service_X_Claims') IS NOT NULL DROP TABLE [#TempTable_Service_X_Claims]
    IF @ProviderType = 'I'
    BEGIN
    SELECT...
    INTO [#TempTable_Service_X_Claims]
    FROM [dbo].[service_x]
    LEFT JOIN [dbo].[affiliation]
    ON [affiliation].[AFF_NBR] = [service_x].[AFF_NBR]
    AND [affiliation].[PROV_NBR] = [service_x].[Prov_Nbr]
    AND [affiliation].[VOID] = ''
    AND [affiliation].[c_ymdeff] <= [service_x].[C_EFF_DATE]
    AND [affiliation].[c_ymdend] >= [service_x].[C_EFF_DATE]
    WHERE [service_x].[C_EFF_DATE] >= '1/1/2013'
    AND [service_x].[C_EFF_DATE] <= '12/31/2013' --AND [affiliation].[PRAC_NBR] = @PracticeNbr
    AND [affiliation].[PRAC_NBR] = 'F330'
    END
    -- THEREFORE, USE THIS QUERY FOR "G" GROUP SELECTION SINCE IT USES [NPI]
    IF @ProviderType = 'G'
    BEGIN
    SELECT...
    INTO [#TempTable_Service_X_Claims]
    FROM [dbo].[service_x]
    LEFT JOIN [dbo].[affiliation]
    ON [affiliation].[AFF_NBR] = [service_x].[AFF_NBR]
    AND [affiliation].[PROV_NBR] = [service_x].[Prov_Nbr]
    AND [affiliation].[VOID] = ''
    AND [affiliation].[c_ymdeff] <= [service_x].[C_EFF_DATE]
    AND [affiliation].[c_ymdend] >= [service_x].[C_EFF_DATE]
    WHERE [service_x].[C_EFF_DATE] >= '1/1/2013'
    AND [service_x].[C_EFF_DATE] <= '12/31/2013'
    AND [affiliation].[NPI] = '1700947884 '
    END
    Thanks in advance for your review and am hopeful for a reply.
    PSULionRP
    Is it possible that this procedure is being executed more than once concurrently (even against different databases)) within the instance?
    Microsoft SQL Server Storage Engine PM

  • Switch from MySQL to MS SQL Server, Query not working

    I'm sure there is a simple setting somewhere for this, but cannot seem to find it and really would appreciate some assistance. Have an application which uses JDBC to connect to a MySQL DB to run the following query without an issue:
    SELECT * FROM users
    This returns the desired results. Changed to connect to MS SQL Server 2000 using the JDBC-ODBC bridge and the same query returns no results. The problem, SQL Server wants this query instead:
    SELECT * FROM [users]
    I don't want to have to change queries depending on the DB, as that is supposed to be one of the advantages of JDBC. Is there a setting in MySQL (or the JDBC driver) to have it work correctly if I pass table names in []? Or is there a setting in MS SQL Server (or in the JDBC, or ODBC) to have it accept queries without the []?
    Or is there a different approach that I'm missing which would avoid this whole problem?
    Thanks,
    Matt

    I suspect your database definitions are different. It has nothing to do with your java code.
    The bracket syntax is used to indicate the more standard quoted identifiers in standard SQL.
    Thus you could do this in oracle and in MS SQL Server...
    SELECT * FROM "users"
    I suspect that the above will work for your MS SQL Server database and will not work for your Oracle database. However if you created the table in oracle and specifically used "users" (with the double quotes around the name) when creating the table then it would work.
    Of course if the database definitions are different it means you must use different SQL for each. Just as if the name of the table was 'other' rather than 'users'.

  • SQL server Query to sort the Stored procedure as text

    Hi
    I have a requirement as below :
    Stored procedure in SQL server has some 1000 lines of code where the SP uses select, insert , update ,delete and Joins on direct tables and as well as temp tables , the requirement is to get all text code from sp which is used for either select/insert
    except update and delete.
    for example :
    Create PROCEDURE testproc
    AS
    Begin
    /*Statement 1*/
    select id from emptable
    /*Statement 2*/
    select address into #empAddress from empAddresstbl
    /*Statement 3*/
    update a
    set id = 0 from usertbl a 
    /*Statement 4*/
    Update u
    set access=0 from usertbl u
    inner join permissionstbl p
    on u.userid = p.userid
    /*Statement 5*/
    select name into #empname
    from empnametbl
    inner join Nametbl on
    empname.id = name.id
    END
    for the given sample sp the output of query shld be
    from emptable
    from empaddresstbl
    from empnametbl
    join nametbl
    it shld not consider the table name from update/delete and the tables used for joins in updates/delete.
    This has to be achieved using  SQL
     Thanks,

    Hi All,
    Problem is solved after adding files to microsoft access 2000 runtime. runtime missing some DLLs related to sql server 2000 to update those files follow the links below
    http://support.microsoft.com/?kbid=287484
    http://www.microsoft.com/office/orkarchive/2000ddl.htm#accsql
    Thanks,
    Brahma

  • Variable database name in SQL Server query using Oracle database link

    Hi All,
    I have an ApEx 4.1 app running on 11g x64 (11.2.0.1) on Windows Server 2008 x64, and I have some data integration points with a SQL Server (2005 and 2008) that I need to establish. I have configured the database link with dg4odbc and it works beautifully... I can execute queries against the SQL Server database without any problems using the database link.
    However, there is a scenario where the SQL Server database name is dynamic, and I need to generate it on the fly in a PL/SQL block, and then use that in a dynamic SQL query (all of this in ApEx). This is where I run into problems... when I am querying the default database based on the ODBC connection and I don't have to specify the database name, there is no issue. But when I need to access one of several other non-default databases, I keep receiving the "invalid table" error.
    This runs fine:* (note that "fv" is the name of my database link)
    v_query1 := 'select "ReleaseDate" from dbo.Schedules@fv where dbo.Schedules."SchedID" = :schedule';
    EXECUTE IMMEDIATE v_query1 into rel_date using schedule;
    I then take that rel_date variable, convert to a varchar2 (rel_date_char), and then use it as the database name in the next query...
    This returns an error_ (Error ORA-00903: invalid table name)
    v_query2 := 'select "PARTNO" from :rel_date_char.dbo.ProdDetails@fv where "SchedID" = :schedule and "UnitID" = :unit
    and "MasterKey" = :master and "ParentKey" = :parent';
    EXECUTE IMMEDIATE v_query2 into part_number using schedule, unit, master, parent;
    I have also tried using all of the following to no avail:
    'select "PARTNO" from ' || :rel_date_char || '.dbo.ProdDetails@fv where "SchedID"...
    'select "PARTNO" from ' || rel_date_char || '.dbo.ProdDetails@fv where "SchedID"...
    'select "PARTNO" from ' || @rel_date_char || '.dbo.ProdDetails@fv where "SchedID"...
    'select "PARTNO" from @rel_date_char.dbo.ProdDetails@fv where "SchedID"...
    Is there a way to do this in PL/SQL?
    Thanks for any help!
    -Ian C.
    Edited by: 946532 on Jul 15, 2012 7:45 PM

    Just did a test using passthrough:
    SQL> set serveroutput on
    SQL> declare
    2 val varchar2(100);
    3 c integer;
    4 nr integer;
    5 begin
    6 c:= dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 'select count(*) from EMP');
    8 LOOP
    9 nr:= DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c);
    10 exit when nr=0;
    11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c,1,val);
    12 dbms_output.put_line(val);
    13 end loop;
    14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c);
    15 end;
    16 /
    24576
    PL/SQL procedure successfully completed.
    SQL> declare
    2 val varchar2(100);
    3 c integer;
    4 nr integer;
    5 begin
    6 c:= dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 'select count(*) from dbo.EMP');
    8 LOOP
    9 nr:= DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c);
    10 exit when nr=0;
    11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c,1,val);
    12 dbms_output.put_line(val);
    13 end loop;
    14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c);
    15 end;
    16 /
    24576
    PL/SQL procedure successfully completed.
    So all 3 ways work for me.
    Edited by: kgronau on Jul 23, 2012 10:08 AM
    Now using variables to perform the select:
    SQL> declare
    2 val varchar2(100);
    3 c integer;
    4 nr integer;
    5 tabname varchar2(20) :='EMP';
    6 ownr varchar2(20) :='dbo';
    7 dbname varchar2(20) :='gateway';
    8 begin
    9 c:= dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    10 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 'SELECT count(*) FROM '||dbname||'.'|| ownr || '.'||tabname||'');
    11 LOOP
    12 nr:= DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c);
    13 exit when nr=0;
    14 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c,1,val);
    15 dbms_output.put_line(val);
    16 end loop;
    17 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3(c);
    18 end;
    19 /
    24576
    PL/SQL procedure successfully completed.
    => instead of executing the statement using "execute Immediate" we have to use PASTHROUGH package to pass the statement to the SQL Server.
    Edited by: kgronau on Jul 23, 2012 10:10 AM

  • SQL Server Query Plan Generation take longer

    Dear all,
    We are dealing with a wired issue where queries on there first execution take approx 1 min to 2 mins to execute and later execution completes in less than a second,Can you please help us understand why sql server is taking longer time to generated the query
    plan
    Below is the result of files stats
    Mohd Sufian www.sqlship.wordpress.com Please mark the post as Answered if it helped.

    SYS.DM_OS_MEMORY_CLERKS
    MEMORYCLERK_SQLOPTIMIZER 136 912
    CACHESTORE_PHDR 1864 0
    CACHESTORE_XMLDBTYPE 8 0
    CACHESTORE_EVENTS 16 0
    USERSTORE_OBJPERM 824 0
    USERSTORE_TOKENPERM 840 968
    MEMORYCLERK_SQLSTORENG 2736 4312
    CACHESTORE_FULLTEXTSTOPLIST 32 0
    MEMORYCLERK_XE 64 168
    CACHESTORE_XPROC 72 0
    OBJECTSTORE_SNI_PACKET 3336 112
    CACHESTORE_BROKERRSB 8 0
    OBJECTSTORE_SERVICE_BROKER 424 0
    MEMORYCLERK_SQLSERVICEBROKERTRANSPORT 48 0
    MEMORYCLERK_XE_BUFFER 0 0
    MEMORYCLERK_SQLGENERAL 1608 4144
    CACHESTORE_XMLDBATTRIBUTE 8 0
    MEMORYCLERK_SQLHTTP 8 0
    CACHESTORE_STACKFRAMES 0 16
    MEMORYCLERK_SQLCONNECTIONPOOL 2440 0
    MEMORYCLERK_SQLSERVICEBROKER 152 544
    CACHESTORE_NOTIF 16 0
    CACHESTORE_XMLDBELEMENT 8 0
    OBJECTSTORE_LOCK_MANAGER 24 0
    MEMORYCLERK_SQLBUFFERPOOL 0 1688
    MEMORYCLERK_SQLSOAP 0 0
    MEMORYCLERK_TRACE_EVTNOTIF 0 0
    CACHESTORE_OBJCP 6576 512
    CACHESTORE_CONVPRI 64 0
    MEMORYCLERK_QSRANGEPREFETCH 0 0
    CACHESTORE_BROKERREADONLY 80 0
    MEMORYCLERK_SQLCLRASSEMBLY 0 0
    MEMORYCLERK_SOSNODE 8 16320
    MEMORYCLERK_SQLQUERYPLAN 0 0
    OBJECTSTORE_SECAUDIT_EVENT_BUFFER 16 0
    MEMORYCLERK_BHF 0 0
    CACHESTORE_SQLCP 22680 3544
    OBJECTSTORE_LBSS 96 192
    CACHESTORE_SYSTEMROWSET 1832 0
    MEMORYCLERK_FULLTEXT 24 0
    USERSTORE_SCHEMAMGR 2632 328
    MEMORYCLERK_SQLQUERYCOMPILE 0 0
    CACHESTORE_TEMPTABLES 16 0
    CACHESTORE_BROKERTBLACS 200 0
    CACHESTORE_BROKERTO 8 0
    CACHESTORE_BROKERKEK 8 0
    MEMORYCLERK_SQLXML 0 0
    USERSTORE_SXC 64 0
    MEMORYCLERK_SNI 240 32
    MEMORYCLERK_FULLTEXT_SHMEM 0 0
    CACHESTORE_BROKERUSERCERTLOOKUP 8 0
    CACHESTORE_BROKERDSH 8 0
    MEMORYCLERK_SQLSOAPSESSIONSTORE 0 0
    MEMORYCLERK_SQLQERESERVATIONS 0 0
    MEMORYCLERK_HOST 16 0
    MEMORYCLERK_SQLCLR 8 0
    MEMORYCLERK_SQLXP 16 0
    USERSTORE_DBMETADATA 1912 0
    MEMORYCLERK_SQLUTILITIES 112 0
    CACHESTORE_VIEWDEFINITIONS 16 0
    MEMORYCLERK_SQLQUERYEXEC 80 0
    sys.dm_os_performance_counters
    object_name counter_name cntr_value
    SQLServer:Buffer Manager Buffer cache hit ratio 556
    SQLServer:Buffer Manager Buffer cache hit ratio base 612
    SQLServer:Buffer Manager Page lookups/sec 4054066
    SQLServer:Buffer Manager Free list stalls/sec 0
    SQLServer:Buffer Manager Free pages 483
    SQLServer:Buffer Manager Total pages 503088
    SQLServer:Buffer Manager Target pages 1710080
    SQLServer:Buffer Manager Database pages 494479
    SQLServer:Buffer Manager Reserved pages 0
    SQLServer:Buffer Manager Stolen pages 8126
    SQLServer:Buffer Manager Lazy writes/sec 0
    SQLServer:Buffer Manager Readahead pages/sec 378700
    SQLServer:Buffer Manager Page reads/sec 493985
    SQLServer:Buffer Manager Page writes/sec 2421
    SQLServer:Buffer Manager Checkpoint pages/sec 0
    SQLServer:Buffer Manager AWE lookup maps/sec 0
    SQLServer:Buffer Manager AWE stolen maps/sec 0
    SQLServer:Buffer Manager AWE write maps/sec 0
    SQLServer:Buffer Manager AWE unmap calls/sec 0
    SQLServer:Buffer Manager AWE unmap pages/sec 0
    SQLServer:Buffer Manager Page life expectancy 262
    SQLServer:Cursor Manager by Type Cache Hit Ratio 0
    SQLServer:Cursor Manager by Type Cache Hit Ratio Base 0
    SQLServer:Cursor Manager by Type Cached Cursor Counts 0
    SQLServer:Cursor Manager by Type Cursor Cache Use Counts/sec 0
    SQLServer:Cursor Manager by Type Cursor Requests/sec 0
    SQLServer:Cursor Manager by Type Active cursors 0
    SQLServer:Cursor Manager by Type Cursor memory usage 0
    SQLServer:Cursor Manager by Type Cursor worktable usage 0
    SQLServer:Cursor Manager by Type Number of active cursor plans 0
    SQLServer:Cursor Manager by Type Cache Hit Ratio 0
    SQLServer:Cursor Manager by Type Cache Hit Ratio Base 0
    SQLServer:Cursor Manager by Type Cached Cursor Counts 0
    SQLServer:Cursor Manager by Type Cursor Cache Use Counts/sec 0
    SQLServer:Cursor Manager by Type Cursor Requests/sec 0
    SQLServer:Cursor Manager by Type Active cursors 0
    SQLServer:Cursor Manager by Type Cursor memory usage 0
    SQLServer:Cursor Manager by Type Cursor worktable usage 0
    SQLServer:Cursor Manager by Type Number of active cursor plans 0
    SQLServer:Cursor Manager by Type Cache Hit Ratio 0
    SQLServer:Cursor Manager by Type Cache Hit Ratio Base 0
    SQLServer:Cursor Manager by Type Cached Cursor Counts 0
    SQLServer:Cursor Manager by Type Cursor Cache Use Counts/sec 0
    SQLServer:Cursor Manager by Type Cursor Requests/sec 0
    SQLServer:Cursor Manager by Type Active cursors 0
    SQLServer:Cursor Manager by Type Cursor memory usage 0
    SQLServer:Cursor Manager by Type Cursor worktable usage 0
    SQLServer:Cursor Manager by Type Number of active cursor plans 0
    SQLServer:Cursor Manager by Type Cache Hit Ratio 0
    SQLServer:Cursor Manager by Type Cache Hit Ratio Base 0
    SQLServer:Cursor Manager by Type Cached Cursor Counts 0
    SQLServer:Cursor Manager by Type Cursor Cache Use Counts/sec 0
    SQLServer:Cursor Manager by Type Cursor Requests/sec 0
    SQLServer:Cursor Manager by Type Active cursors 0
    SQLServer:Cursor Manager by Type Cursor memory usage 0
    SQLServer:Cursor Manager by Type Cursor worktable usage 0
    SQLServer:Cursor Manager by Type Number of active cursor plans 0
    SQLServer:Cursor Manager Total Cursor conversion rate 0
    SQLServer:Cursor Manager Total Async population count 0
    SQLServer:Cursor Manager Total Cursor flushes 0
    SQLServer:Memory Manager Connection Memory (KB) 2864
    SQLServer:Memory Manager Granted Workspace Memory (KB) 0
    SQLServer:Memory Manager Lock Memory (KB) 7944
    SQLServer:Memory Manager Lock Blocks Allocated 40550
    SQLServer:Memory Manager Lock Owner Blocks Allocated 43550
    SQLServer:Memory Manager Lock Blocks 10003
    SQLServer:Memory Manager Lock Owner Blocks 10133
    SQLServer:Memory Manager Maximum Workspace Memory (KB) 10280520
    SQLServer:Memory Manager Memory Grants Outstanding 0
    SQLServer:Memory Manager Memory Grants Pending 0
    SQLServer:Memory Manager Optimizer Memory (KB) 1048
    SQLServer:Memory Manager SQL Cache Memory (KB) 2080
    SQLServer:Memory Manager Target Server Memory (KB) 13680640
    SQLServer:Memory Manager Total Server Memory (KB) 4024704
    Mohd Sufian www.sqlship.wordpress.com Please mark the post as Answered if it helped.

  • Translate this Sql Server Query into Oracle 9i ?

    UPDATE E
    SET lvl =M.LVL+1
    FROM Employees AS E JOIN inserted AS I
    ON I.empid = E.empid
    LEFT OUTER JOIN Employees AS M
    ON E.mgrid = M.empid

    There is no FROM clause in an ANSI SQL update statement. Folk here don't necessarily know SQL Server, but if you re-write your update statement as an ANSI one and it doesn't work we'll likely be able to help. See page 391 of this doc --
    ANSI SQL 92

  • Converting MS SQL Server Query to Oracle Query

    Hi There,
    I've a strange problem. My project uses both MS SQL Server and Oracle server at run time. I've lot of queries which are written in MS SQL Style. Now, iam planning to write a helper class whic converts MS SQL Query to Oracle Query. Please Help me if any one has that kind of Helper with you.
    Thanks And Regards,
    Sasi Kanth

    That is why persistence applications like Hibernate or
    CMP get used for apps that will use more than one DB,
    but it takes upfront planning.
    If you have a set of automated unit tests that work
    with SQL Server, they will be a big help in getting
    your Oracle code up and running.Indeed - JUnit and Ant would be a big help here.
    It sounds like you have SQL in your JSPs, that will
    work against you as well if so. If you are using a
    DAO pattern, this will be much easier, as you can
    re-implement each DAO for Oracle.If you'd layered this app properly, you might just implement an OracleDAOFactory and be done with it. Interfaces and a DAO layer would go a long way.
    This is why layering is such a good idea. It isolates changes in a smaller subset of classes.
    But your problem sounds pretty big. It'd be daunting even if it were well designed.

Maybe you are looking for

  • Connecting macbook 4.1 to hd tv

    i am trying to watch movies from my macbook on my new hd tv.  first i tried to get external hard drive and connect that through usb. did not work. then i bought the audio cables and the mini display->hdmi cord and the mini display part was too small

  • Order changes not replicate from R/3 to CRM

    Hi, We have Drop shipment scenario, Material availability acknowledgement updated by vendor in Purchase order. Once updated by vendor, material confirmation date & qty will change accordingly and update in ECC sales order but those changes (confirmat

  • Is it possible to view/get the table data from a dump file

    I have dmp files generated using expdp on oracle 11g.. expdp_schemas_18MAY2013_1.dmp expdp_schemas_18MAY2013_2.dmp expdp_schemas_18MAY2013_3.dmp Can I use a parameter file given below to get the table data in to the sql file or impdp the only option

  • Transports from ECC 5.0 to ECC 6.0

    Hello, We are considering using transports from the 5.0 system to make configuration changes in the 6.0 system (and even some workbench items). Besides, the obvious issues with conflicting configuration, is there a technical reason why they should no

  • Error during Java Stack upgrade with SAPINST Tool for Netweaver 04

    Hi, I have updated all the ABAP stack support packages fine. But when i try to upgrade the Java Stack for the BW server using the SAPINST tool, i received an error in the 17th step "Starting J2EE Engine". The error log says: CJS-20057 Starting Java e