Oracle OLE DB and command Parameters in VB6

Hi,
here's my problem :
When i a VB6 command object ( ado ) this works fine with Oracle client 8i/9i, but with 10g it seems to truncate all my string parameters
Here is my vb code :
Public Function PRC_APPLICATIONSCENARIO _
ByRef p_vConnection As Variant, _
ByVal p_sZlCle As String, _
ByVal p_dDateDeb As Date, _
ByVal p_iDiffdate As Integer, _
ByRef p_sCodeErr As String, _
ByRef p_sErrMsg As String, _
ByRef p_lScenar As Long, _
ByRef p_lSoc As Long _
) As Long
On Error GoTo Err
Dim cmd As ADODB.Command
Dim param As ADODB.Parameter
Set cmd = New ADODB.Command
cmd.ActiveConnection = p_vConnection
Set param = cmd.CreateParameter("iZlCle", adInteger, adParamInput, , CLng(p_sZlCle))
cmd.Parameters.Append param
Set param = cmd.CreateParameter("dDateDeb", adBSTR, adParamInput, , Format(p_dDateDeb, "dd/mm/yyyy"))
cmd.Parameters.Append param
Set param = cmd.CreateParameter("iDiffDate", adInteger, adParamInput, , CLng(p_iDiffdate))
cmd.Parameters.Append param
Set param = cmd.CreateParameter("nCodeErr", adInteger, adParamOutput)
cmd.Parameters.Append param
Set param = cmd.CreateParameter("vErrMsg", adBSTR, adParamOutput, 200, String(200, " "))
cmd.Parameters.Append param
Set param = cmd.CreateParameter("lIdScenar", adInteger, adParamInput, , CLng(p_lScenar))
cmd.Parameters.Append param
Set param = cmd.CreateParameter("lIdSoc", adInteger, adParamInput, , CLng(p_lSoc))
cmd.Parameters.Append param
cmd.CommandText = "{CALL ApplicationScenario" & _
cmd.Execute
this is what i have with 8i ( checking with SQL Monitor ) :
BEGIN ApplicationScenario(:1,:2,:3,:4,:5,:6,:7); END;
:1 = 1
:2 = '01/11/2010'
:3 = 6
:4 = 0
:5 = <NULL>
:6 = 2602
:7 = 1
and this is what i have in 10g :
BEGIN ApplicationScenario(:1,:2,:3,:4,:5,:6,:7); END;
:1 = 1
:2 = '0'
:3 = 6
:4 = 0
:5 = <NULL>
:6 = 2602
:7 = 1
If someone could help me find where i' m wrong, or maybe it's a known bug ?

Hi,
assuming you called the function from a sql select statement (select gf_test from dual;) then the error is as expected, you can't do DML inside a select. Parallel DML is unlikely to be your problem.
I'm a little unclear what you are trying to do with this function though, you could hack it by declaring this an autonomous transaction, but it's unlikely that that is the best way to solve the business problem. If you are trying to find the value of a primary key that is generated from a sequence then the normal way of doing this is to have a before insert trigger that generates the pk for you and then have a pl/sql procedure to do the insert and return the pk to the calling application (which can be powerbuilder or any other language that can call pl/sql.
Niall
Bill Mac wrote:
OK I have managed to get some code to return an error number and this is it:
ORA-14551: cannot perform a DML operation inside a query
Cause: DML operation like insert, update, delete or select-for-update cannot be performed inside a query or under a PDML slave.
Action: Ensure that the offending DML operation is not performed or use an autonomous transaction to perform the DML operation within the query or PDML slave.
The code was:
create or replace function GF_TEST return NUMBER is
retval number;
begin
SET TRANSACTION READ WRITE;
UPDATE parameters
SET last_parent_co = last_parent_co + 1
WHERE (row_no = 1)
RETURNING last_parent_co INTO retval;
COMMIT WORK;
retval := 1001;
return retval;
exception when others then
return sqlcode;
end;
Does that now make any sense to any one? Am I a pdml slave?
Edited by: Bill Mac on 07-Apr-2009 07:38

Similar Messages

  • Oracle 9i R2 and Hyper threading

    Hi
    This is a matter of confusion to me, I've tested Oracle 9.2.0.1.0 on several machines with Hyper threading 1 CPU Intel and Dual Xeon servers.
    When installing oracle the CPU_COUNT and PARALLEL_THREAD_PER_CPU parameters are set automatically.
    ie: Intel 3.0 HT
    CPU_COUNT = 2
    PARALLEL_THREAD_PER_CPU = 2
    Dual Xeon 2.8 HT
    CPU_COUNT = 2
    PARALLEL_THREAD_PER_CPU = 4
    with this default settings our application is dragging it's feet (developped on 4.5 upgraded to 6i client/server)
    But if we set
    CPU_COUNT = 1
    PARALLEL_THREAD_PER_CPU = 2
    for the Intel the app goes lightspeed
    and
    CPU_COUNT = 1
    PARALLEL_THREAD_PER_CPU = 1
    for the xeon again lightspeed
    I didn't face this problem with non HyperThreasding CPUs
    My question:
    Why is this anomoly, what's the workaround without changing the CPU_COUT parameter?
    did anybody else face any problem like this? does this happen in 10g???
    Thanks in Advance
    Tony S. Garabedian

    Any suggestions? Any ideas??

  • Mixing SQL Command parameters and UI created parameters

    Post Author: shecter
    CA Forum: Data Connectivity and SQL
    I'm using Crystal Reports XI.  I've created a report with an SQL Command - no other tables or views. I want to allow my users to be able to choose data from a dynamic parameter and have the SQL read that and spit out the results. I was able to add a parameter to the SQL using the Parameter column in the Command window. This allows my user to type in a parameter. However, when I run the report after creating a parameter using the UI (i.e. Field Explorer/Parameters/right clicking and selecting "new" and then adding the parameter to a field using the selection wizard), i first get a screen that shows me the parameter that I created in the SQL Command window, then I get a screen that shows me the UI created parameters. How can I make it show only one screen with all the parameters?  -Marc 

    Post Author: jenxia
    CA Forum: General
    SQL Command is :
    SELECT UNIQUE ContactID,  incomingAddress,applicationid,
    MediaStatus, MediaDirection, EndDateTime, StartDateTime
    FROM MMCAContactMediaViewwhere EndDateTime>= {?1-reportstarttime}  and  EndDateTime <= {?2-reportendtime}
    Order by ContactID
    Select formula using dynamic prompts as
    {Command.contactid} = {?ContactID} and{Command.applicationid} = {?ApplicationID} and{Command.incomingaddress} = {?IncomingAddress}

  • Increase the SGA_MAX_SIZE and SGA_TARGET parameters

    HI ,
    I am using oracle 10g R2 and windows server 2003 .
    My server is having 8 GB RAM .
    I want to increase the SGA_MAX_SIZE and SGA_TARGET parameters .
    I am using the below command , but getting the error
    SQL> alter system set sga_max_size=2000M scope=spfile ;
    alter system set sga_max_size=2000M scope=spfile
    ERROR at line 1:
    ORA-32001: write to SPFILE requested but no SPFILE specified at startup
    Can someone please help ..

    hi
    connect as sys user and then try...
    first make folder as backup and then copy the old SPFILEorcl to the same folder(backup)
    now you can easily modify the files otherwise you will get error..
    you will find here..
    C:\ORACLE_HOME\database
    SQL>  alter system set sga_max_size=2000M scope=spfile ;
    System altered.OR.
    connect as sys user.
    and do the following...
    1).SQL>create pfile from spfile;
    2).modify the pfile and decrease\increase the size of pools.
    3).shutdown database.
    4). Startup database using created pfile.
    if it start ok then.
    5.) Recreate the Spfile with the created Pfile.
    SQL>create spfile from pfile;sarah

  • Xms and Xmx parameters

    Hi, on a windows machine with jdk1.3 I start oracle's oc4j(standalone) from commandline. I specify Xms and Xmx parameters. Hence;
    java -Xms512M -Xmx512M -jar oc4j.jar
    is the command line command.
    But after I start the app server, when I look at the Window's task manager the java. exe has about 50M memory usage. Is there something wrong???
    Thanks all.

    The best option is to set it in setDomain.cmd/sh OR comEnv.cmd/sh depending on your WLS version, since even if you are starting your manage servers from commandline rather than using nodemanager, it will internally use this to set the environment.
    However if you are using nodemanager, you might try "server start" tab for passing JVM arguments.
    For windows service try the following link:
    http://e-docs.bea.com/wls/docs103/server_start/winservice.html#wp1186212 ----> its for WLS10.3

  • WSL -p and -P parameters

    Hi
    I just want to understand the use of -p and -P parameters in WSL command line i.e. what are advantages/disadvantages of specifying a small ports range? for what purpose this port range is used.
    Regards
    Tariq

    Hi Tariq,
    I think mostly it's a matter of keeping WSH ports out of the way of other ports already in use, and if using a firewall to minimize the number of ports that must be opened through the firewall.
    The purpose of this port range is to specify what ports the WSH processes will listen on to handling workstation clients that are handed off to them from the WSL.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Deprecated and obsolete parameters in 10gR2

    From the oracle documentation, the following initialization parameters have been deprecated or obsoleted in this release. in some cases, oracle specifies what superceded the original parameter but in most cases not. does anyone know how to find out more about what was replaced and by what?
    see the following:
    Appendix A: Initialization Parameters Obsolete in 10g
    ENQUEUE_RESOURCES
    DBLINK_ENCRYPT_LOGIN
    HASH_JOIN_ENABLED
    LOG_PARALLELISM
    MAX_ROLLBACK_SEGMENTS
    MTS_CIRCUITS
    MTS_DISPATCHERS
    MTS_LISTENER_ADDRESS
    MTS_MAX_DISPATCHERS
    MTS_MAX_SERVERS
    MTS_MULTIPLE_LISTENERS
    MTS_SERVERS
    MTS_SERVICE
    MTS_SESSIONS
    OPTIMIZER_MAX_PERMUTATIONS
    ORACLE_TRACE_COLLECTION_NAME
    ORACLE_TRACE_COLLECTION_PATH
    ORACLE_TRACE_COLLECTION_SIZE
    ORACLE_TRACE_ENABLE
    ORACLE_TRACE_FACILITY_NAME
    ORACLE_TRACE_FACILITY_PATH
    PARTITION_VIEW_ENABLED
    PLSQL_NATIVE_C_COMPILER
    PLSQL_NATIVE_LINKER
    PLSQL_NATIVE_MAKE_FILE_NAME
    PLSQL_NATIVE_MAKE_UTILITY
    ROW_LOCKING
    SERIALIZABLE
    TRANSACTION_AUDITING
    UNDO_SUPPRESS_ERRORS
    Appendix B: Initialization Parameters Deprecated in 10g
    LOGMNR_MAX_PERSISTENT_SESSIONS
    MAX_COMMIT_PROPAGATION_DELAY
    REMOTE_ARCHIVE_ENABLE
    SERIAL_REUSE
    SQL_TRACE
    BUFFER_POOL_KEEP (replaced by DB_KEEP_CACHE_SIZE)
    BUFFER_POOL_RECYCLE (replaced by DB_RECYCLE_CACHE_SIZE)
    GLOBAL_CONTEXT_POOL_SIZE
    LOCK_NAME_SPACE
    LOG_ARCHIVE_START
    MAX_ENABLED_ROLES
    PARALLEL_AUTOMATIC_TUNING
    PLSQL_COMPILER_FLAGS (replaced by PLSQL_CODE_TYPE and PLSQL_DEBUG)
    my boss is pushing for explanations and i have no idea how to find the information (i personally am of the school that says if during the database creation, you get warning messages, it's gone and you just accept it...maybe i have been working with oracle too long?)
    Thanks for any assistance.

    Hi,
    Check for these parameters in Oracle9i documentation. There are some mentioning of new parameters to be used for the deprecated parameters. Ofcourse, not all are available.
    HTH
    Regards,
    Badri.

  • Oracle OLE DB 8.1.7.3 entry point kpcddtasg in oracommon8.dll

    I have encountered a problem while installing Oracle OLE DB provider. I have Oracle 8.1.6 server installed.
    After I installed the software the oracle service failed to start and the following error message was given
    "the proceedure entry point kpcddtasg could not be found in the dynamic link library oracommon8.dll"
    Has A.O. else encounered resolved this problem?
    Henry.

    oh ... I forgot to say ..
    when I run query under Enterprise Manager as
    select * from Openquery (db, 'select * from table')
    then it will show me a pop-up message
    "Query Designer encountered a MS Design Tools error:
    ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB provider 'OraOLEDB.Oracle' reported an error.
    [Microsoft][ODBC SQL server Driver][SQL Server][OLE/DB provider returned message: ORA-12545: Connect failed because target host or object does not exist]
    And I follow support.microsoft.com/support/complus/mtsandoracle.asp?SD=GN&LN=EN-US&gssnb=1,setting as follow
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI]
    "OracleXaLib"="oraclient8.dll"
    "OracleSqlLib"="orasql8.dll"
    "OracleOciLib"="oci.dll"

  • Problem to connect between Oracle 10g xe and VB2010 at Vista sp2

    Introduction
    Hi guys, good day... NEED RESCUE!! SOS!! Hmm.. i have trouble been 1 weeks trying connect between Oracle 10g xe and VB2010 on window vista sp2. Actaully im very new at Oracle 10g xe and VB2010 but i got a project is going to build up system database and i figure out Oracle 10g xe and VB2010 can use free so i just chows these appication to be my project. I been search around internet and there is several things i was found about the connection but i has try and tried still it wont work out.
    Things i found and learned
    Oracle
    1. I have download Oracle 10g XE and installed in my windows vista sp2.
    2. I notice the Oracle Developer Tools is needed for VB2010 (To add reference 'Oracle.DataAccess'). So i was downloaded ODT11beta and installed
    3. I also edit TNSNAMES to following below:
    OraDb =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = shin-PC)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    4. My sqlnet like following below:
    SQLNET.AUTHENTICATION_SERVICES = (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    5.I have try tnsping OraDB and its works.
    6. I monitoring task manager and OracleServicesXE is running.
    7. ora_dba is added in Group.
    Problem in SQLPLUS
    When i try connect SQLPLUS in cmd i get ERROR: ORA-12560: TNS:protocol adapter error.
    i . In cmd i type sqlplus and enter then i been ask for username and password.
    ii. After i insert my username and password and enter then i get the error of ORA-12560.
    Visual Basic 2010
    1. First i created my project, drawing label and button for test connection.
    2. Then, i add reference Oracle.DataAccess into my project.
    3. I type following script into my vb form:
    Imports System.Data
    Imports Oracle.DataAccess.Client
    Imports Oracle.DataAccess.Types
    Public Class Logon
    Private Sub cmdLogon_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogon.Click
    Dim oradb As String = "Data Source = OraDb; User Id = system; Password = shin;"
    Dim conn As New OracleConnection(oradb)
    conn.Open()
    Dim cmd As New OracleCommand
    cmd.Connection = conn
    cmd.CommandText = "select SName from Staff where SName = shin"
    cmd.CommandType = CommandType.Text
    Dim dr As OracleDataReader = cmd.ExecuteReader()
    dr.Read()
    lblOra.Text = dr.Item("SName")
    conn.Dispose()
    End Sub
    End Class
    Problem in VB2010
    When i run my project and press the button i get error message ORA-12514: TNS:could not resolve the connect identifier specified at conn.Open()
    Extra Question*
    1. Im notice in my netbook xp home sp2, before i install ODT11beta my sqlplus look fine thought cmd but after i installed ODT11beta its same problem with my Vista sp2 now. Get error ORA-12560: TNS:protocol adapter error :( I tried uninstall ODT11beta again and restart its work fine again. Which i really dun understand. Izzit the version ODT11 is not suitable for 10g xe? And i dunno this problem is related with my connection between oracle 10g xe and vb2010 or not. So confuse@@
    2. I wish to know more about connect between Oracle and VB, is there still a things i miss?(I mean steps or configuration that should i done)
    3. Or i just lower my VB version could make more easy? If yes, what version VB should i use that could work out with oracle 10g xe?
    4. Sorry for too bad my english but i really wish somebody could help me. Please try to understand my written or you could ask me mean if dont understand. Im stuck!! Stuck feel not really that good.....
    Edited by: user9173084 on Jul 19, 2010 3:34 AM

    Huhu..
    Yo, henry
    I thought the OraDb is just a name for entry but im not sure it is a service. I was refer http://www.oracle.com/technology/pub/articles/cook-vs08.html at topic Connection Strings and Objects.
    Here is my lsnrctl service
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
    Instance "CLRExtProc", status UNKNOW has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOW has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "XEXDB" has 1 instance(s).
    Instance "xe", status READY has 1 handler(s) for this service...
    Handler(s):
    "D000" established:0 refused:0 state:ready
    DISPATCHER <machine: SHIN-PC, pid: 1932>
    (ADDRESS=(PROTOCOL=tcp)(HOST=shin-pc)(PORT=49158))
    Service "XE_XPT" has 1 instance(s).
    Instance "xe", status READY has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    LOCAL SERVER
    Service "xe" has 1 instance(s).
    Instance "xe", status READY has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    LOCAL SERVER
    The command completed successfully
    Izzit ok? I notice there is no listed OraDb. but tnsping OraDb seem fine.
    Actually there is somethings as a newbie i wondering long time alreadly ><
    1. The origin of tnsname.ora is no OraDb or ORCL but i just simple add it by open tnsname.ora with notepad. Im just not sure it is function or not.
    Also please check at my TNSNAME.ORA:
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = shin-PC)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    OraDb =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = shin-PC)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    I got the feeling there is so close~~~!!!

  • Oracle portal  session and pl/sql

    Hi all i use portal v.10.1.2.2.0 and i would like to play with a session variable. all i do is
    grant execute on wwsto_api_session to myportal from portal schema. and then i want to do
    l_store := portal.wwsto_api_session.load_session (p_domain, p_sub_domain);
    l_store.set_attribute ('myname', 'name');
    l_store.save_session;
    1) i do not know what is the p_domain, p_sub_domain
    2) when i do wwsto_api_session.get_sub_domain and wwsto_api_session.get_domain i get an error.
    How can i read and write to a variable session in oracle portal? to to like java set session and get session?
    Thank you in Advance,
    Antonis

    [email protected] wrote:
    Hi all i use portal v.10.1.2.2.0 and i would like to play with a session variable. all i do is
    grant execute on wwsto_api_session to myportal from portal schema. and then i want to do
    l_store := portal.wwsto_api_session.load_session (p_domain, p_sub_domain);
    l_store.set_attribute ('myname', 'name');
    l_store.save_session;
    1) i do not know what is the p_domain, p_sub_domain
    2) when i do wwsto_api_session.get_sub_domain and wwsto_api_session.get_domain i get an error."Storage is located by the combination of the domain and subdomain parameters, and the Login session ID.
    If a session store object has not previously been created for this combination of domain, sub-domain, and session ID, then an empty session store object is created and returned. "
    How can i read and write to a variable session in oracle portal? to to like java set session and get session?Hi,
    You may want to see the wwsto_api_session here in [Portal APIs|http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1012/index.html].
    "Working with the session object
    The general procedure for working with the session object is:
    1. Load the session object, with an appropriate domain and sub-domain combination, using the load_session method.
    2. Manipulate the content of the object using the set_attribute methods, or just access its content using the get_attribute methods.
    3. Force these changes to be saved, using the save_session method.
    Typically this sequence occurs within the scope of one client routine that extracts and/or sets all of the client states. For example:
    declare
    l_store portal30.wwsto_api_session;
    l_date date;
    begin
    l_store := portal30.wwsto_api_session.load_session ('PORTAL', 'TEST');
    l_store.set_attribute ('LAST_ACCESSED', sysdate);
    l_store.set_attribute ('USERNAME', 'SMITH');
    l_store.set_attribute ('COUNRTY_CODE', 1);
    l_store.set_attribute ('LOCATION', 'US');
    l_store.set_attribute ('LAST_LOGGED_ON', sysdate);
    l_store.set_attribute_as_string
    ('OFFICE_LOCATION', 'CALIFORNIA', 'US', 'STRING');
    l_store.save_session;
    end;
    The login session that creates the session storage object is defined by wwctx_api.get_sessionid. "
    ref: wwsto_api_session for Portal 10.1.2
    then, look for the functions for getting attributes as number, varchar2, string or index, etc. in the above link.
    hope that helps!
    AMN

  • Slow first connection using Oracle 10g xe and Visual Studio 2008

    {noformat}
    Good day,
    I'm slightly unaccustomed to using forums, so bear with me.
    My initial connection to the Oracle database takes approximately 30 seconds. It seems to be waiting for a connection before timing out and trying another connection which works, as all subsequent connections work immediately. I'm unsure how other people's responses in forums can help me due to the plethora of configurations, so here's mine. My comprehension of the oracle world is still growing, you'll have to explain the terms you're using for me, Hoping you can help.
    I'm using Visual Studio 2008, set to use 32 bit debug mode, on a Windows 7 Pro platform. Also using Oracle 10g Xe, and have installed the 32 bit version of ODAC 11.2 (11.2.0.1) to aid making a connection from Visual Studio to Oracle.
    I have a database set up and a user with system admin rights. This is all local for a programming project and will never see the light of day outside of my personal machine.
    I am using code to connect, not the GUI. I wish to code this project completely without the aid of the GUI. so my connection string within Visual Studio C# is (pw/id hidden)...
    string xe = "Data Source=xe;User Id=xxxxx;Password=xxxxx;";
    OracleConnection conn = new OracleConnection(xe);
    My c:\devsuitehome\network\admin\sqlnet.ora file is this:
    # sqlnet.ora Network Configuration File: C:\DevSuiteHome\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, EZCONNECT, ONAMES, HOSTNAME)
    And my c:\devsuitehome\network\admin\TNSNames.ora file is this:
    tnsnames.ora Network Configuration File: C:\DevSuiteHome\network\admin\tnsnames.ora
    Generated by Oracle configuration tools.
    XE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = xe)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = <machine name)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = PLSExtProc)
    Just for good measure, my tnsping xe shows:
    "Used paramter files:<br/>
    c:\devsuitehome\network\admin\sqlnet.ora<br/><br/>
    Used TNSNAMES adapter to resolve the alias<br/>
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)))(CONNECT_DATA = (SERVICE_NAME = xe)))
    OK (0 msec)"
    So, how can I make that initial connection faster so I don't spend 15 years testing my application due to slow start-ups? :)
    Thank you.
    Kevin.
    {noformat}
    Edited by: 832285 on Jan 29, 2011 10:08 AM
    Edited by: 832285 on Jan 29, 2011 10:10 AM

    I have formatted my hard drive since my first post. I was running window 64 bit with a higher version of the ODAC and that proved to crash my machine with faulty error messages about memory. I have reverted to a previous version of the ODAC tools and everything works very smooth now. Still the connection time is consistently 20 seconds or longer on the first attempt.
    Just a little more information.. I am currently taking a college course with 15 other students, as you can tell by the impersonal machine name, where programming using visual studio 2008, and Oracle 10g xe is expected. All of us are using a 64 bit environment and we all have difficulties cutting down the load time of making the first connection to Oracle. Some people are longer making the connection, but none are shorter.
    One other note. After the first connection is made, taking 20 or more seconds, and is closed, all subsequent openings of the connection are instantaneous, for all of us.
    If there is ANYTHING more I can get for you, please let me know. With my environment stable as it is, I will not need to format or change any information for the foreseeable future.
    Here is the information you requested
    1 The connection method I am using, I have chosen the manual connection for you, however the delay exists if the connection is made through the GUI as well.
    Historically, I am getting slow connection speeds through adding the connection through the GUI or by a manual connection. Here is how I am doing it manually. I have the connection being created in 20 seconds, which is the best I can get.
    Imports Oracle.DataAccess.Client
    Also included project reference: oracle.dataaccess / version 2.111.6.20
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim connString As String = "Data Source=XE;User Id=abc;Password=abc;"
            Dim con As OracleConnection = New OracleConnection()
            con.ConnectionString = connString
            Try
                con.Open()
                MessageBox.Show("Connected!")
                con.Close()
                con.Dispose()
            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try
        End SubMy current TNS Ping results
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 16-FEB-2011 01:02:36
    Copyright (c) 1997, 2005, Oracle.  All rights reserved.
    Used parameter files:
    C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
    OK (0 msec)2 Connection to SQL plus is instantaneous.
    I fought for weeks about the ODAC version 11.2.0.1 that you see in the previous post, and that would be a whole new thread. Suffice it to say I have a reliable environment to program in with this 10.2.0.1.0 version that I am running now, and the connection time has not changed, it is still minimum 20 seconds load time, sometimes up to 25.
    3 Ram usage in my typical environment
    I am running this laptop with 4 gigs of ram. This is a typical environment I would be running my application in.
    Physical memory
    total 4090
    cached 1753
    available 2345
    free 656
    system
    handles 27141
    threads 911
    processes 70
    commit megs 2860/8179
    kernel memory megs
    paged 201
    nonpaged 52
    4 I formatted my machine and reinstalled the Windows 7 professional operating system as of a few nights ago. The Oracle software on my machine is
    Oracle Database 10g express edition
    ODAC 11.1.0
    I amm not sure what filename you would need in addition to the product names that I have installed.
    5 The information from the SET command is
    ALLUSERSPROFILE=C:\ProgramData
    APPDATA=C:\Users\stepheke\AppData\Roaming
    CommonProgramFiles=C:\Program Files\Common Files
    CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
    CommonProgramW6432=C:\Program Files\Common Files
    COMPUTERNAME=STEKEV0908
    ComSpec=C:\Windows\system32\cmd.exe
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Users\stepheke
    LOCALAPPDATA=C:\Users\stepheke\AppData\Local
    LOGONSERVER=\\STEKEV0908
    NUMBER_OF_PROCESSORS=2
    oracle_sid=xe
    OS=Windows_NT
    Path=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Oracleapp\stepheke\product\11.1.0\client_1;C:\Oracleapp\stepheke\product\11.1.0\client_1\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Windows Live\Shared
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    PROCESSOR_ARCHITECTURE=AMD64
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 23 Stepping 10, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=170a
    ProgramData=C:\ProgramData
    ProgramFiles=C:\Program Files
    ProgramFiles(x86)=C:\Program Files (x86)
    ProgramW6432=C:\Program Files
    PROMPT=$P$G
    PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
    PUBLIC=C:\Users\Public
    SystemDrive=C:
    SystemRoot=C:\Windows
    TEMP=C:\Users\stepheke\AppData\Local\Temp
    TMP=C:\Users\stepheke\AppData\Local\Temp
    USERDOMAIN=stekev0908
    USERNAME=stepheke
    USERPROFILE=C:\Users\stepheke
    VS90COMNTOOLS=c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\
    windir=C:\Windows

  • Oracle(tm) Client and Networking Components were not found..

    I installed Oracle 9i Client tools on my machine (Win2000 Server), and successfully installed the Oracle ODBC Driver, however, upon using "Oracle in OraHome92" option in my Administrative Tools System DSN I receive the following error upon attempt to connect to the database with my ASP scripts:
    "The Oracle(tm) client and networking components were not found. These components are supplied by Oracle Corporation and part of Oracle Version 7.3.."
    I also receive the following error on my page:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
    I have tried every trick I know and at this point am out of options. If anyone has a suggestion I'd really appreciate it.
    Thanx
    Phil

    Hi,
    I have been trying to setup Microsoft ODBC drivers on my Win7 64 bit laptop to work with my code.
    Every time it gives me an error msg "Oracle(tm) client and networking components were not found"
    ple help me in this. i have tried downloading and installing odbc driver from oracle site but none work.
    Can someone guide me as which other software need to be install.
    here is the connection string I am using, please help:
    strDBConnString = "Driver={Microsoft ODBC for Oracle};" & _
    "CONNECTSTRING=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST="&THostName&")(PORT="&TPort&"))" & _
    "(CONNECT_DATA=(SID="&TSID&")));Uid="&TUserID&";Pwd="&TPassword&";"
    Thanks

  • How to test oracle is up and running in remote machine using shell script

    Hello,
    I need help to write an linux script.
    I have a java application server running on machine 192.168.5.20 and our oracle 10g standard 1.0.2 is running on machine 192.168.5.21.
    I have found script to start oracle when computer is turned on.
    But I cannot start my application server automatically since it depends on whether oracle is up and running or not on the remote machine.
    Therefore, in case of power failure or maintenance, our client has to call us to start application server.
    I would be grateful if someone can help me "How can I write script to check oracle is up and running in machine 192.168.5.21 from machine 192.168.5.20.
    For your information, I have no oracle installed in application server. So tnsping won't work.
    What I want is when power is back, application server script automatically and tesing for oracle server is up and running. If it is up, script will start application server.
    Thanking you.

    Hi,
    It's not failover or experimental. My application server uses JBOSS and JBOSS needs database name to start up. My enviroment is LAN. My database is in different machine as I mentioned before. So In case of power failure, I need to start my application server (JBoss) manually, because I need to confirm that oracle is already running before start app server.
    I want an automated script (when power is just on) to start my application server which will wait to check if the datbase server is up I will start application server.
    The scripts given above It works if appserver and db server in the same machine (my development machine).
    But when I test the script in my production applicaiton server, It shows sqlplus command not found (my app server does not have any oracle client installed).
    About hostname yes My applicaiton server hostname is hostapp1 and dabase server hostname is hostdat1.
    Do you think Is it possible to test the script without oracle client not installed. or It has to be done writing code like java program and test using jdbc connection.
    Best regards.

  • How to know whether database(oracle) is up and running at OS level

    how to know whether database(oracle) is up and running at OS level...!!!

    depends on the O/S you are using, Unix or Windows? I would use Korn shell script to monitor the Oracle background process and scripts to check of Oracle is accepting connections.
    This UNIX command will show the number of processes for your instance:
    ps -ef|grep $ORACLE_SID|grep -v grep|grep -v ora_|wc u2013l
    In Windows I would look into services.msc

  • Date Formats in Oracle Applications Forms and Oracle Self Service

    Can someone tell me what determines the Date format that appears on Oracle Applications Forms and Oracle Self Service ?
    *1.* In Oracle HRMS,all dates i see on the Forms are of the Format "MM/DD/YYYY" but my NLS Parameters are not in this format .I'm giving the results for the NLS parameters below.I thought the date formats are determined by the NLS format.Is there something else that determines the date format appearing on Oracle Applications Forms ?
    NLS_DATABASE_PARAMETERS
    NLS_DATE_FORMAT     :DD-MON-RR
    NLS_DATE_LANGUAGE     :AMERICAN
    NLS_LANGUAGE     :AMERICAN
    NLS_TERRITORY     :AMERICA
    NLS_INSTANCE_PARAMETERS
    NLS_DATE_FORMAT     :DD-MON-RR
    NLS_DATE_LANGUAGE     :
    NLS_LANGUAGE     :american
    NLS_TERRITORY     :america
    NLS_SESSION_PARAMETERS
    NLS_DATE_FORMAT     :DD-MON-RR
    NLS_DATE_LANGUAGE     :
    NLS_LANGUAGE     :american
    NLS_TERRITORY     :america
    *2* What about the profile option : ICX_DATE_FORMAT_MASK ? Does it determine the Date Format for Self Service alone or does it impact the date format appearing on Oracle Applications Forms and the actual database also ?
    *3* If I use a to_date function in ,say, a pl/sql function that i code for some custom requirements,what will be the output of the date format ? Does it take the format given in NLS paramaters or is it determined by anything else?
    Thanks in advance...

    Hi,
    Thanks for your reply ,but I'm still confused ..
    Here are the profile options I'm seeing for one of my instance :
    ICX: Date format mask - 12/31/1999
    ICX: Date language - American English
    ICX: Language - American English
    ICX: NLS Sort - BINARY
    ICX: Territory - United States
    ICX: Numeric characters - NULL
    NLS parameters are given in my original email.
    In Self Service applications(OAF) ,the date format is appearing in "mm/dd/yyyy" format but when i login to Forms based applications ,I see the date format as "dd-mon-yyyy".What determines this date format ?
    How can i make the date format to always return one format everywhere ,be it Self Service (OAF) or Oracle Forms ?
    I'm getting date format related errors for my code because of default date formats changing intermittently when i log into Self Service.I want to know if there is anyway to prevent this from happening?
    Thanks in advance.

Maybe you are looking for

  • ICal 10.6.8 Server Account can't setup on Maverick 10.9

    Hi, My company have 10.6.8 Snow Leopard Server and some services work on (OD, SMB, Vpn, iCal etc.) Last week we bought a new mac. And Mac has been installed 10.9 (Maverick) While setup iCal (CalDAV Account) i had an error message. "An unknown error"

  • IWeb+.mac does it have an advantage ?

    I want to create a couple of sites with iWeb+.mac One is a photo gallery and another gemstone jewelry, which is also based on a lot of images. I have a gallery on Pbase, but the overall look is pretty plain and old style, not like zenfolio for exampl

  • How do I sync my new iPhone if my computer is not working?

    I want to upgrade my iPhone 4 to the new iPhone 5. My computer is not working to enable me to sync my music and other data. What can I do?

  • Material shortage report after mrp run.

    Dear Experts , we have a requirement where we need to develop the material shortage alv report, when i searched in SCN i got information like we can achieve this by using the functional module MD_STOCK_REQUIREMENTS_LIST_API. as i am beginner i dont h

  • Error while creating context

    Hi Following is the code where I am getting connection from pool. package com.iflex.fcat.gaurav; import     javax.naming.Context; import     javax.naming.InitialContext; import     javax.sql.DataSource; import      java.util.Properties; import     ja