Best Policy to run open queries on LIVE Database

Hi Experts,
There are users who has RO access on Live database , they run open queries on Live database. Sometimes we have faced some issues on Live Database due to open queries and we can not restrict them to run as well. So would like to get your suggestion
to come up with best solutions ? 
Shivraj Patil.

What issue do you have? One option is tuning the query, means create proper indexes to speed up the query..
But  the user may run heavy query even being unaware  that system consumes resources, for example
--A typical parallel query...
SELECT 
    p.ProductId, 
    p.ProductNumber,
    p.ReorderPoint,
    th.TransactionId,
    RANK() OVER 
        PARTITION BY
            p.ProductId
        ORDER BY
            th.ActualCost DESC
    ) AS LineTotalRank,
    RANK() OVER
        PARTITION BY
            p.ProductId
        ORDER BY 
            th.Quantity DESC
    ) AS OrderQtyRank
FROM bigProduct AS p
INNER JOIN bigTransactionHistory AS th ON
    th.ProductId = p.ProductId
WHERE
p.ProductId BETWEEN 1001 AND 5001
GO 
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence

Similar Messages

  • Is it safe to run expdp on a live database?

    Can I run expdp on a live database? Will expdp take out any long-lasting locks that might hang normal application transactions (or does expdp just take a "snapshot" copy of the schema at a particular SCN)?

    To answer your second question:
    (or does expdp just take a "snapshot" copy of the schema at a particular SCN)?
    expdp will not take a snapshow copy of the schema at a particular scn. expdp will export all partitions/subpartitions of a table at the same scnr, but could export different tables at different scns. If you need the complete expdp job to be exported with a consistent scn, your best bet is to use flashback_time or flashback_scn.
    Dean

  • Best way to run open source/GNU programs on Mac

    Hi folks,
    I'm kind of new to Macs, coming from the linux/unix world.   I'm working on reinstalling the OS on my macbook (after finding out the hard way that it itsn't prudent to use a case-sensitive file system on a Mac), and thought this would be a good time to ask if anyone has an opinion on the best way to run linux-y programs on a Mac.   For instance, I find myself wanting to use "zim" and keep it synchronized with my linux computers, but I can't get it to install on my mac.   I can see a few options:
    1) run linux in a virtual machine, but this is a problem since I only have 4 GB of memory.
    2) use mac ports, but most of the ports I tried in the past didn't work, and my questions to the community were ignored (I tried to be friendly, but perhaps I came across wrong...?)
    3) use fink, but I gather it is out of date and not really used any more.
    So, I'm curious what other people use if they want to use open source programs?   Ideally I wouldn't have to compile each program myself, but maybe that is the best option?
    Thanks.

    I think Fink has install binaries (and if it has a ZIM port that works for you, what do you care if Fink is a bit out-of-date as a package manager?).
    From my observations of MacPorts.com, it compiles the ported package on your system (so you need to have XCode (free from Mac App Store) installed on your system.  If MacPorts has a binary option, I have not dug deep enough to find it (as I mostly use the minimum to get something I want installed).
    The other option is to download the Open Source package and build it yourself.  There are some that think this is the ONLY way to go about it (me I'm lazy and only do that for Vim which I desire specific options not always included in canned Vim packages).
    If you want OpenZIM on your Mac and you only use it once in a while, then a virtual machine might be the way to go.  However, if your use of OpenZIM is extensive, then a virtual machine can be a bit heavy weight, adn for that you might want to either find a working port or build it yourself.
    Whatever you do, DO NOT replace a standard Mac OS X installed Unix side program with your own.  Put your stuff in /usr/local/bin, or a personal local tree (Fink uses /sw/... and MacPorts uses /opt/local/...), then modify PATH in your shell initialization file.  Replacing standard Mac OS X Unix programs may break Mac OS X maintenance scripts, GUI programs that get an assist from a Unix command, etc...
    NOTE:  Chances are you Mac can go up to at least 8GB of RAM, and if you look at Crucial.com you might find it will not cost you much at all (for example, the MacBook Pro I just got was upgraded from 4GB to 8GB for only $43).  With 8GB of RAM you will not notice that you have a virtual machine locking down 2GB.  Also I'm not telling you to spend money, just pointing out possible options should you find your need for OpenZIM demands the use of a virtual machine.
    With respect to a case sensitive file syste, if you need one, then create a partition (or perhaps a disk image (.dmg) via Applications -> Utilities -> Disk Utility) for that purpose (an external disk is also an option).  But as you have discovered Mac OS X and many of its GUI applications have assumptions based on a case-insensitive file system.

  • What is the best program to run on my MacBook Pro to clean it up?

    can anyone tell me what the best program to run on a MacBook Pro to clean it up, make it run faster?

    When you next have the problem, note the exact time: hour, minute, second.
    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above. Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first. Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. In most cases, a few dozen lines are more than enough. It is never necessary or helpful to post more than about 100 lines. "The more, the better" is not the rule here.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • Pdf files wil not open under Windows Live Mail

    PDF Files will not open in WIndows Live Mail. I deinstalled Adobe Reader and reinstalled a more recent version but to no avail. It will open very well using WIndows explorer or when opening the reader. Any clues someone?

    WLM is version 2009 14.0.8117.0416. I'm running under Vista and all other more recent versions are not compatible. The file association has been made and I can open all pdf files in Windows explorer. Under Outlook mail it works as well. It worked until recently when I loaded a program that was supposed to convert pdf files to Word but that did not work so I had to deinstall it and redo the file association. It worked everywher except in WLM.

  • How do I get Adobe Cleaner not to open in Windows Live Gallery

    I was instructed to check the EULA and then if that did not work to install Adobe Cleaner.  I checked the link to complete and it wants to open in Windows Live Gallery - not sure why.  So of course it will not open.

    The Cleaner downloads as a .zip file. THAT should open with Windows archive tool if you don't have one of the following: WinZip, WinRAR or Stuffit Expander.
    Those utilities expand .zip files to open the application contained within. You can download a free trial of WinZip at http://www.winzip.com.
    Once it's unzipped you double click the AdbeArCleaner_v2.exe file and run it.

  • What is the best way to run .exe files on my mac?

    What is the best way to run .exe files on my mac? I need to run some updates for my john deere gps and the downloads i get can only be run on windows.

    There are several options for running Windows software (*.exe files) on a Mac, depending what your program is, how often you use it, and your personal preferences.
    One way that does not require Windows is an open source effort called WINE.  Check out winehq.org.  You may find that that's all you need for your programs.  There is also a commercial effort that has grown from WINE, and you will find info about it on the site mentioned.  These DO NOT require that you have and install Windows.
    If you want to run sessions devoted only to Windows software, and want programs to run as fast as they do on a PC, the Apple's Bootcamp program is useful.  With it you dedicate a partition on your hard disk to windows, and on startup choose to either boot into OS X or Windows.  Each runs without any connection to the other.  This requires you have a copy of the Windows software as well as the applications you want to run. 
    If you want to be able to easily exchange data between your Windows and Mac programs, and skip back and forth between the two, there are several emulators available that run on Mac OS X and create a Windows environment where many Windows programs can operate along side Mac programs.  Parallels and VMwear are two comercial packages available for purchase and Virtual Box is an open source effort available for free.  Google will find all three for you.
    My only experience is with Virtual Box.  It is slow and a bit clunky, but it is free and meets my needs for the very few "just got to have" windows programs I sometimes use.
    Google is your friend on this and can provide a lot more, and better, information than I can.
    Best of luck,
    Ray

  • What is the best way to run windows on my mac?

    What is the best way to run windows on my mac?
    I have a particular program that i need to run, and it only runs on windows. I have a macbook pro

    As Templeton noted, it depends and will at least be somewhat subjective. 
    There are basically three options out there.  You can use a Windows emulator (Wine or the commercial version of it, Crossover Office), use Boot Camp to "dual boot" or use virtualization software (Parallels, VMWare Fusion, or VirtualBox).  Each has its advantages or disadvantages.
    The Windows emulators have the advantage of being the one option that doesn't need the purchase of a copy of Windows.  Unlike Boot Camp, but like the virtualization options, this allows you to run Windows programs and OSX programs side by side.  The big problem, though, is that it is the least compatible option--a lot of Windows software either has "issues" or will not function at all.  The Crossover website has information on which programs are known to work and how well they are known to work. 
    Boot Camp is the option that Apple ships OSX with.  You'll need a copy of Windows to install into the partition.  You'll effectively divide your disk into two parts and have two machines.  The major advantages are, first, you don't need to acquire separate software *AND* the Windows license.  As well, it's the highest performance Windows system.  What you have is truly a Windows machine.  That's both the good and the bad--you aren't going to be able to use OSX software at the same time, and you have to reboot to get back to OSX.  I've always thought it was best for someone who likes the Apple hardware and wants to use it for a Windows box--in that case Boot Camp is clearly a great solution.
    Finally there's virtualization which seems to be the most popular way to handle Windows, especially if you need to run one vertical market package.  It has the advantage of allowing you to use your OSX software at the same time, and the virtualization gives an extremely high level of compatibility.  About the only thing that won't run is a virtualization package (and there's not a lot of reason to run that in a Windows VM).  There is a performance hit compared to Boot Camp, but it's minimal for all but the most demanding applications (that being high end games). 
    It will chew up RAM on the OSX machine, but if you have at least 4 GB of RAM it will probably be manageable, especially if you only need to run one Windows program.
    You will need both a virtualization program (there are three major ones) and purchase Windows.  Two of three programs are commercial packages (Parallels and VMWare Fusion), while the other is an open source option (VirtualBox).  Virtual Box has the advantage of being free, but it's by far the least polished of the group.
    Which way is best?  As was noted, it depends.  I run VMWare Fusion on my machines, and I have used CrossOver Office for limited purposes.  I've not yet seen, in my use pattern, a reason to go to Boot Camp but I certainly can see cases where it might make sense.

  • What is the best spec to run multiple programs with photographs?  Includes:  Lightroom, PhotoMechanic, and Internet DAM system?

    What is the best spec to run multiple programs with numerous photographs?  Includes:  Lightroom, PhotoMechanic, and Internet DAM system?
    For a Macbook Pro.  What's the least amount I need to process, upload, download images using these 3 programs?
    Thank you.
    pt

    That's a nice system Kevin, and it will work very nicely with Photoshop.  I do take it that you have 16Gb RAM in Total?
    250Gb SSD is a good size, but you can still run short, and that will affect Windows performance.  When you get your system, instal WinDirStat which gives you a graphic display of everything on your drive, like below. Clicking on any of the large areas will tell you what and where they are, so you can think about moving cache folders etc. to one of the HDDs.
    Leave the Pagefile.sys on the boot drive.  Think about disabling Hyphenate as it takes a ton of space, and too often crashes on wake up.
    My Documents
    Desktop
    Downloads
    Look at Bridge cache
    iTunes backup
    Other stuff like that.
    Think about another 500Gb drive just for Photoshop Scratch.  Drives are cheap as chips nowadays
    Do yourself a favour, and invest $100 in Shadow Protect (or similar if there is such a thing) SP saves incremental backups every 15 minutes (you can set the interval, but it has no impact on performance with a system like yours).  If you have a problem you can mount the back up at any of those 15 minute points, and open files from it.  You can also make a bootable DVD image of your C drive, and be back up and running five minutes after disaster strikes.
    Optimize Performance in Photoshop
    Photoshop CC and CC 2014 GPU FAQ
    For more ideas, swing by the Premiere Pro Hardware forum.  Those guys are serious good at this stuff, and you'll find links tips and ideas.
    Happy computing, and have fun with your Creative Cloud® apps.

  • Long Running SQL Queries

    We have a customer that runs our Crystal Reports and they have complained that some of the reports cause long running sql queries and they have to kill these queries manually from SQL Management tools. We have changed the code so that we now dispose the report source and viewer objects as we call .dispose() function on them;
    reportSource.dispose();
    viewer.dispose();
    At first this seemed work but customer later complained that the issue still occurs. Can anyone help with why some of these CR queries are still running way after report is generated (with correct set of data), and based on the customer some of them running for more than 2 hours? What else can we do to make sure that all CR related queries cease to exist once report is generated? Appreciate all the help.

    1. Run the report from with Crystal designer. You should see the query being sent to DB server. After the report is viewed and you close it in designer, do you see the DB connection being dropped? If not, this may not be a SDK\ API related issue.
    2. Try using latest set of CRJ Jars [here|http://downloads.businessobjects.com/akdlm/crystalreportsforeclipse/2_0/crjava-runtime_12.2.213.zip] in your application. Also update the crystalreportviewers folder with the new viewer found at this link.
    3. Make sure that you are calling reportClientDocument.close() at the end when user is done viewing the report.
    4. When you say logn running queries are seen in DB, are you referring to a DB connection left open? or is it actually running any query and returning results?

  • BI 7.0 Business explorer / analyzer Can't open queries

    Hi, I recently upgrade our 3.0B sandbox to BI 7.0.  When I run "start" -> "Programs" -> Business explorer -> analyzer Excel bex tool launches but when I click  on the folder to open queries (Offnen open) Nothing comes up.  However, if I am logged into the BI 7.0 system and lanuch RRMX excel comes up with the Business explorer tool bar.  I re-read the upgrade guide and could not find out if I am supposed to run a conversion program or this is the default behavior.
    Thanks in Advance
    --- Steve

    Hi PG.  When I run transaction RRMX from within SAP gui while logged into BI 7.0, Excel launches and I get the Business Explorer tool bar. I have the options "open" "save" "refresh query"  Back" "change query" "goto" "Olap Functions ..." "format" "layout"  "tools"  "settings" and "help"   Under Settings I don't have "Launch Legacy Version from RRMX".
    I clicked on help -> about and it showing me finall release 3.5.  Shouldn't it read 7.0?
    The installation of sap gui with BW add on was done with DVD 50083078 SAP NetWaver 2004s presentation SAP GUI for Windows 7.10 comp 1. 
    If I click on "Start" "All Programs" "Business Explorer"  "Business Explorer (SAP BW 3.x) -> Analyzer (BW 3.x) it's also showing version release 3.5 but the Business explorer tool bar is there.  If from the excel menu I click Business Explorer -> Installation check I get the message 12 red signed Files found , 14 yellow signed Files found, please check SAPSETUP.LOG in c:\windows.  See note 197460 from more details.   I can't find the sapsetup.log anywhere (supposed to be under c:\windows).   Note 197460 refers to the check I just ran.   The note also mentions Red files have to be manually registered, so it looks like I will either have to find a newer release or have a lot of work to do

  • Whats the best mac to run logic 8 ?

    in your own opinion, what do you think is the best mac to run logic 8 full version

    It really depends on what you're planning on recording.
    If you intend to build a fully featured facility, with lots of VIs with large sample libraries, big sessions, and need to accommodate external hardware such as UA cards or similar, you'll want a Mac Pro because of its expandability.
    If you're recording live shows, obviously you'll need a Mac Book Pro, which you already seem to have.
    If you're a singer/songwriter primarily going to record a few audio tracks and a few internal instruments, an iMac could work for you just fine, as long as you buy an external firewire drive.
    Tell us more about your plans and you'll get more specific advice.

  • What's the best way to run FrameMaker 8 on a Mac?

    What's my best bet for running FrameMaker 8 on a MacBook Macintosh laptop?
    Can I run FM 8 directly under OS X, since it's a Unix app? Any special tricks to making it go?
    Or will I need to run FM 8 under Linux or Windows? If so, I'll need to be able to copy and paste from one environment to the other. What are my options? Their pros and cons?
    I'm switching from a PowerBook to a MacBook so I can run MacSpeech Dictate dictation software. Dictate ONLY runs on Intel Macs.
    I currently use FrameMaker+SGML 6.0 in Classic. It CAN'T run on the Intel Macs.
    I have over half a million words of FrameMaker files, including 7 volumes of cross-referenced research notes I add to almost daily. Since I am heavily dependent on FrameMaker's features, it's a must-have.
    I haven't bought the MacBook yet, so if there are any hardware requirements I need to know about, or options I should consider or avoid, please let me know.

    > If I understood him correctly, the Adobe salesperson I talked to
    > yesterday runs the Unix version of FrameMaker directly under OS X
    There is NO way to get the Unix (=Solaris) version of FM 8 to run
    under OS X. It's an executable compiled for the SPARC processor,
    and I don't think Apple has made a SPARC/Solaris emulator... :-)
    /Thomas Michanek

  • Please Help me to Choose the best config to run forms on web

    Hi,
    I have started upgrading my application from Dev2000 1.3 to Dev2000 6i in order to deploy on web. I have few questions to ask
    1. I need to know which config is the best & fast to run my applications out of
         1. Applet
         2. IE50Native
         3. JInitiator
    2. For testing I have configured forms server in socket mode. When I am using JInitiator even after exiting the application from test terminal, "ifweb60.exe" process initiated due to this session remains running. It takes long time when I try to initiate the same application for second time. This problem is not frequent, but this has happened 4 times while testing. Could this be due to Pentium4.
    Thanks in advance
    Syed

    saj123 wrote:
    I'm quite new to j2EE developement.
    Currently im working on a web based user management application ( a small scale one ).
    For that im hoping to use JSP s for presentaion tier and EJBs for business logic. This business logic seems to be having more on database accessing. Im not using Entity Beans for data access , but hope to use Session Beans.Why EJBs? POJOs will work just fine.
    >
    Is it ok if i develop according to this model , or is it better to use Entity Beans for data acccess ?Neither. Use POJOs. What are EJBs buying you?
    Is it a bad design to use Session Beans for data accessing ?Why?
    Or else , what if i avoid EJB s completely and database access is done via JSP itself ?Ouch, no. JSPs are for presentation only.
    Or i have another option , that is , using JSP for the presentation layer and Servlets for database accessing.Wrong again.
    what is the preferred way ? How i can decide a better way ?Learn how to layer an app properly. Learn Spring. http://www.springframework.org
    %

  • Displaying messages while running BEx queries.

    Hi Experts,
    Can any one explain me is there any possibility to display some popup messages while running BEx queries?
    Regards,
    Anusha

    Hi there,
    You can do taht with user exit variables with the code something like this:
      WHEN 'YOUR_VARIABLE'.
        if i_step = 2.
        LOOP AT eto_charsel INTO ln_charsel.
    *some validation of your own
          if ln_charsel-low NE '1'.
    *call function to send a message, in this case, an error message
             CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
               EXPORTING
                 i_class  = 'ERROR!'
                 i_type   = 'E'
                 i_number = '000'
                 i_msgv1  = 'Please connect again and'
                 i_msgv2  = 'use the Revision Layout'.
                 RAISE no_processing.
          endif.
        ENDLOOP.
        endif.
    Diogo.

Maybe you are looking for