Specifying the current database in MSSQL

How do you change the "Current" database using the JDBC:ODBC driver ?
I know you could refer to a table in MSSQL by using database.owner.table but I was wondering if you could specify the current database in some manner ? Can you do it through the connection process ??

I may get confused with the term. I have not been DB programming for a long term. Specially ODBC...
I believe database setting is in ODBC configuration. If you want to connect to two different databases entity (even in the same db server), you may need two distinct ODBC configurations. The rest of the story is interesting but common. so skipped.

Similar Messages

  • Selective XML Index feature is not supported for the current database version , SQL Server Extended Events , Optimizing Reading from XML column datatype

    Team , Thanks for looking into this  ..
    As a last resort on  optimizing my stored procedure ( Below ) i wanted to create a Selective XML index  ( Normal XML indexes doesn't seem to be improving performance as needed ) but i keep getting this error within my stored proc . Selective XML
    Index feature is not supported for the current database version.. How ever
    EXECUTE sys.sp_db_selective_xml_index; return 1 , stating Selective XML Indexes are enabled on my current database .
    Is there ANY alternative way i can optimize below stored proc ?
    Thanks in advance for your response(s) !
    /****** Object: StoredProcedure [dbo].[MN_Process_DDLSchema_Changes] Script Date: 3/11/2015 3:10:42 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- EXEC [dbo].[MN_Process_DDLSchema_Changes]
    ALTER PROCEDURE [dbo].[MN_Process_DDLSchema_Changes]
    AS
    BEGIN
    SET NOCOUNT ON --Does'nt have impact ( May be this wont on SQL Server Extended events session's being created on Server(s) , DB's )
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
    select getdate() as getdate_0
    DECLARE @XML XML , @Prev_Insertion_time DATETIME
    -- Staging Previous Load time for filtering purpose ( Performance optimize while on insert )
    SET @Prev_Insertion_time = (SELECT MAX(EE_Time_Stamp) FROM dbo.MN_DDLSchema_Changes_log ) -- Perf Optimize
    -- PRINT '1'
    CREATE TABLE #Temp
    EventName VARCHAR(100),
    Time_Stamp_EE DATETIME,
    ObjectName VARCHAR(100),
    ObjectType VARCHAR(100),
    DbName VARCHAR(100),
    ddl_Phase VARCHAR(50),
    ClientAppName VARCHAR(2000),
    ClientHostName VARCHAR(100),
    server_instance_name VARCHAR(100),
    ServerPrincipalName VARCHAR(100),
    nt_username varchar(100),
    SqlText NVARCHAR(MAX)
    CREATE TABLE #XML_Hold
    ID INT NOT NULL IDENTITY(1,1) PRIMARY KEY , -- PK necessity for Indexing on XML Col
    BufferXml XML
    select getdate() as getdate_01
    INSERT INTO #XML_Hold (BufferXml)
    SELECT
    CAST(target_data AS XML) AS BufferXml -- Buffer Storage from SQL Extended Event(s) , Looks like there is a limitation with xml size ?? Need to re-search .
    FROM sys.dm_xe_session_targets xet
    INNER JOIN sys.dm_xe_sessions xes
    ON xes.address = xet.event_session_address
    WHERE xes.name = 'Capture DDL Schema Changes' --Ryelugu : 03/05/2015 Session being created withing SQL Server Extended Events
    --RETURN
    --SELECT * FROM #XML_Hold
    select getdate() as getdate_1
    -- 03/10/2015 RYelugu : Error while creating XML Index : Selective XML Index feature is not supported for the current database version
    CREATE SELECTIVE XML INDEX SXI_TimeStamp ON #XML_Hold(BufferXml)
    FOR
    PathTimeStamp ='/RingBufferTarget/event/timestamp' AS XQUERY 'node()'
    --RETURN
    --CREATE PRIMARY XML INDEX [IX_XML_Hold] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index
    --SELECT GETDATE() AS GETDATE_2
    -- RYelugu 03/10/2015 -Creating secondary XML index doesnt make significant improvement at Query Optimizer , Instead creation takes more time , Only primary should be good here
    --CREATE XML INDEX [IX_XML_Hold_values] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index , --There should exists a Primary for a secondary creation
    --USING XML INDEX [IX_XML_Hold]
    ---- FOR VALUE
    -- --FOR PROPERTY
    -- FOR PATH
    --SELECT GETDATE() AS GETDATE_3
    --PRINT '2'
    -- RETURN
    SELECT GETDATE() GETDATE_3
    INSERT INTO #Temp
    EventName ,
    Time_Stamp_EE ,
    ObjectName ,
    ObjectType,
    DbName ,
    ddl_Phase ,
    ClientAppName ,
    ClientHostName,
    server_instance_name,
    nt_username,
    ServerPrincipalName ,
    SqlText
    SELECT
    p.q.value('@name[1]','varchar(100)') AS eventname,
    p.q.value('@timestamp[1]','datetime') AS timestampvalue,
    p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') AS objectname,
    p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') AS ObjectType,
    p.q.value('(./action[@name="database_name"]/value)[1]','varchar(100)') AS databasename,
    p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') AS ddl_phase,
    p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') AS clientappname,
    p.q.value('(./action[@name="client_hostname"]/value)[1]','varchar(100)') AS clienthostname,
    p.q.value('(./action[@name="server_instance_name"]/value)[1]','varchar(100)') AS server_instance_name,
    p.q.value('(./action[@name="nt_username"]/value)[1]','varchar(100)') AS nt_username,
    p.q.value('(./action[@name="server_principal_name"]/value)[1]','varchar(100)') AS serverprincipalname,
    p.q.value('(./action[@name="sql_text"]/value)[1]','Nvarchar(max)') AS sqltext
    FROM #XML_Hold
    CROSS APPLY BufferXml.nodes('/RingBufferTarget/event')p(q)
    WHERE -- Ryelugu 03/05/2015 - Perf Optimize - Filtering the Buffered XML so as not to lookup at previoulsy loaded records into stage table
    p.q.value('@timestamp[1]','datetime') >= ISNULL(@Prev_Insertion_time ,p.q.value('@timestamp[1]','datetime'))
    AND p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') ='Commit' --Ryelugu 03/06/2015 - Every Event records a begin version and a commit version into Buffer ( XML ) we need the committed version
    AND p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') <> 'Replication Monitor' --Ryelugu : 03/09/2015 We do not want any records being caprutred by Replication Monitor ??
    SELECT GETDATE() GETDATE_4
    -- SELECT * FROM #TEMP
    -- SELECT COUNT(*) FROM #TEMP
    -- SELECT GETDATE()
    -- RETURN
    -- PRINT '3'
    --RETURN
    INSERT INTO [dbo].[MN_DDLSchema_Changes_log]
    [UserName]
    ,[DbName]
    ,[ObjectName]
    ,[client_app_name]
    ,[ClientHostName]
    ,[ServerName]
    ,[SQL_TEXT]
    ,[EE_Time_Stamp]
    ,[Event_Name]
    SELECT
    CASE WHEN T.nt_username IS NULL OR LEN(T.nt_username) = 0 THEN t.ServerPrincipalName
    ELSE T.nt_username
    END
    ,T.DbName
    ,T.objectname
    ,T.clientappname
    ,t.ClientHostName
    ,T.server_instance_name
    ,T.sqltext
    ,T.Time_Stamp_EE
    ,T.eventname
    FROM
    #TEMP T
    /** -- RYelugu 03/06/2015 - Filters are now being applied directly while retrieving records from BUFFER or on XML
    -- Ryelugu 03/15/2015 - More filters are likely to be added on further testing
    WHERE ddl_Phase ='Commit'
    AND ObjectType <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND ObjectName NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND T.Time_Stamp_EE >= @Prev_Insertion_time --Ryelugu 03/05/2015 - Performance Optimize
    AND NOT EXISTS ( SELECT 1 FROM [dbo].[MN_DDLSchema_Changes_log] MN
    WHERE MN.[ServerName] = T.server_instance_name -- Ryelugu Server Name needes to be added on to to xml ( Events in session )
    AND MN.[DbName] = T.DbName
    AND MN.[Event_Name] = T.EventName
    AND MN.[ObjectName]= T.ObjectName
    AND MN.[EE_Time_Stamp] = T.Time_Stamp_EE
    AND MN.[SQL_TEXT] =T.SqlText -- Ryelugu 03/05/2015 This is a comparision Metric as well , But needs to decide on
    -- Peformance Factor here , Will take advise from Lance if comparision on varchar(max) is a vital idea
    --SELECT GETDATE()
    --PRINT '4'
    --RETURN
    SELECT
    top 100
    [EE_Time_Stamp]
    ,[ServerName]
    ,[DbName]
    ,[Event_Name]
    ,[ObjectName]
    ,[UserName]
    ,[SQL_TEXT]
    ,[client_app_name]
    ,[Created_Date]
    ,[ClientHostName]
    FROM
    [dbo].[MN_DDLSchema_Changes_log]
    ORDER BY [EE_Time_Stamp] desc
    -- select getdate()
    -- ** DELETE EVENTS after logging into Physical table
    -- NEED TO Identify if this @XML can be updated into physical system table such that previously loaded events are left untoched
    -- SET @XML.modify('delete /event/class/.[@timestamp="2015-03-06T13:01:19.020Z"]')
    -- SELECT @XML
    SELECT GETDATE() GETDATE_5
    END
    GO
    Rajkumar Yelugu

    @@Version : ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
        May 14 2014 18:34:29
        Copyright (c) Microsoft Corporation
        Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    (1 row(s) affected)
    Compatibility level is set to 110 .
    One of the limitation states - XML columns with a depth of more than 128 nested nodes
    How do i verify this ? Thanks .
    Rajkumar Yelugu

  • The error 600 occurred in the current database connection "LCA".

    Hi All,
    User is executing job /SAPAPO/TS_REALIGN_COPY in background,  as soon as the job is released its failing with runtime error:
    I check the Note 1126394 but not relevant.
    Runtime Errors         DBIF_DSQL2_SQL_ERROR
    Exception              CX_SY_NATIVE_SQL_ERROR
    Date and Time          18.08.2011 00:03:39
    Short text
         An SQL error occurred when executing Native SQL.
    What happened?
         The error 600 occurred in the current database connection "LCA".
    What can you do?
         Note down which actions and inputs caused the error.
         To process the problem further, contact you SAP system
         administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
         at and manage termination messages, and you can also
         keep them for a long time.
    How to correct the error
        Database error text........: "POS(1) Work rolled back: BAD_ALLOCATION in
         SAPTS_COPY_DA"
        Database error code........: 600
        Triggering SQL statement...: "EXECUTE PROCEDURE SAPTS_COPY_DATA"
        Internal call code.........: "[DBDS/NEW DSQL]"
        Please check the entries in the system log (Transaction SM21).
    If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "DBIF_DSQL2_SQL_ERROR" "CX_SY_NATIVE_SQL_ERROR"
        "/SAPAPO/SAPLOM_TIMESERIES" or "/SAPAPO/LOM_TIMESERIESU20"
        "/SAPAPO/OM_TS_DATA_COPY"
        If you cannot solve the problem yourself and want to send an error
        notification to SAP, include the following information:
        1. The description of the current problem (short dump)
           To save the description, choose "System->List->Save->Local File
        (Unconverted)".
        2. Corresponding system log
           Display the system log by calling transaction SM21.
           Restrict the time interval to 10 minutes before and five minutes
        after the short dump. Then choose "System->List->Save->Local File
        (Unconverted)".
    Information on where terminated
        Termination occurred in the ABAP program "/SAPAPO/SAPLOM_TIMESERIES" - in
         "/SAPAPO/OM_TS_DATA_COPY".
        The main program was "/SAPAPO/TS_RLG_COPY_SINGLE ".
        In the source code you have the termination point in line 57
        of the (Include) program "/SAPAPO/LOM_TIMESERIESU20".
        The program "/SAPAPO/SAPLOM_TIMESERIES" was started as a background job.
        Job Name....... "/SAPAPO/TS_REALIGN_COPY"
        Job Initiator.. "CIBERNLAPO2"
        Job Number..... 00015100
        The termination is caused because exception "CX_SY_NATIVE_SQL_ERROR" occurred
         in
        procedure "/SAPAPO/OM_TS_DATA_COPY" "(FUNCTION)", but it was neither handled
         locally nor declared
        in the RAISING clause of its signature.
        The procedure is in program "/SAPAPO/SAPLOM_TIMESERIES "; its source code
         begins in line
        1 of the (Include program "/SAPAPO/LOM_TIMESERIESU20 ".
    Kindly suggest any notes or is any setting needs to be modified.
    Regards,
    Kaasi

    Hello Ada,
    the job was aborted due:
    Database error text........: "POS(1) Work rolled back: BAD_ALLOCATION in 
         SAPTS_COPY_DA"
        Database error code........: 600
        Triggering SQL statement...: "EXECUTE PROCEDURE SAPTS_COPY_DATA"
        Internal call code.........: "[DBDS/NEW DSQL]"
        Please check the entries in the system log (Transaction SM21).
    From the posted dump.
    Was it lack of OMS heap memory, memory leaking, program error or huge data selection for application run it's not clear. It will be best for SAP customer to create the SAP message and get SAP support when application canceled due Database error BAD_ALLOCATION in  LCA routine.
    Regards, Natalia Khlopina

  • How to know whether the current database is using a password file or not?

    How to know whether the current database is using a password file or not?

    The remote_password_file is the parameter that determines if you can use or not a password file. The values this parameter can have are NONE, SHARED, EXCLUSIVE. It is pretty obvious, if it is set to either SHARED or EXCLUSIVE the oracle instance has enabled the access through a password file for the SYSDBA and SYSOPER roles.
    ~ Madrid

  • The error "-10401" occurred in the current database connection "LCA"

    Hi everyone,
    I installed livecache 7.7 with scm7.0,when i did postinstallation  Initialization or run t-code lca03,i got error dump as below.now the livecache states is good.in scm server I not installed package Lcapps.please help give your advise,thank you so much.
    untime Errors         DBIF_DSQL2_SQL_ERROR
    xception              CX_SY_NATIVE_SQL_ERROR
    ate and Time          01/20/2010 03:26:32
    Short text
        An SQL error occurred when executing Native SQL.
    What happened?
        The error "-10401" occurred in the current database connection "LCA".
    How to correct the error
        Database error text........: "Conversion of parameter/column (1) would tru
         data"
        Database error code........: "-10401"
        Triggering SQL statement...: "EXECUTE PROCEDURE "APS_PLAN_VERSION_GET""
        Internal call code.........: "[DBDS/NEW DSQL]"
        Please check the entries in the system log (Transaction SM21).
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:

    Hi Natalia,
    thanks for you much help,the livecache version is 7.7.02,so I will try to upgrade to 7.7.04,thank you.
    Server Utilities    d:/sapdb/programs      7.7.02.08     64 bit    valid
    DB Analyzer         d:/sapdb/programs      7.7.02.08     64 bit    valid
    PCR 7301            d:/sapdb/programs      7.3.01.21               valid
    PCR 7500            d:/sapdb/programs      7.5.00.42     64 bit    valid
    SAP Utilities       d:/sapdb/programs      7.7.02.08     64 bit    valid
    APO LC APPS         d:/sapdb/k1p/db/sap    6.00.004      64 bit    valid
    Base                d:/sapdb/programs      7.7.02.08     64 bit    valid
    Redist Python       d:/sapdb/programs      7.7.02.08     64 bit    valid
    JDBC                d:/sapdb/programs      7.6.03.02               valid
    Messages            d:/sapdb/programs      MSG 0.5010              valid
    ODBC                d:/sapdb/programs      7.7.02.08     64 bit    valid
    SQLDBC 77           d:/sapdb/programs      7.7.02.08     64 bit    valid
    Database Kernel     d:/sapdb/k1p/db        7.7.02.08     64 bit    valid
    Loader              d:/sapdb/programs      7.7.02.08     64 bit    valid
    SQLDBC              d:/sapdb/programs      7.7.02.08     64 bit    valid
    Fastload API        d:/sapdb/programs      7.7.02.08     64 bit    valid
    SQLDBC 76           d:/sapdb/programs      7.6.01.15     64 bit    valid

  • The error "-10709" occurred in the current database connection "LEA"

    Hi,
    I've Updated forecast and I have the followoing error message,
    (/SAPAPO/MMSDP)
    Database error text........: "Connection failed (RTE:protocol error)"
    Database error code........: "-10709"
    Triggering SQL statement...: "EXECUTE PROCEDURE LCK_DEQUEUE_OWNER"
    Internal call code.........: "[DBDS/NEW DSQL]"
    Please check the entries in the system log (Transaction SM21).
    the error "-10709" occurred in the current database connection "LEA"
    just after it was ok .
    I knwo LEA is the lock table to the liveache, is there parametes tied to the lock (like R/3 enque/table...?)
    Does someone have an idea of this issue (which happened regulary for the first time this morning, we're SCM 5.0)
    Best Regards,
    John

    John,
    It looks like a support pack issue.
    Check this post, maybe it will help:
    the error "-10401" occurred in the current database connection "LCA"
    Let me know if this was helpful.
    Abhi

  • Error "-602" occurred in the current database connection "R/3*".

    Hi All,
    I am working with Preview 2004s ABAP Trial version ,when load data from PSA to Info cube with help of DTP , getting following error.
    Runtime Errors DBIF_DSQL2_SQL_ERROR
    Except. CX_SY_NATIVE_SQL_ERROR
    Date and Time 20.07.2008 16:04:52
    Short text
    An SQL error occurred when executing Native SQL.
    What happened?
    The error "-602" occurred in the current database connection "R/3*".
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    How to correct the error
    Database error text........: "POS(1) System error: BD Index not accessible"
    Database error code........: "-602"
    Triggering SQL statement...: "INSERT INTO "/BIC/SZD_PROD" ( "/BIC/ZD_PROD",
    "SID", "CHCKFL", "DATAFL", "INCFL" ) VALUES ( ? , ? , ? , ? , ? )"
    Internal call code.........: "DBDS/NEW DSQL"
    Please check the entries in the system log (Transaction SM21).
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    please help me in this
    Kind regards.
    Hari

    Hi All,
    Problem resloved.
    hari

  • Error "-7500" occurred in the current database connection "LCA"

    LC & apo box rebooted due hardware failure now once LC is up then all cif quuese are failing with "An SQL error occurred when executing Native SQL" error. Looking further it indicates lc issue.
    Getting multiple dumps in apo box with :-
    Short text
        An SQL error occurred when executing Native SQL.
    What happened?
        The error "-7500" occurred in the current database connection "LCA".
    What can you do?
        Note down which actions and inputs caused the error.
        To process the problem further, contact you SAP system
        administrator.
        Using Transaction ST22 for ABAP Dump Analysis, you can look
        at and manage termination messages, and you can also
        keep them for a long time.
    How to correct the error
        Database error text........: "POS(1) DCOM HRESULT:APS_COM_VERSION_GET,00000002"
        Database error code........: "-7500"
        Triggering SQL statement...: "EXECUTE PROCEDURE "APS_COM_VERSION_GET""
        Internal call code.........: "[DBDS/NEW DSQL]"
        Please check the entries in the system log (Transaction SM21).
    Steps already taken :-
    1) LC apps start/stop
    2) Index recovery done from DBMGUI
    Any suggestion on this ? Only expert comments please.

    >
    > Steps already taken :-
    > 1) LC apps start/stop
    did you restart liveCache from LC10 -> administration-> ...?
    -any errors in lcinit.log ? (/sapdb/data/wrk/)
    -any errors in knldiag or knldiag.err
    -I would suggest to open SAP message and let them to login and check it
    Regards
    Ivan

  • Install Error (Please explicitly specify the ODBC database)

    I am getting the following error on installation "Please specify the ODBC database..."  I am trying to use a User machine data source and my install will not be allowed because I am getting this error
    PLEASE HELP

    .

  • How to Create a database copy and specify the source database.

    Hello,
    In my dag environment I would like to create a new database copy and specify the source. My company has database copies in 2 locations. Instead of transferring the data from one location to the other, I would like to specify the source be the copy that is
    in the same location.
    Thank you,
    ~Mark

    Hi,
    We can create a mailbox database, then run EMC and EMS to create a database copy.
    More details about Add a Mailbox Database Copy, for your reference:
    https://technet.microsoft.com/en-us/library/dd298080(v=exchg.141).aspx
    Note: please pay attention to Prerequisites section, for example: 
    1. The specified Mailbox server must not already host a copy of the specified mailbox database.
    2. The server hosting the specified database and the server that will host the database copy must both be in the same database availability group (DAG). The DAG must also have quorum and be healthy.
    Thanks
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Allen Wang
    TechNet Community Support

  • Is it possible to read the vROps Database (Oracle / MSSQL)?

    Hi everyone,
    is there a way to access the vROps Database and collect all necessary information's on virtual machines without using the web interface or API.
    There is an Oracle / MSSQL Database which is used by the system, but I guess it's for internal operations only, but it would be much faster to get reports using the db - I guess
    Thanks for any help and clues
    smsys

    The VAs have Postgrs, xDB, FSDB.. etc databases under the covers and they are not directly accessible in any programmatic means other than the vR Ops API. They vApps do not run Oracle or MSSQL.

  • Need help on how to specify the current select row in a View Object

    Hi,
    I have a ADF table on my page, when I was selecting the rows in this table, I want the set and get methods in the ViewRowImpl class to do some customized actions. I found out that each time regardless the row I select in the table, the viewrowimpl class will always return the data in the first row, I tried to use getCurrentRow in VO row impl. but still, gets the first row.
    Does anyone know how to get the selected row value in the View Object, or View Row Impl rather???
    Thanks!

    Hi,
    you can call a method exposed by the AM and pass teh rowKey of the selected row as an argument. When you configure the exposed AM method in the pageDef (creating a method binding) the argument is shown in a dialog from where you can use EL like #{bindings.iteratorName.currentRow.rowKey} to access the current selected row.
    Frank

  • ER: Accessing the Current Database Transaction (11g)

    We need to write some additional code to run DML against databese.
    We need to use a connection object.
    In ADF dev guidesome recomemnd foolowing code. But this method is needed very carefull use . there is many Poolling problem occurs.
    In my opinion a default app module method as getCurrentTransection will be very usefull.
    private Connection getCurrentConnection() throws SQLException {
    /* Note that we never execute this statement, so no commit really happens */
    PreparedStatement st = getDBTransaction().createPreparedStatement("commit",1);
    Connection conn = st.getConnection();
    st.close();
    return conn;
    }

    It is by design that we do not make the "raw" JDBC connection easy to access. We provide DBTransaction methods that allow you to create prepared statements and/or callable statements if you need to. These methods hide the implementation complexity that in a web environment, you might be using a different JDBC connection object on each request, and tries to prevent inexperienced users from accidentally caching a reference to the JDBC connection object somewhere in their code.

  • Failed to open the connection - database vendor code 17

    I'm upgrading a VB.net Windows Forms application from 1.1 to 4.0.  In the reporting form, the list of reports you can choose are pulled from a folder where the .rpt files reside.  Once the user chooses a report and executes it, vb code populates the current database connection information and displays the report in the report viewer control.
    The following things are true:
    - Version 1.1 works on my systems and my customers systems
    - The code has not been changed, except that it now targets .Net 4.0 instead of 1.1
    - The exact same .rpt files are being used
    - Version 4.0 connects to the same database my customer is using, and I can run the reports just fine from here.
    - Version 4.0 is able to connect to the database just fine from my customers systems (using the same connection information provided to the report)
    - My customer installed this:  http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_32bit_13_0_2.zip
    The only problem is that my customer encounters this error when trying to run any report from his systems:
    Failed to open the connection.
    Details:  Database Vendor Code: 17
    Failed to open the connection.
    Orders.BOL.TaskDetail {393C9017-0ED1-4E1E-8824-E222F4B9D14C}.rpt
    Details:  Database Vendor Code: 17
    I read all of the articles I could find, and they either don't describe this exact situation, or there is insufficient information for troubleshooting this issue.  Are there steps that I've missed to make Crystal Reports for VS2010 work on my customer's systems?
    Your help is appreciated,
    Mark

    Hi Mark,
    More information required -
    - Does this happen with all reports or few?
    - What is the connection type used for the report to connect to the database (OLEDB,ODBC etc)
    - Are you changing the database at runtime?
    few things you could check
    - Check if the database is accaessible from the client machine with proper permissions / rights.
    - If its an ODBC connection check if the DSN with same name is created on the client machine.
    - Check the driver / provided used by the report to connect to the DB, verify that the same is installed on the client machine. (SQL NAtive client, SQL Server etc)
    Also take a look at below articles discussing the simillar issue.
    [CR for VS2010: Failed to Open Connection [Database Vendor Code: 17 ]|CR for VS2010: Failed to Open Connection [Database Vendor Code: 17 ]]
    [1474461 - Unknown Database Connector Error when connecting to a Dataset in a VS .NET application |http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333433373334333433363331%7D.do]
    Hope this helps,
    - Bhushan.

  • Retrieve username, Password and current database

    hi all,
    when i m logged in oracle, how can i from PL/SQL get the current user name and the password and the current database. i want this because i wrote a proc with many parameters and to hold the count of this parameters small i thought that the proc retrieve automatically this Infos about the caller (which is the current user).
    is there any way to do this??

    you will get encrypted password with current user by query 1 Can you explain how?
    SQL> show user
    USER is "SYS"
    SQL>
    SQL> select username,password from encrypted_users where username in (select user from dual);
    select username,password from encrypted_users where username in (select user from dual)
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> select * from dba_objects where object_name = upper('encrypted_users') ;
    no rows selected
    SQL> select * from dba_objects where object_name like '%'||upper('encrypted%users')||'%' ;
    no rows selected
    SQL>

Maybe you are looking for

  • Query giving compilation error

    hi, i am confused that my query is working fine on back-end sqlplus, but as i put to use it in my form at pre-form to know count, it gives compilation error; sqlplus SELECT COUNT(*) M_CNT1 FROM( SELECT POH_CODE||'-'||POH_NO CODE,NVL(POH_FREIGHT_lc_am

  • Excise tab on basic excise duty for po

    hi friends, My requirement is : while doing gr in migo for that when we check (item ok - check box)  then condition is : if that po bed is not zero ex 16 % then excise tab has to display else ex 0% excise tab shouldn't appear. Can u plz sujjest on th

  • House move

    I moved house on 14 June and have been without broadband since. I am an existing BT infinity customer and have been expected to continue paying my bills while there has been no connection. I have spent a total of 2 hours on the phone to date and nobo

  • Migrate Oracle/dev 2000 to SQL Server 2000

    We are in the process of doing a case study for moving some of our very small Oracle databases with Dev 2000 front ends to MS Sql Server 2000. I know the Migration Workbench is a tool for moving non-Oracle database sources like Informix and Sql Serve

  • IOS 8.2 update causes iMessage problems

    Before I updated to iOS 8.2, the iMessage feature was working fine, I had no problems with it. Ever since I downloaded it, I can't send iMessages. When I try to turn them on, it says, "An Error occurred during activation. Try again." Please help this