Oracle 10G Slow Disk Writes

We have currently purchased a "SUN SPARC Enterprise T5220" with 2 x 146GB 10K RPM SAS and 2 x 72.8GB 10K RPM SAS disks. I have installed Oracle 10g and created a datbase. The TEMP tablespace and REDO logs and data files all reside on dedicated disks. I have mounted the TEMP, REDO and Datafile filesystems as forcedirectio and set the Oracle setting FILESYSTEMIO_OPTIONS to "SETALL". The speed when writing to disk seems very slow, most of the top waits on the database are for "log file parallel write", "db file parallel write", "direct path write temp",
cann anyone advise on what I might have done wrong.

Why do directIO on a local disk. DirectIO should be used when you are using a disk array that has cache on it to avoid the double cache hits (IE system cache hit one and then the cache hit on the array).

Similar Messages

  • What mechanism Oracle 10g use for write (Insert/ Update) and Read (Select)?

    Hi
    What mechanism Oracle 10g use for write (Insert/ Update) and Read (Select)?
    Thank you

    Aren't the answers given in PL/SQL forum sufficient enough?Well, as the first answer in that forum directed the OP to this forum you can hardly blame them for the repost.
    There is some high-level stuff in the Concepts Guide. If that is insufficient the OP will need to tell us what more details they need to know (and perhaps why).
    Cheers, APC

  • Oracle 10g direct path write too slow

    Hi All,
    We have Oracle 10g on a Solaris virtual server, VMWare ESXi being the host. Data files are on RAID1, internal storage on a HP DL585 with VMFS partition at ESXi level. Problem is that DB writes for a CREATE TABLE as SELECT... statement is way too slow. To create a table which is 0.5 GB, DB takes 9 minutes which amounts to 1 MB/s. When we check for FTP or file copy at Solaris level with same size file (0.5 GB), it flies through in less than a minute. This is Oracle 10.2.0.4, 8K data block, 2 vCPU assigned to the Solaris VM. Have checked with VMWare support for any known issues and also have SR open with Oracle for any param changes that can help speed up things. Any clues or pointers from you all will be of great help.
    Thanks,
    Nikhil

    Here's the output from tkprof for waits
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    single-task message 1 0.17 0.17
    SQL*Net message to dblink 150 0.00 0.00
    SQL*Net message from dblink 150 0.04 0.32
    SQL*Net message to client 1 0.00 0.00
    direct path write temp 4003 1.16 804.93
    direct path read temp 2563 0.14 35.86
    SQL*Net more data from dblink 126967 0.17 11.81
    SQL*Net message from client 1 17.73 17.73
    Direct Path write temp has total waits of 804.93. Also, I am NOT looking to tune a particular SQL. Database is overall slow on VMware and I am looking for any gotchas for running Oracle 10g within a Solaris VM.
    Thanks,
    Nikhil

  • Slow disk writes VM 3.1

    I know I must have something configured wrong but I can't figure it out.
    I have tested disk write access on my VM servers in V2.2 and V3.1, using these commands:
    hdparm -tT /dev/mapper/<lun>
    and
    dd if=/dev/zero of=output.img bs=8k count=256k
    the output is very close between the V2.2 and V3.1 servers, so that's good.
    But then when I execute those command on the actual VMs themselves within the 2.2 and 3.1 environments, I get different results.
    The hdparm command is still equivalent between the two.
    But the dd command shows my old V2.2 VMs getting around 650mb/s while my new V3.1 VMs are getting between 8mb-30mb/s. Does anyone have an idea off the top of their head why this would be?
    Oh, I just tried one more thing... most of my V3.1 VMs were converted from V2.2 via template import. I just tried the same commands on a couple of new VMs I made in V3.1 (from OL6-64bit templates) and they returned 360mb/s and 750mb/s. So I wonder what's wrong with the VMs that I converted from VM2.2?

    Hi there,
    We're having exactly the same problem as you appear to have experienced. Very slow write I/O in guest VMs (domU) but fast I/O on the host on the same iSCSI file system.
    Write I/O inside the guest is between 3-20MB/sec (dd bs=2048k count=512), whereas on the host its 95MB/sec - which is hitting the practical limits of our GigEth iSCSI SAN.
    I've checked inside the guests and can see no problems of write caches being disabled in dmesg. Curiously we hit this same wall on both a RHEL6.3 and Solaris10U10 guest.
    I've tried both sparse and non-sparse files and the performance is the same. Read performance is fine, but this write bottleneck is a showstopper. Would appreciate any assistance you guys might have while I await a response from Oracle..
    Setup:
    - Oracle VM 3.1.1 update 485
    - Sun Fire X4150 Server
    - Sun Storagetek 2510 iSCSI SAN

  • Oracle 10g increase disk space

    Hi all,
    I am very new with oracle and can not find an answer to this question:
    Is it possible to increase the disk space after installation, e.g. by configuring of an additional disk?
    (If yes, in what way)
    The scenario is:
    After some time after our Oracle installation the disk wiil be full and we wiil need to increase the disk space without to lose the existing data.
    Many thanks in advance!
    Pita

    Hi,
    first of all - thanks a lot for your help and new questions :)
    -- You can add a datafile to the existing tablespace keeping the new datafile to the location where there is enough space.
    What is about the old datafile (old data), can I keep two data files assingded to the single tablespace?
    -- 1)You can use 3rd party tools like Acronis Disk Director Suite to increase the drive space without formatting
    2)You can have new drive and you can move your datafiles to that new drive.
    I don't want to copy the existing data to the new drive.
    Is it possible to configure an additional drive for the same tablespace
    Best regards,
    Pita

  • Oracle 10g AS report writer needs InfraStructure?

    We need to install Oracle 10g AS on HP-UNIX. But the requirement would be only Forms & Report Services (Business Intelligence). The reports will be web based and as well as it will be generated using rwrun command line utility. Therefore is it enough to have "Oracle application server Forms and Reports services" installation alone or we need to install the "Infrastructure" in addition to this?
    Can any one help on this?

    Hi,
    You need to install infrastructure first to install the Forms & Reports. Actually, OID gets installed with infrastructure, and thus need to install it.
    SSO will be on for the report server, thus when you use rwclient or rwrun you have to use the authid.
    Regards,
    Soumyajit

  • Oracle 10G slow Performance on Windows 2003 Server

    Hi there,
    Looking for a little assistance in locating a bottleneck that's started to hit our system this week. It's really odd because it's been starting around 10am every morning this week.
    today is the worst that I've seen it because it's almost brought the system to a halt.....
    We're running Oracle 10.2.0.1 64b on Windows 2003 Server 64
    The server has 16 processors and 64GB of RAM currently the CPU is sitting at 5% and the RAM usage is at 16.4GB
    It's a blade server with a SAN backend and I'm assuming the latency is coming from the disk but I need to determine this for a fact.
    I've only been a DBA for about a year and I'm stilling learing how to locate and identify issues. According to OEM I'm seeing
    a ton of I/O from the users. So anyways, any help or insight would be much appreciated and a learning experience for me.
    Thank you for your time and asistance.
    SB

    Thank you for the reply!
    We've had finding one FOREVER, I can't resolve it and I've read somewhere to ignore because OEM is false reporting. I'm adjusting DB_Cache now...
    Isn't possible that too much cache could be bad for the system and cause slow downs?
    FINDING 1: 100% impact (29725 seconds)
    Significant virtual memory paging was detected on the host operating system.
       RECOMMENDATION 1: Host Configuration, 100% benefit (29725 seconds)
          ACTION: Host operating system was experiencing significant paging but no
             particular root cause could be detected. Investigate processes that
             do not belong to this instance running on the host that are consuming
             significant amount of virtual memory. Also consider adding more
             physical memory to the host.
       RECOMMENDATION 2: DB Configuration, 100% benefit (29725 seconds)
          ACTION: Consider enabling Automatic Shared Memory Management by setting
             the parameter "sga_target" to control the amount of SGA consumed by
             this instance.
    FINDING 2: 51% impact (15210 seconds)
    The buffer cache was undersized causing significant additional read I/O.
       RECOMMENDATION 1: DB Configuration, 9% benefit (2685 seconds)
          ACTION: Increase the buffer cache size by setting the value of parameter
             "db_cache_size" to 7568 M.
       ADDITIONAL INFORMATION:
          The value of parameter "db_cache_size" was "6912 M" during the analysis
          period.
       SYMPTOMS THAT LED TO THE FINDING:
          SYMPTOM: Wait class "User I/O" was consuming significant database time.
                   (84% impact [25073 seconds])

  • Oracle 10g XE migrate from 32bit to 64bit becomes slower

    Oracle 10g XE migrate from 32bit to 64bit becomes slower
    Currently we have a database using Oracle 10g XE R2
    (Oracle Database 10g Express Edition Release 10.2.0.1.0)
    on a linux 32bit server.
    And recently we did migrate it to another 64bit linux server.
    But found after migration is it running slower at 64bit server (~ 25% slower)
    1. We would wonder any tuning is required on 64bit server?
    Besides, as I know Oracle XE only using single core CPU for processing.
    On 32bit linux the CPU is Intel(R) Xeon(R) CPU E31235 @ 3.20GHz
    On 64bit linux the CPU is Intel(R) Xeon(R) CPU E5-2470 v2 @ 2.40GHz
    2. Would the CPU clock speed on a single core also made the 64bit Oracle slower?
    Thanks a lot.

    32 or 64 bit normally won't cause much performance difference as long as you can't use > 4GB RAM
    Please note that XE can use only 1 core and 1GB memory.
    According to benchmarks, Single Thread Rating of the 2 CPU really differ by around 25%. Quite consistent with your observation.
    Of course, IO (i.e., disk) speed is also an important factor.
    https://www.cpubenchmark.net/cpu.php?id=2003
    https://www.cpubenchmark.net/cpu.php?id=1200

  • Oracle 10g RAC install on OEL5 update 5 OUI failing to write on tmp fs

    Dear Friends,
    I am attempting to install Oracle 10g R2 on Oracle Enterprise Linux 5 update 5 but facing some errors. Can't believe i have done everything right as far as oracle docs n my understanding concern. when i try to invoke runInstaller for CRS it fails with following error:
    [oracle@server01 clusterware]$ ./runInstaller
    Starting Oracle Universal Installer...
    Checking installer requirements...
    Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
    Passed
    All installer requirements met.
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-11-15_04-36-47PM. Please wait ...[../stage/Components/oracle.swd.oui.core/10.2.0.1.0/1/DataFiles/filegroup1.jar]
    End-of-central-directory signature not found. Either this file is not
    a zipfile, or it constitutes one disk of a multi-part archive. In the
    latter case the central directory and zipfile comment will be found on
    the last disk(s) of this archive.
    note: ../stage/Components/oracle.swd.oui.core/10.2.0.1.0/1/DataFiles/filegroup1.jar may be a plain executable, not an archive
    Error in writing to directory /tmp/OraInstall2010-11-15_04-36-47PM. Please ensure that this directory is writable and has atleast 60 MB of disk space. Installation cannot continue.
    : Success
    [oracle@serverr01 clusterware]$
    I am also attaching the cluster verfication result, if you wish to have a look at this.
    Please let me know if you see any pointers.
    Many Thanks

    hi
    did you extract the zip file without any errors and with oracle user?
    is the /tmp full? post "df -h"
    you can manually set another temp directory using "export TMPDIR=/any/path"
    hth

  • Query can run in Oracle 10g but very slow in 11g

    Hi,
    We've just migrated to Oracle 11g and we noticed that some of our view are very slow (it takes seconds in 10g and takes 30 minutes in 11g), and the tables are using the local table.
    Do any of you face the same issue?
    This is our query:
    SELECT
    A.wellbore
    ,a.depth center
    ,d.MD maxbc
    ,d.XDELT xbc
    ,d.YDELT ybc
    ,e.MD minac
    ,e.XDELT xac
    ,e.YDELT yac
    from
    table_A d,table_A e, table_B a
    where a.wellbore = d.WELLBORE (+)
    and a.wellbore = e.WELLBORE(+)
    and d.MD = (select max(MD) from table_A b where b.MD < a.depth and
    d.wellBORE = b.wellBORE)
    and e.md = (select min(md) from table_A c where c.MD > a.depth and
    e.wellBORE = c.wellBORE);

    Thanks I will move to the correct one..
    Rafi,
    Build the Indexes and it is still slow. I am querying from a view from another database, which is in 10g instances.
    Moved: Query can run in Oracle 10g but very slow in 11g
    Edited by: 924400 on Apr 1, 2012 6:03 PM
    Edited by: 924400 on Apr 1, 2012 6:26 PM

  • My computer slows down and hangs after installing oracle 10g

    My computer just slows down after installing oracle 10g. I have a pentium 4 3ghz with 512 memory (32 mb used by graphics built in card). It slows down and hanged even if I agjusted the swap memory to 800 mb. I have two swap file/page file - in drive c and drive d. I even cannot shut it down because it takes maybe 30 minutes just to see the "shut-off/log-off" screen.

    Before starting up Oracle, when you go to the task manager, how much RAM does it show actually free? 512 MB is pretty small to run Oracle in the first place-- Windows and Office can use a fair chunk of RAM themselves, depending on which Office apps you are running. You may also be suprised by the amount of RAM that a web browser, email client, and the various other apps that folks generally install can use.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • 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

  • How to write Inline queries in Oracle 10g

    Hi all,
    The following Procedure is written in SQL Server 2005 . It uses Inline queries and executes it in the end . I want to write the same stored procedure in Oracle 10g.
    Could you guys please help me in doing the same .
    CREATE PROCEDURE [dbo].[proc_MDM_ShowDetails]
    @MASTERCODE VARCHAR(50),
    @MDMCode VARCHAR(50),
    @IsDrpDwnFill BIT,
    @CntryCode INT,
    @StateCode INT,
    @CityCode INT = 0,
    @GetParent INT = 0,
    @PinCode BIT = 0
    AS
    BEGIN
    DECLARE @strSQL VARCHAR(4000)
    DECLARE @TableName VARCHAR(4000)
    SET NOCOUNT ON;
    SELECT @TableName = MASTER_TABLE FROM MDM_MASTER WHERE MASTER_CODE=@MASTERCODE
    IF @IsDrpDwnFill = 0 AND @CntryCode = 0 AND @GetParent = 0
    BEGIN
    SET @strSQL = 'SELECT M.*,H.* FROM ' + @TableName + ' M LEFT JOIN MDM_HIERARCHY H ON M.MDM_MASTER_CODE=H.MASTER_CODE WHERE M.MDM_CODE=' + @MDMCode
    END
    ELSE IF @CntryCode = 0 AND @IsDrpDwnFill = 1
    BEGIN
    SET @strSQL = 'SELECT MDM_DESCRIPTION,MDM_CODE FROM ' + @TableName + ' WHERE MDM_STATUS=' + '''' + 'approved' + '''' + ' AND MDM_EXIST=1'
    END
    ELSE IF @CntryCode > 0 and @GetParent = 0
    BEGIN
    SET @strSQL = 'SELECT M.MDM_DESCRIPTION,M.MDM_CODE,H.* FROM ' + @TableName + ' M INNER JOIN MDM_HIERARCHY H ON M.MDM_MASTER_CODE=H.MASTER_CODE WHERE MDM_STATUS=' + '''' + 'approved' + '''' +
    ' AND MDM_EXIST = 1 AND MDM_PARENT_CODE =' + str(@CntryCode)
    END
    ELSE IF @StateCode > 0 and @GetParent = 0
    BEGIN
    SET @strSQL = 'SELECT MDM_DESCRIPTION,MDM_CODE FROM ' + @TableName + ' WHERE MDM_STATUS=' + '''' + 'approved' + '''' +
    ' AND MDM_EXIST = 1 AND MDM_PARENT_CODE =' + str(@StateCode)
    END
    ELSE IF @CityCode > 0 and @GetParent = 0
    BEGIN
    SET @strSQL = 'SELECT MDM_DESCRIPTION,MDM_CODE FROM ' + @TableName + ' WHERE MDM_STATUS=' + '''' + 'approved' + '''' +
    ' AND MDM_EXIST = 1 AND MDM_PARENT_CODE =' + str(@CityCode)
    END
    ELSE IF @PinCode = 1 and @GetParent = 0 and @IsDrpDwnFill = 1
    BEGIN
    SET @strSQL = 'SELECT MDM_DESCRIPTION,MDM_CODE FROM ' + @TableName + ' WHERE MDM_STATUS=' + '''' + 'approved' + '''' +
    ' AND MDM_EXIST = 1 '
    END
    ELSE IF @GetParent > 0
    BEGIN
    SET @strSQL = 'SELECT * FROM ' + @TableName + ' WHERE MDM_STATUS=' + '''' + 'approved' + '''' +
    ' AND MDM_EXIST = 1 AND MDM_CODE =' + str(@GetParent)
    END
    EXEC(@strSQL)
    SET NOCOUNT OFF;
    END
    Thanks
    Shobhit

    Hi,
    I dont know sql server 2005. But by observing it I feel you are generating sql dynamically based on condition inside the proc.
    DECLARE
       TYPE EmpCurTyp IS REF CURSOR;
       emp_cv   EmpCurTyp;
       emp_rec  employees%ROWTYPE;
       sql_stmt VARCHAR2(200);
       v_job   VARCHAR2(10) := 'ST_CLERK';
    BEGIN
       sql_stmt := 'SELECT * FROM employees WHERE job_id = :j';
       OPEN emp_cv FOR sql_stmt USING v_job;
       LOOP
         FETCH emp_cv INTO emp_rec;
         EXIT WHEN emp_cv%NOTFOUND;
         DBMS_OUTPUT.PUT_LINE('Name: ' || emp_rec.last_name || ' Job Id: ' ||
                               emp_rec.job_id);
       END LOOP;
       CLOSE emp_cv;
    END;something like this it will be. it is in oracle documentaion
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/dynamic.htm#i14500

  • Index rebuilding slow in Oracle 10g

    We are trying to build indexes in Oracle 10g and its extremely slow. Any pointers to find out what the problem is and then fixing it?
    I am using a syntax like:
    alter index INDEX_NAME rebuild tablespace TABLESPACE_NAME online compute statistics parallel;
    Should online and parallel together be an issue? (I don't necessarily need to do online, I just removed online and started again, but not sure how it will go)

    user8294047 wrote:
    We are trying to build indexes in Oracle 10g and its extremely slow. Any pointers to find out what the problem is and then fixing it?
    I am using a syntax like:
    alter index INDEX_NAME rebuild tablespace TABLESPACE_NAME online compute statistics parallel;
    Should online and parallel together be an issue? (I don't necessarily need to do online, I just removed online and started again, but not sure how it will go)In addition to the advices you've already got regarding index rebuilding in general:
    If you're using the ONLINE rebuild option it might take a while if there are active transactions on the table, since it waits until no transactions are active to start the rebuild process, the same applies to the completion of the ONLINE operation.
    Of course, you should get an "ORA-00054 resource busy" error when this is the case when using the normal (offline) rebuild option without the ONLINE keyword.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Oracle 10g xe:  speed is very slow

    Hi
    I ve just migrated my application to oracle 10g xe but i found this small server very slow even not only slow but it holds all the resources of the pc that is running oracle 10g xe server. My application is a product and can be run on single pc. Can any body tell me how can i tune 10g xe to get my pc faster and what is the minimum requirement for 10g xe server because it is very problem for me to ask every customer to have 2.0 GHz pc with 1GB ram. At the moment i am use 1.7 GHz pc with 256 MB ram but it is horribly slow on it.
    Regards
    Faheem

    256 MB of RAM is the minimum that Oracle will even install in (512 MB if you're using Vista). Assuming that the installer defaults to reasonably minimal memory configurations in that sort of environment (which I've not tested but seems reasonable given the defaults I've seen it choose), are you running anything other than Oracle on this machine? Since you're so close to the lower limit on hardware resources, running other applications at the same time Oracle is running could well be forcing it to page RAM at a frantic clip. If you're seeing a log of swapping going on and you have to run the other applications that are consuming RAM, you may be able to decrease Oracle's RAM utilization by decreasing the cache size, though that may have its own set of negative performance implications.
    It's been a while since I've seen a business that had machines with only 256 MB of RAM in regular use. Heck, my web browser regularly uses 50 or 60 MB of RAM. If you are targetting that older hardware, though, you may want to consider other databases. Oracle Lite, for example is designed for small footprint applications.
    Justin

Maybe you are looking for

  • Sobre alguns problemas que estou tendo com o mozila que não é somente no meu computador..

    estou achando que isso pode ser caso de processo! no pesquisador do google, quando entra em uma pagina e volta, a tela esta ficando toda branca, estou percebendo que isso não é apenas comigo em outros computadores tmbém está assim, que pode ser algo

  • API for creating new User in Oracle E-Business Suite through BPEL

    Hello, I would like to use a BPEL process to create a new User in Oracle E-Business Suite. In the Integration Repository I was able to find an API called FND_USER_PKG/LOAD_ROW that creates/updates Application's User data. Is this the API I should be

  • Flat  file to upload data using BDC for transaction MM01

    Hi I am trying to update data using bdc code has been attached below using a txt file. It is updating the first set of data into the table mara ,but  for the rest it is not All the data from txt file has being loaded to internal table , but the probl

  • Navigation and linking

    How do I make a link inside an applet to a new page. For instance I have a button in an applet that I want to act like a link in html. How do I make it link?

  • Error Installing EBS R12 again

    Hi hussein, I am installing again on the test server EBS R12.1.1 and during the unzipping of database file (2 of 5) I got error : [doc] Database logfile - /media/usbdisk/oraprod/VIS/db/tech_st/11.1.0/appsutil/log/VIS _dellsvr/10051004.log AC-10006: E