Limit usage in SQL

I'm using OBIEE 11.1.1.5 and I want to add to my generated SQL towards the DB limitation on returning number of records.
Can I add some TOP or LIMIT command?
I tried adding in the postfix (advanced tab) but it failed.

Is there, maybe, some configurable parameter for max rows allowed to receive from DB, or something like that?

Similar Messages

  • High memory usage in SQL Servers

    Hi,
    I have few SQL servers which are having memory utilization more than 95% when checked in task manager.
    Servers OS - Windows server 2008 R2
    SQL Sever 2008 and SQL Server 2012
    AWE option is not enabled, Min memory setting  - 1 GB and Max memory setting - 80% of the total memory in server.
    SQL process is using less than max memory, when checked in task manager. So i was thinking where is remaining memory.
    Used RAMMAP tool and found memory in AWE, even if i disabled AWE in SQL Server. Please let me know how to avoid AWE.

    Hi,
    Task manager does not always show you correct value so I would advise you not to loot at task manager but in this case since you SQL Server service account does not have Locked pages in memory privilege(LPIM) task manager can be referred
    please use below query to see SQL Server memory utilization
    select
    (physical_memory_in_use_kb/1024)Memory_usedby_Sqlserver_MB,
    (locked_page_allocations_kb/1024 )Locked_pages_used_Sqlserver_MB,
    (total_virtual_address_space_kb/1024 )Total_VAS_in_MB,
    process_physical_memory_low,
    process_virtual_memory_low
    from sys. dm_os_process_memory
    Is your SQL server 64 bit version, then no need to enable AWE option.
    Its totally normal behavior for SQL Server to utilize memory. It can also utilize memory greater that what is limit in max server memory setting as this only controls buffer pool allocation.
    You can reduce max server memory value IF you really want SQL Server memory utilization in tak manager to come down. But I would again say its normal.
     What is max server memory value anyway?
    How much you have left for OS on atleast 5-6 G id required for OS. Value may vary.
    >>SQL process is using less than max memory, when checked in task manager. So i was thinking where is remaining memory
    SQL Server caches memory to store as much data and index pages(in memory)  as possible to avoid any physical I/O which is costly and once taken memory it will not release unless SQLOS asks it to do so . It will start trimming its mmeory consumption when
     SQLOS says it to do because of some memory pressure or other requirement. The process is totally dynamic and is managed perfectly so you dont need to worry.
    More about SQL Server memory and troubleshooting
    http://social.technet.microsoft.com/wiki/contents/articles/22316.sql-server-memory-and-troubleshooting.aspx
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Is there any way to limit usage on certain jetpacks?

    Hi~
    I have a shared everything plan 40GB.  I live in the middle of nowhere.  I homeschool and need to do a lot online. Area monopolized by satellite which is an awful but necessary evil.  When it rains, forget TV or internet.  They do still offer dialup.  Ha!  Anyway, so I chose this plan and it has been "okay".  The signal is spotty and the 4G I was told I would get is hardly what I get on my phone when I am in the main cities.  Still, we make do. 
    Here is my current dilemma.  My elderly mother in law is staying with us for... a while.  She is not a pro, but she can certainly get online.  Of course, I have passwords (of my own making).  My kid put a password on her laptop when she said she needed to check email.  Well, it turns out that granny likes to play online games.  The ones that stream.  She sucked up all 40 GB in a few short days.  Uploads, downloads, you name it.  She has been told time and again that the usage was OVER.  That she had to wait for it to roll over.  She was still going online.  I was in a panic with the emails about overages, etc.  I had to disconnect the boxes and take out the batteries, just to be sure.
    I do know that the boxes can be configured to only work with the mac addresses you designate.  That's great.  I did that with the first one, but not yet with the newer one, b/c it was only my husband, myself and kids-we are all VERY clear on usage.  So, yeah..the one she has been using is the newer one b/c we trusted she would listen to what we told her.
    My question is this:  Is there any way that I can create a dedicated user "account & password" to her and then limit THAT usage?  I know something kind of like this can be done for kids phones, but no clue about boxes.  I really don't want to have to block her, but I cannot afford to sacrifice my kids education b/c she wants to play games.  My spouse will never deny his mom anything, but he gets mad when told the usage is gone after a week.  My usage is about to roll over again and I NEED it. 
    I asked a rep on "live chat" & they couldn't help-told me to call.  I will call, but prefer to do it during the week, when no one will "overhear" and get offended.  Any help or guidance would be greatly appreciated.
    Thanks in advance'

        Windchimes74, oh wow! That is a lot of usage in a short amount of time. We do have a great application called Family Base. You can restrict the amount of time/amount of usage that a particular device can be used. By doing this you can put a limit when Mom is online. Once the jetpack reaches that limit it will not allowed to be downloading anything else. This package is $5 a month for the whole account. It is an awesome feature that I myself use for many lines on my account.
    RobinD_VZW
    Follow us on twitter @VZWSupport

  • Double the memory usage in SQL Developer 1.5 vs 1.2.1

    I have observed that SQL Developer 1.5 uses at least twice the amount of RAM than 1.2.1 when performing the same functions. This seems rather inefficient. I am merely opening the application and opening a single connection, where 1.2.1 uses ~60MB RAM, while 1.5 uses ~110 - 150MB ram. Is something wrong here, or is the enhancing of the GUI in 1.5 just using up mad RAM? Can this be cleaned up somehow? Thanks.

    I agree I have noticed 1.5 is very taxing on my machine.
    1.51 5440
    XP 1 GB RAM
    According to Task Manager, Mem Usage is 6.5 mb, and VM is 240 meg, this is one database connection and editing one function.
    I know memory issues were brought up in other versions but it seems it is getting worse not better. I wish Oracle would acknowledge the issue.

  • SQL query against ConfigMgr DB causing 100% cpu usage on SQL server throughout day

    Hi, I am hoping someone here may have an idea of what I can do to resolve this as I am not much of a SQL guy. Here is what I know. Throughout the day, monday-friday, my ConfigMgr SQL server sits at 98-100% processor usage.
    Using the following query I have narrowed down the culprit of the high cpu usage throughout the day:
    SELECT p.spid, p.status, p.hostname, p.loginame, p.cpu, r.start_time, r.command,
    p.program_name, text
    FROM sys.dm_exec_requests AS r,
    master.dbo.sysprocesses AS p
    CROSS APPLY sys.dm_exec_sql_text(p.sql_handle)
    WHERE p.status NOT IN ('sleeping', 'background')
    AND r.session_id = p.spid
    Even though my knowledge of SQL is light, I believe the following output clearly defines the thread responsible for the high cpu usage. This "program_name" is present throughout the day and as long as its there, cpu usage remains at or near 100%:
    The text output of the above culprit is as follows (sorry this is long):
    -- Name : spDrsSummarizeSendHistory
    -- Definition : SqlObjs
    -- Scope : CAS_OR_PRIMARY_OR_SECONDARY
    -- Object : P
    -- Dependencies : <Detect>
    -- Description : Summarize DrsSendHistory information into DrsSendHistorySummary
    CREATE PROCEDURE spDrsSummarizeSendHistory
    AS
    BEGIN
    SET NOCOUNT ON;
    DECLARE @CurrentTime DateTime;
    DECLARE @SiteCode nvarchar(3);
    DECLARE @LastSummarizationTime DateTime;
    DECLARE @NextSummarizationTime DateTime;
    DECLARE @Interval INT; -- summarize interval in minutes
    DECLARE @ReplicationID INT
    DECLARE @iMaxID INT
    DECLARE @iCurrentID INT
    DECLARE @iBatchSize INT = 50
    DECLARE @ReplicationPattern NVARCHAR(255)
    DECLARE @TargetSite NVARCHAR(3);
    DECLARE @TimeTable TABLE (TargetSite NVARCHAR(3), StartTime DATETIME, EndTime DATETIME, PRIMARY KEY (TargetSite, StartTime, EndTime))
    DECLARE @TargetSites TABLE (SiteCode NVARCHAR(3) PRIMARY KEY)
    DECLARE @ChildTargetSites TABLE (TargetSite NVARCHAR(3), LastSummarizationTime DATETIME, [Interval] INT, PRIMARY KEY (TargetSite))
    DECLARE @ReplicationGroup TABLE (ID INT, ReplicationPattern NVARCHAR(255))
    IF OBJECT_ID(N'TempDB..#DrsSendHistorySummary') IS NOT NULL
    DROP TABLE #DrsSendHistorySummary
    CREATE TABLE #DrsSendHistorySummary (ID BIGINT IDENTITY(1, 1) NOT NULL, SourceSite NVARCHAR(3), TargetSite NVARCHAR(3), ReplicationGroupID INT, SyncDataSize BIGINT, CompressedSize BIGINT, UnCompressedSize BIGINT, MessageCount INT, ChangeCount INT, SummarizationTime DATETIME, PRIMARY KEY (ID))
    SET @CurrentTime = GETUTCDATE();
    SET @SiteCode = dbo.fnGetSiteCode();
    INSERT INTO @ReplicationGroup (ID, ReplicationPattern)
    SELECT RD.ID, RD.ReplicationPattern
    FROM ReplicationData RD
    WHILE EXISTS (SELECT * FROM @ReplicationGroup)
    BEGIN
    SELECT TOP (1) @ReplicationID = ID, @ReplicationPattern = ReplicationPattern FROM @ReplicationGroup
    TRUNCATE TABLE #DrsSendHistorySummary
    IF (((@ReplicationPattern = N'global' OR @ReplicationPattern=N'site') AND dbo.fnIsPrimary() = 1)
    OR (@ReplicationPattern = N'global_proxy' AND dbo.fnIsSecondary() = 1))
    BEGIN -- when current site is child
    SET @LastSummarizationTime = ISNULL(( SELECT MAX(SummarizationTime) FROM DrsSendHistorySummary WHERE SourceSite = @SiteCode AND ReplicationGroupID = @ReplicationID),
    (SELECT MIN(EndTime) FROM DrsSendHistory WHERE ReplicationGroupID = @ReplicationID) );
    SET @Interval = ISNULL((SELECT VALUE FROM RCMSQLCONTROLPROPERTY SCP, RCMSQLCONTROL SC
    WHERE SCP.ControlID = SC.ID AND SCP.Name = N'Send History Summarize Interval' AND SC.TypeID = 3 and SC.SiteNumber = dbo.fnGetSiteNumber()), 15); -- default 15 minutes
    DELETE @TargetSites
    INSERT INTO @TargetSites (SiteCode)
    SELECT DISTINCT SiteCode FROM DRS_MessageActivity_Send WHERE ReplicationID = @ReplicationID
    IF @LastSummarizationTime IS NOT NULL AND EXISTS (SELECT * FROM @TargetSites)
    BEGIN
    SET @NextSummarizationTime = DATEADD( minute, DATEDIFF(minute, 0, @LastSummarizationTime)/@Interval *@Interval + @Interval, 0);
    -- Summarized according to interval
    DELETE @TimeTable
    WHILE (@CurrentTime >= @NextSummarizationTime )
    BEGIN
    INSERT INTO @TimeTable (TargetSite, StartTime, EndTime)
    SELECT SiteCode, @LastSummarizationTime, @NextSummarizationTime FROM @TargetSites
    SET @LastSummarizationTime = @NextSummarizationTime;
    SET @NextSummarizationTime = DATEADD(mi, @Interval, @NextSummarizationTime );
    END
    INSERT INTO #DrsSendHistorySummary (SourceSite, TargetSite, ReplicationGroupID, SyncDataSize, CompressedSize, UnCompressedSize, MessageCount, ChangeCount, SummarizationTime)
    SELECT @SiteCode, T.TargetSite, @ReplicationID, SUM(ISNULL(D.SyncDataSize, 0)), SUM(ISNULL(D.CompressedSize, 0)), SUM(ISNULL(D.UnCompressedSize, 0)), SUM(ISNULL(D.MessageCount, 0)), SUM(ISNULL(ChangeCount, 0)), T.EndTime
    FROM DrsSendHistory D RIGHT JOIN @TimeTable T ON D.EndTime >= T.StartTime AND D.EndTime < T.EndTime AND ReplicationGroupID = @ReplicationID AND T.TargetSite = D.TargetSite
    GROUP BY T.TargetSite, T.StartTime, T.EndTime;
    END
    END
    ELSE IF ((@ReplicationPattern = N'global' AND dbo.fnIsCAS() = 1)
    OR (@ReplicationPattern = N'global_proxy' AND dbo.fnIsPrimary() = 1))
    BEGIN -- when current site is parent
    DELETE @ChildTargetSites
    INSERT INTO @ChildTargetSites(TargetSite, LastSummarizationTime, [Interval])
    SELECT DISTINCT(DSH.SiteCode),
    ISNULL(( SELECT MAX(SummarizationTime) FROM DrsSendHistorySummary WHERE SourceSite = @SiteCode AND ReplicationGroupID = @ReplicationID AND TargetSite=DSH.SiteCode),
    (SELECT MIN(EndTime) FROM DrsSendHistory WHERE ReplicationGroupID = @ReplicationID) ) AS LastSummarizeTime,
    ISNULL((SELECT VALUE FROM RCMSQLCONTROLPROPERTY SCP, RCMSQLCONTROL SC WHERE SCP.ControlID = SC.ID AND SCP.Name = N'Send History Summarize Interval' AND SC.TypeID = 3 and SC.SiteNumber = dbo.fnGetSiteNumberBySiteCode(DSH.SiteCode)), 15) AS Interval
    FROM DRS_MessageActivity_Send DSH WHERE DSH.ReplicationID = @ReplicationID
    GROUP BY DSH.SiteCode;
    DELETE @TimeTable
    WHILE EXISTS (SELECT * FROM @ChildTargetSites)
    BEGIN
    SELECT TOP (1) @TargetSite = TargetSite, @LastSummarizationTime = LastSummarizationTime, @Interval = Interval FROM @ChildTargetSites
    SET @NextSummarizationTime = DATEADD( minute, DATEDIFF(minute, 0, @LastSummarizationTime)/@Interval *@Interval + @Interval, 0);
    -- Summarized according to interval
    WHILE (@CurrentTime >= @NextSummarizationTime )
    BEGIN
    INSERT INTO @TimeTable (TargetSite, StartTime, EndTime)
    SELECT @TargetSite, @LastSummarizationTime, @NextSummarizationTime
    SET @LastSummarizationTime = @NextSummarizationTime;
    SET @NextSummarizationTime = DATEADD(mi, @Interval, @NextSummarizationTime );
    END
    DELETE @ChildTargetSites WHERE TargetSite = @TargetSite
    END;
    INSERT INTO #DrsSendHistorySummary (SourceSite, TargetSite, ReplicationGroupID, SyncDataSize, CompressedSize, UnCompressedSize, MessageCount, ChangeCount, SummarizationTime)
    SELECT @SiteCode, T.TargetSite, @ReplicationID, SUM(ISNULL(D.SyncDataSize, 0)), SUM(ISNULL(D.CompressedSize, 0)), SUM(ISNULL(D.UnCompressedSize, 0)), SUM(ISNULL(D.MessageCount, 0)), SUM(ISNULL(D.ChangeCount, 0)), @NextSummarizationTime
    FROM DrsSendHistory D RIGHT JOIN @TimeTable T ON D.EndTime >= T.StartTime AND D.EndTime < T.EndTime AND ReplicationGroupID = @ReplicationID AND T.TargetSite = D.TargetSite
    GROUP BY T.TargetSite, T.StartTime, T.EndTime;
    END;
    SELECT @iMaxID = MAX(ID), @iCurrentID = 0 FROM #DrsSendHistorySummary
    -- BATCH INSERT TO REAL TABLE
    WHILE (@iCurrentID < @iMaxID)
    BEGIN
    INSERT INTO DrsSendHistorySummary (SourceSite, TargetSite, ReplicationGroupID, SyncDataSize, MessageCount, ChangeCount, SummarizationTime)
    SELECT SourceSite, TargetSite, ReplicationGroupID, SyncDataSize, MessageCount, ChangeCount, SummarizationTime
    FROM #DrsSendHistorySummary WHERE ID > @iCurrentID AND ID <= (@iCurrentID + @iBatchSize)
    SET @iCurrentID = @iCurrentID + @iBatchSize
    END
    TRUNCATE TABLE #DrsSendHistorySummary
    DELETE @ReplicationGroup WHERE ID = @ReplicationID
    END
    END
    If anyone has any experience with this issue or anything similar and might be able to point me in the right direction, any responses would be greatly appreciated. Thanks for reading!

    Normally, this summary job every few mins which only summarize last few mins sending history. If the job was not running for long time, the first time, this sproc will summarize a lot more data than normal. So it could fail which will make things worse and
    worse over time.
    If sending summary data is not a big concern here, you can manually insert a dummy row with most recent time as Summarizationtime, so that, when summary job kicks in next time, it will only summary short interval data.
    DrsSendHistory is that the table records every sending on every group. This table is one of the key of replication logic. For your environment, on primary site, it could have up to 24(hrs) * 60 (mins) / 2 (sync interval) * 36(secondary sites) records per
    day for Secondary_Site_Replication_Configuration group and 24 * 60 / 5 * 22 records for Secondary Site Data.
    Umair Khan | http://blogs.technet.com/umairkhan
    Hi Umair,
    Thank you for the reply. My plan was to go ahead with your suggestions but what I tried first was to get my VM guy to give the SQL server access to more CPU resources. We had already configured it with what would have seemed to be plenty, as per Microsoft's
    sizing requirements, but I figured it couldn't hurt to rule out - he gave the SQL server access to a huge portion of the host processing power and since then CPU usage on the server has NOT been an issue.
    It would appear that the large amounts of secondary sites we have just simply put a lot of stress on the SQL server with out of the box replication settings. Since the entire VM host is for System Center only, and our other System Center servers are using
    very little resources, this solution has ended up being valid.
    Thanks again for everyone's help with this.

  • Force usage of sql profile

    Is there anyway to force the optimizer to use a sql profile that was created?
    SQL Tuning advisor has recommended to create a sql profile and after creating it, i can see that the explain plan is still not the profile.
    Environment is Oracle 10g on Windows 2003.
    Thanks.

    is there a way to force the usage of the 5GHz-network?
    No, not unless the IT department will set up a separate SSID for the 5 GHz band. Then, you could set up your Mac to connect and remember that connection.
    But, connecting at 5 GHz does not necessarily mean a better or faster connection. Your Mac is looking at both bands and choosing the best combination of signal strength, low noise and speed.
    Since 5 GHz signals are not nearly as strong as 2.4 Ghz signals, your Mac is probably going to connect to the 2.4 GHz band, unless it is very close to the wireless router.

  • LcsCDR & QoEMetrics Purge and Usage Summary SQL Agent Jobs

    Hello.
    On our SQL instance that hosts the LcsCDR & QoEMetrics databases I have the following SQL Server Agent Jobs:
    LcsCDR_Purge
    LcsCDR_UsageSummary
    QoEMetrics_Purge
    QoEMetrics_UsageSummary
    I'd like to know if anyone else has these same jobs on their instances as it's unclear looking at the job descriptions, when they were created, and the code they run if these are part of the core Lync system or something that has been set up randomly
    afterwards.
    One thing I do know is that these jobs don't work correctly when you use database mirroring. I will elaborate on this if/when I can find out any more information about them first.
    Thanks

    Thank you for the reply.
    The problem with these jobs is that when they attempt to run against a database which is a mirror, it causes the job to fail. That would not seem to be a big deal right, except our policy (and many other SQL shops I imagine) is to send e-mail notifications
    each and every time a SQL agent job fails on any server, not just those associated with Lync.
    As it stands these jobs are not configured on either the principal or mirror server to notify anyone as I’d get an e-mail every hour on the hour from the mirror server telling me that a job has failed  (even though it didn’t actually need to do anything
    ) giving the impression something is wrong somewhere. This is quite a common trap to fall into with SQL Agent jobs and database mirroring.
    Remember that because as Lync uses automatic failover either server could be the mirror at any given time so there is no mileage in setting the e-mail notifications on just the server that is currently the principal.
    What this job should do then is when it attempts to run on the mirror, check if it’s the mirror first and if it is then do nothing instead of failing each time.  This will enable e-mail notifications to be set up on the jobs on both servers, so when
    the job fails we know there is potentially a genuine problem to be investigated.
    Each job contains two steps, I’ll use the QoEMetrics_UsageSummary as the example.
    The code in step 1 is this, which causes the job to error out if it is attempting to run against the mirror.
    declare @_MirroringRole int
    set @_MirroringRole = (
    select mirroring_role
    from sys.database_mirroring
    where database_id = DB_ID('QoEMetrics')
    if (@_MirroringRole is not NULL and @_MirroringRole = 2) begin
    raiserror('Database is mirrored', 16, 1)
    end
    else begin
    print ('Database is not mirrored')
    end
    I re-wrote this job to run in one-step like this, which runs from the master database, which as I mentioned above doesn’t make the job error out when it realises it’s trying to run against a mirror.
    DECLARE @_MirroringRole INT
    SET @_MirroringRole = ( SELECT mirroring_role
    FROM sys.database_mirroring
    WHERE database_id = DB_ID('QoEMetrics'))
    -- if this is not a mirrored database or it's the principal, attempt to run usage summary op
    IF (@_MirroringRole IS NULL OR @_MirroringRole = 1)
    BEGIN
    DECLARE @_Sql NVARCHAR(4000)
    SET @_Sql =
    'USE [QoEMetrics];
    DECLARE @_UpdatingSkipped INT
    EXEC dbo.RtcRegularMaintainDatabase @_UpdatingSkipped = @_UpdatingSkipped output'
    EXEC (@_Sql)
    END
    ELSE -- if the database is a mirror, don't do anything
    BEGIN
    PRINT 'there is nothing to do, the database is a mirror'
    END
    The same logic can be applied to the other 3 jobs and I was intending to suggest it as a connect item, except there doesn’t seem to be a section for Lync so I will contact product support and see what they think.
    Thanks again.

  • xsql:query - Is there a character limit on the SQL contained in the tag?

    Is there a limit to the length of the SQL contained in the
    <xsql:query> tag ?
    I've been very successful with short queries using xsql:query
    tags, however, for longer queries they seem to fail the XML
    Syntax check using JDeveloper 3.2.3.
    The resulting error from the XSQLServlet is XSQL-005 page is not
    well formed with the following:
    XML-0201: (Fatal Error) Expected name instead of .
    XML-0122: (Fatal Error) '=' missing in attribute.
    XML-0125: (Fatal Error) Attribute value should start with quote
    (Posted example 10/16/01)

    Hello Bill,
    >> … to our apex environment (9.2)
    The following might give you some more information on your possible situation -
    Re: Is there a maximum number of characters allowed in PL/SQL Anonymous Blo
    ORA-06550 recieved when trying to modify existing page after 3.1 Apex upg
    Regards,
    Arie.

  • Understanding replica volume and recovery point volume usage with SQL Express Full Backup

    I am running some trials to test DPM 2012 R2's suitability for protection a set of SQL Server databases and I am trying to understand what happens when I create a recovery point with Express Full Backup.
    The databases use simple recovery model and in the tests I have made so far I have loaded more data into the databases between recovery points since that will be a typical scenario - the databases will grow over time. The database files are set to autogrowth
    by 10%
    I have been looking at the change in USED space in the replica volume and in the recovery point volume after new recovery points and have a hard time understanding it.
    After the first test where data was loaded into the database and an Express Full Backup recovery point was created, I saw an increase in used space in the replica volume of 85 Gb and 29 GB in the recovery point volume. That is somewhat more than I think
    the database grew (I realize that should have monitored that, but did not), but anyway it is not completely far out.
    In the next test I did the same thing except I loaded twice as much data into the database.
    Here is where it gets odd: This causes zero increased usage in the replica volume and 33 GB increased use in the recovery point volume.
    I do not understand why the replica volume use increases with some recovery points and not with others.
    Note that I am only discussing increased usage in the volumes - not actual volume growth. The volumes are still their original size.
    I have been using 3-4 days on the test and the retention period is set to 12 days, so nothing should be expired yet.

    Hi,
    The replica volume usage represents the physical database file(s) size. The database file size on the replica should be equal to the database file size on the protected server.  This is both .mdf and .ldf files.  If when you load data
    into the database and you overwrite current tables versus adding new ones, or if there is white space in the database files and the load simply uses that white space, then there will not be any increase in the file size, so there will not be any increase
    in the replica used space.
    The recovery point volume will only contain delta changes applied to the database files.  As the changed blocks overwrite the files on the replica during express full backup, VSS (volsnap.sys) driver copies the old blocks about to be overwritten
    to the recovery point volume before allowing the change to be applied to the file on the replica. 
    Hope this helps explain what you are seeing.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • Is there a character limit on PL/SQL region code?

    Hi,
    We are moving a app from the Oracle apex site (10g) to our apex environment (9.2) and when I open a Dynamic PL/SQL region on a page, add a space to the declaration area just to cause it to be different, I try and save it and it goes to:
    "The webpage cannot be found"
    This happened at another job and I believe it was a environment setting to extend the character limit ability.???
    If so, what do I change and how do I change it?
    If not, any ideas?
    Thank you, Bill

    Hello Bill,
    >> … to our apex environment (9.2)
    The following might give you some more information on your possible situation -
    Re: Is there a maximum number of characters allowed in PL/SQL Anonymous Blo
    ORA-06550 recieved when trying to modify existing page after 3.1 Apex upg
    Regards,
    Arie.

  • Sql functions usage in sql loader

    Hi all,
    Can some one share sample code for using sql 'decode' function with sqlloader control file?
    Thanks

    Took about 30 seconds to find this link at google:
    http://www.orafaq.com/faqloadr.htm#MODIFY
    Dim

  • Index usage making SQL slower.

    Hello,
    While working on a performance tuning activity on Oracle 10.2.0.4 on Solaris 10, I encountered a problem wherein one of our DBA's suggested indexing 2 columns of a certain table. One of the queries which is being run on that table has a RULE hint, and it is seen to be making use of this newly created index. Before the index was created, this query was running fine and getting completed within 30 mins or so. However after the index is created, it is now taking 12 hours on average to complete. Please note that in both the above cases, the CURSOR_SHARING parameter was set to EXACT. Yes, after the index was created its statistics were computed, and for both the index and the base table statistics were gathered. The query is making use of bind variables and is being run via the SQR engine of PeopleSoft.
    Please advice what can be the possible reasons for such delays being caused?
    For any information, please let me know and I would provide the same in this forum/
    Note for moderators: I could not find the section for Performance tuning, so I am asking this question in the general forum. Apologies.
    Thank You,
    Prashant.

    Index scans are not always faster.
    Full table scans are not always bad.
    I doubt that the RULE hint is necessary.
    In general, [url http://www.centrexcc.com/Tuning%20by%20Cardinality%20Feedback.pdf]the CBO does an excellent job of finding the best access plan for a given sql provided it is able to accurately estimate the cardinalities of the row sources in the plan.
    See advice and information required in the template tuning threads:
    [url https://forums.oracle.com/forums/thread.jspa?threadID=863295]How to post a sql tuning request
    [url https://forums.oracle.com/forums/thread.jspa?messageID=1812597]When your query takes too long

  • Domains usage in SQL Developer data MODELER

    Hi,
    I'm trying to understand how to use Domains in Oracle SQL Developer Data Modeler. We use version 3.1.3 .  before I used Toad Modeler  where domains are just part of your main design.
    Oracle data modeler has some different concept.
    let's assume I'm working on 2 designs:  DesignA and DesignB that include relational models.
    DesignA and Design B should use domains but list of domains in design A is very different than in design B.
    Default domain file is located on c: drive where SqlModeler is installed. It is obviously unacceptable , so I need to change Default System Type directory in preferences.
    And of course I want to have different domain directories for DESIGN A and DESIGN B.
    So when I open design A then I changed   Default System Type directory  let's say to x:\AAA.   Then i close design A and open Design B and change Default System Type directory to x:\BBB
    I checked folders AAA and BBB and they  have necessary XML files there:  defaultdomains.xml, defaultRFDBSSites and so on....
    Now questions:
    can I rename defaultdomains.xls to something else like AAAdomains.xls?  Domain administration can edit any domain file with any name , but how  can I associate certain domain file with my design?  My wish , when I open my design , then corresponding domain file will be open automatically.  Is it possible?
    If I open 2 designs in Sql Modeler and switch between designs  then corresponding domain files should be changed automatically as well.  Currently   I shouldn't forget to change default System Type directory every time when I switch models.  Is it the only way to handle it?
    Thanks
    vitaliy

    Hi Vitaliy,
    We use version 3.1.3
    I recommend always to use the latest version. If you don't want to use beta (DM 4.0 EA is out) you can use DM 3.3.
    Otherwise Oracle SQL Developer Data Modeler supports two types of domains:
    1) DM installation domains - those in file defaultdomains.xml
    2) Design level domains - they are stored in design directories and are visible to particular design only. They can be created in following ways:
    2.1 Manually - there is a property "Domains file" and you id it's not set "defaultdomains" domain will become design level domain and will be stored in file with provided name (without .xml extension)
    You can change later the file for design level domains, however you cannot change file for domain already in defaultdomains.xml.
    2.2 Using types to domains wizard you can generate design level domains
    2.3 Design level domains are created during import of  DDL files (controlled in preferences)
    2.4 You can import domains from specific file with domains using "File>Import>Domains" - you need to rename the source file if it's named defaultdomains.xml otherwise you'll get domains as installation domains
    If the list with domains is too long you can define  a list with preferred domains (or/and logical types) in "Preferences>Data Modeler>Model" and you can use shorter list in Table/Entity dialog if check "Preferred" check box next to "Type:" combo box.
    If I open 2 designs in Sql Modeler and switch between designs  then corresponding domain files should be changed automatically as well
    If you open 2 designs in one instance of DM they will use the same file with default domains i.e. you'll lose domains in one of design depending of setting for "system data type directory". You need to go with design level domains.
    Philip

  • Usage of SQL Triggers in SAP B1

    Hi All,
    I wanted to know if it is Permissible according to SAP to create a SQL Trigger in SAP Company and then affect the UDT's, based on certain criteria.
    Regards
    Rohan S. Kamble.

    Hey Gordon,
    Do you know of an SAP note that specifies that SAP will not support a customer that put triggers on system tables?
    We are experiencing difficulties upgrading a client and I am gathering information for a case.
    Thanks,
    Denis

  • Usage of SQL and SQLQuery Component Oracle BPM 10g

    Hey Friends,
    I have created SQl and SQL query catalog compoenents in Oracle BPM 10g, but unable to figure about how to use them in the BPM process. Do i need to create an automatic activity and make implemenatation as method and write java/pbl code there. Please suggest some solution with code snippet.
    Thanks!!

    Having them cataloged constitutes most of the work you'll need to do. As you mention, the rest of the work is figuring out how you want to use them in a process.
    As an example, if you wanted to have method that would return a list of customer ids you could create a method in a BPM Object:
    listOfIds as String[]
    for each element in
      SELECT customerId
        FROM customer
      do
        listOfIds[] = String(element.customerid)
    end
    // return the array with the valid values
    return listOfIdsAfter adding this, you'll notice that there is an error flagged for your logic. Look at the Properties tab and change the "Server Side Method" property to "Yes".
    Now that you have the method that returns an array, you could use it to automatically populate a dropdown field for an attribute in the BPM Object. You'd do this by opening the properties of the attribute and changing the "Valid Values" property to "Dynamic Method" and select the method you just added.
    There's more to it than this, but hope this is enough to get you going,
    Dan

Maybe you are looking for

  • XI Attachment and main document MIME sequence

    Hi All, We are doing SRMXIARIBA PurchaseOrder Integration, everything works fine. Now we want to add a new feature to support attachments. So from SRM XI will be receiving MainXML and Attachment(s)(this can be any type like word, pdf, jpg etc). We ar

  • Problem with CS3 install

    During install of CS3 a Files Needed window appeared saying "The file AdobePDF.dll on Windows Vista CD-ROM is needed. Type the path where the file is located and then click OK".  Advanced search could not find file.  What can I do?

  • Installing Elements on two platforms

    If I buy Photoshop Elements and Premiere Elements, can I install them on my Windows desktop AND my Macbook Air?

  • Dvd format error

    I'm trying to burn a dual layer dvd project. The file size is 7.5Gb and the dvd holds 8.5Gb. The entire video is approximately 2:30 minutes. The layer is set to Dual and the Break Point is set to Automatic. Error 1# Formatting Failed. Formatting was

  • Can I copy a playlist from one computer to another?

    I have a new computer and I want to copy my playlists from the old computer on to the new computer. How do I do this?