Script to drop empty caches

Hello,
I'm looking for a way to drop group of empty caches that have specific name pattern, such as xyz-realtime-*.
Our program dynamically creates temporary caches that after some time have all the objects expired and stay empty. I'm thinking of a reaper script that can run daily, connect to the cluster, find such empty caches and remove them. Would it be even possible?
Any advise or suggestions will be greatly appreciated.
Thanks,
Alex

You have to write a dynamic SQL cursor WHILE loop:
http://www.sqlusa.com/bestpractices2008/rebuild-all-indexes/
Here is the cursor declaration query:
SELECT * FROM sys.server_principals WHERE name like 'test%'
Kalman Toth Database & OLAP Architect
SELECT Query Video Tutorial 4 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

Similar Messages

  • Drop empty tablespaces after OATM in 11.5.9

    Hi All,
    In 11.5.9 we don't have the option of "Generate script to drop empty tablespaces". Could you suggest a best way to generate this in 11.5.9?
    Thanks

    Hussein,
    Could you please confirm the steps for moving the below objects from APPLSYSD after OATM
    SQL> select segment_name, segment_type from dba_segments
    where tablespace_name ='APPLSYSD'; 2
    SEGMENT_NAME
    SEGMENT_TYPE
    SYS_IL0002020632C00006$$
    LOBINDEX
    SYS_LOB0002020632C00006$$
    LOBSEGMENT
    SQL>
    SQL> select OWNER, TABLE_NAME, COLUMN_NAME, SEGMENT_NAME from dba_lobs where SEGMENT_NAME like '%SYS_LOB0002020632C00006$$%';
    OWNER TABLE_NAME
    COLUMN_NAME
    SEGMENT_NAME
    APPLSYS AQ$_WF_CONTROL_D
    RSUBS
    SYS_LOB0002020632C00006$$
    SQL>
    SQL> select OWNER, TABLE_NAME, COLUMN_NAME, SEGMENT_NAME from dba_lobs where INDEX_NAME like '%SYS_IL0002020632C00006$$%';
    OWNER TABLE_NAME
    COLUMN_NAME
    SEGMENT_NAME
    APPLSYS AQ$_WF_CONTROL_D
    RSUBS
    SYS_LOB0002020632C00006$$
    SQL>
    SQL> select OWNER, TABLESPACE_NAME from dba_tables where TABLE_NAME like '%AQ$_WF_CONTROL_D%';
    OWNER TABLESPACE_NAME
    APPLSYS
    SQL>
    alter table AQ$_WF_CONTROL_D move tablespace APPLSYSD
    lob(RSUBS) store as SYS_LOB0002020632C00006$$(tablespace APPS_TS_QUEUES);
    Thanks

  • I accidentally deleted "empty cache" from safari drop down, what are the keystokes for doing it manually?

    What are the keystokes for doing it manually? or how do you reload it to the drop down menu?

    "Empty cache"  is not available in Safari 6.  (It's not possilble to delete that option from the Safari menu).
    Several workarounds.
    One. From your Safari menu bar click Safari > Preferences then select the Advanced tab.
    Select:  Show Develop menu in menu bar. 
    Now from the Safari menu bar click Develop > Empty Caches
    Or, from the menu bar click Safari > Reset Safari.
    Select:  Clear History  (that empties the cache as well as deleting history. Deselect all the other boxes, then click Reset.
    Unfortunately, Safar 6 omitted the empty cache keyboard shortcut.

  • How to empty cache

    Usually I clear the Safari Cache once a week and clean up cookies as well.
    I noticed after upgrading to Mountain Lion, the Empty Cache is no longer shown on the Safari drop down.
    How is this done now?
    Thanks,
    Sonja

    On Mountain Lion, the option to empty Safari cache is hidden, but you can continue using it. Follow these steps:
    1. Open Safari, go to Safari menu > Preferences > Advanced, and tick "Show Develop menu on menu bar"-
    2. Close Preferences window, and go to Develop menu > Empty caches

  • How do I recover search bar and empty cache function in Safari?

    My search bar function is gone from Safari and my empty cache function is gone from Safari after the last update.  I only get the URL bar.  I've tried deleting and then dragging the toolbar items back in.  doesn't work.  Any help would be appreciated.

    Thanks.  I was afraid of that.  Don't like it.  Any idea why I don't have an empty cache function under the Safari drop down menu?

  • Just upgraded to  Safari 6, What happened to the "Empty Cache" option?

    JUST CURIOUS, WHAT HAPPENED TO THE "EMPTY CACHE" OPTION IN SAFARI 6?

    Go to safari preference/advance and add the develop drop down menu. Empty cache is there.

  • Safari question. Empty cache and clear History. Is there more?

    I have a slower computer with lousy internet (oh, and I can't find a link to a Safari discussion group; sorry).
    I've tried clearing the History and Empty Cache. Is there more I can do to speed it up? Do I have to delete stuff from my hard drive?
    Thanks.

    Yes. Try some of this:
    (First, if yours is an Intel Mac, check that Safari is not running in Rosetta, which is enough to slow it to a crawl. If you are running Snow Leopard, try running Safari in 32 bit not 64 bit. Control click the Safari icon in the Applications folder, then click: Get Info In the Get Info window click the black disclosure triangle next to General so it faces down. Select 32 bit mode)
    Do you have enough RAM? Less than 1GB can cause slowness. Is your hard drive too full? Less than 15%, or 15GB, of free space can also cause slowness.
    If you use a router, does it have the latest firmware installed? Safari 5 introduced 'DNS Prefetching' (Safari looks up the addresses of links on webpages and can load those pages faster) which could strain some routers or modems producing a 'latency' in page loading. This was fixed in Safari 5.0.2, but you may see a benefit from getting a faster router or modem. You can read more about that here:
    http://support.apple.com/kb/TS3408?viewlocale=en_US
    Adding DNS codes to your Network Preferences, should give good results in terms of speed-up as well as added security:
    If you are using a single computer: Open System Preferences/Network. Double click on your connection type, or select it in the drop-down menu, and in the box marked 'DNS Servers' add the following two numbers:
    208.67.222.222
    208.67.220.220
    (You can also enter them if you click on Advanced and then DNS)
    Sometimes reversing the order of the DNS numbers can be beneficial in cases where there is a long delay before web pages start to load, and then suddenly load at normal speed:
    http://support.apple.com/kb/TS2296
    If your computer is part of a network: please refer to this page: http://www.opendns.com/start/bestpractices/#yournetwork and follow the advice given.
    (An explanation of why using Open DNS is both safe and a good idea can be read here: http://www.labnol.org/internet/tools/opendsn-what-is-opendns-why-required-2/2587 /
    Wikipedia also has an interesting article about Open DNS:
    http://en.wikipedia.org/wiki/OpenDNS
    Whilst in System Preferences/Network you should also turn off 'IPv6' in your preference pane, as otherwise you may not get the full speed benefit (the DNS resolver will default to making SRV queries). If you want to know what IPv6 is:
    This is Apple's guidance on iPv6:
    http://docs.info.apple.com/article.html?path=Mac/10.5/en/8708.html
    Click on Apply Now and close the window.
    Restart Safari, and repair permissions.
    Also, third-party add-ons created for a previous version of Safari may cause problems:
    http://support.apple.com/kb/TS3230?viewlocale=en_US
    If that didn't do it, then try this as well:
    Empty Safari's cache (from the Safari menu), then close Safari.
    Go to Home/Library/Safari and delete the following files:
    form values
    download.plist
    Then go to Home/Library/Preferences and delete
    com.apple.Safari.plist
    Repair permissions (in Disk Utility).
    Start up Safari again, and things should have improved.
    More useful information here:
    http://guides.macrumors.com/SpeedupSafari

  • Can I reset my search engine to Wikipedia? I don't want any of those default Search Engines anymore they are too intrusive. And I can not Empty Cache any more and Google has taken over the address bar?

    Can someone please explain how this now works? And am I obligated to load Mountain Lion. It's a very expensive price to pay for online privacy that isn't even Private anymore. I am old enough that I don't have to pay ransome. I can just quit.
    I didn't say and was never asked If I wanted Mountain Lion. I can no longer 'Empty Cache' at the end of a session online and when I do a search now (and this has all changed overnight) the query is typed into what used to be the address bar and when the search results appear, after reading the first result and I want to read the second or fifth or Any of the other results of the query I am forced to resubmit the search in the address bar because the 'Page Back' button has been removed and the Little Red Dot closes the Search Results Page altogether.
    What else am I in for with Mountain Lion? I already know that I do NOT want anything to do with iCloud. I am willing to bet a lot of money that a pharmaceutical company one day is going to be holding me for ransome with a new drug that was created out of the symptoms of a once - upon - a - time naturally occuring symptom of aging. At least I can turn my Macbook off and leave it that way and the world will not cease to exist. (Or will it?)

    Computer operation 101.
    Get a bootable, external HD (preferably FireWire, since it's 40-50% faster than USB 2 and designed for data transfers), make a bootable backup/clone before updating/upgrading, using something like Carbon Copy Cloner or SuperDuper!, and ensure that it's bootable and works like the original. That allows you to revert to the previous good state without having to reinstall or reset anything. See these for details:
    http://www.macmaps.com/upgradefaq.html
    http://www.macmaps.com/backup.html
    http://www.thexlab.com/faqs/installswupdates.html
    http://www.thexlab.com/faqs/backuprecovery.html
    If you only have a Time Machine backup, ensure that you can reliably restore it to another disk/volume/partition before updating/upgrading.

  • Safari 5.0.6 repeatedly crashes.  MacBook Pro 10.5.8  I've emptied cache and reset to no avail.  I've tried solutions found in other threads.  Help, please.

    Safari 5.0.6 repeatedly crashes.  MacBook Pro 10.5.8  I've emptied cache and reset to no avail.  I've tried solutions found in other threads but the more advanced don't seem to apply to me. Help, please.

    Not sure what other tests they could run for me. I've pretty much run all the tests I can using Drive Genius and Tech Tool Pro 5. Is there anything they use that I don't know about??

  • I have a macbook pro (OSX Lion) and just updated to 10.7.5. There is no longer the option to empty cache in safari. Is this a glitch or a feature of the update?

    I recently updated my macbook pro to 10.7.5 and the option in Safari to empty cache is gone. Is this a glitch or is there some other way to empty cache?

    Uninstall Genieo:
    http://www.thesafemac.com/arg-genieo/
    See if that makes a difference.
    Ciao.
    DawnHerbie wrote:
    Also is Safeboot ok to use?
    Yes, it will do no harm, but it is meant for trouble shooting and you should not have to use it all the time.
    Message was edited by: OGELTHORPE

  • Where did the Empty Cache option go?

    I recently did a software update for Safari and the Empty Cache option under Safari in the tool bar is no longer there. I use this ALL the time, any idea where it is?
    Thanks!

    Apparently it's been omitted from the latest Safari update however you can enable the Develop menu and clear the cache from there.
    From your Safari menu bar top of your screen click Safari > Preferences then select the Advanced tab.
    Select:  Show Develop menu in menu bar
    Now from the menu bar again click Develop > Empty Caches

  • Uploading photos to other websites , like Ebay and Making your own playing cards, is not working. It was, now it is not. I have emptied cache, updated Adobe, but I really do not want to change browsers. 3 yr old MACBook Pro. Suggestions?

    The uploader that allows me to uplaod my photos from Iphoto is no longer working consistantly. WHen I have a sight that where I am supposed to " CLICK HERE TO ADD PHOTOS"   and I click, nothing happens. Sometimes after 45 seconds it might open up the IPhoto page but then the page is frozen and the cursor can't activate any thing on the page. I cannot  scroll down the photos , make a selection or close the page. Another 60 seconds may goby and then the IPhoto site will close.
    I use it for Ebay and also things like uploading  photos for making photobooks and playing cards. I have done quite a bit to try and sort this out and I am at a loss. Not really very computer smart either!  Emptied cache,restarted,checked security,looked at Java....and called Ebay for help. I really do not want to add another browser, like FireFox, as I didi that before and it interferred with the MAIL account. Any suggestions?
    I have a 3 year old MAcBook Pro...and of course my telephone assistance has expired.
    Thanks for any response.

    The uploader that allows me to uplaod my photos from Iphoto is no longer working consistantly. WHen I have a sight that where I am supposed to " CLICK HERE TO ADD PHOTOS"   and I click, nothing happens. Sometimes after 45 seconds it might open up the IPhoto page but then the page is frozen and the cursor can't activate any thing on the page. I cannot  scroll down the photos , make a selection or close the page. Another 60 seconds may goby and then the IPhoto site will close.
    I use it for Ebay and also things like uploading  photos for making photobooks and playing cards. I have done quite a bit to try and sort this out and I am at a loss. Not really very computer smart either!  Emptied cache,restarted,checked security,looked at Java....and called Ebay for help. I really do not want to add another browser, like FireFox, as I didi that before and it interferred with the MAIL account. Any suggestions?
    I have a 3 year old MAcBook Pro...and of course my telephone assistance has expired.
    Thanks for any response.

  • How do I empty "cache"?

    How do I empty "cache"?

    The best way to do this is simply to boot into Safe Mode.
    Here's what to do:
    1. Restart your computer
    2. Just as you hear the chime sound and see a white screen on startup, hold down the shift key
    3. You will see a progress bar as your computer boots into safe mode and clears your cache.
    4. Simply restart normally, and your cache is clear.
    Good luck!

  • Drop box Cache Snow Leopard

    Hello all.How can I see what files are in my Drop box cache folder in Snow Leopard so that I can clean out the cache?Are there any other caches that I should clean out periodically?Is there a free program that will clean out my drop box files?What does the Drop Box cache do?What files go in it?

    Yes, very strange. If you see a few posts up I actually did get it to work the way I need it to. I called Epson and they had ne reset the printer settings through the system preferences. On my first try this did NOT work, however everything worked as it should in Preview (another image program) and since it did work there the Epson tech basically siad then it's not their problem - most likely adobe.
    However just for the hell of it after I hung up, I tried resetting the printer settings again and sure enough it worked. I was able to change the color settings while using Photoshop to manage colors - namely I needed to print a B&W through the Advanced B&W setting. When they are grayed out I can't do this. But even while doing color I don't like that it's grayed out. I've been printing both color and B&W for the last 5-7 years with photosjop manageing colors. I know about double profiling and how to avoid it.
    If this was by design from adobe, it deosn't make sense that I was able to access it a few weeks ago after resetting the printer settings. And if this was the case when did Adobe supposedly make the change?
    I don't know what's different now, the only thing I can figure is that I had this issue sometime after I installed the lastest Epson print driver - hence the call to Epson... Maybe it's snow leopard weirdness, but I had snow leopard on my laptop and was always able to print sucessfully, but have not tried it since I got the new Mac Pro.
    And the strange thing it works fine on other programs. I can have photoshop manage colors and they are not grayed out. Strange and frustrating. Time to set up the DR.
    I guess I shoud uninstall PS and then try re-installing it.
    thanks...

  • How to empty cache in Safari 6?

    In Safari 6, the "empty cache" command is missing from the Safari menu. Does anyone know how to empty the cache in Safari 6?

    I have the development menu activated and cannot get caches to clear at all. No matter how many times I ask it to. Like it is completely being ignored. Developing web pages and need them to update when requested. Any suggestions?

Maybe you are looking for

  • Vendor Master Data extraction???

    Hi, I need to extract Vendor Master Data from SAP into a flat file. The format should be similar to file input required for the Vendor Master Upload program: RFBIDE00. Is there any program which can be used to extract the data in the required format?

  • Exclude customer from the account statement

    Hi All, Currently when we generate the account statement in F.27 for a range of customer, then the system generated the statement for all the customers. We want to block certain customer from account statement creation like dunning block or payment b

  • Reader & Acrobat 9.3.4でPDF以外へのハイパーリンクがエラー

    関連すると思われるUSフォーラム http://forums.adobe.com/message/3078509 当方で確認できている現象 過去に作成した.目次PDFからCADデータへリンク設定したコンテンツCD-ROMが.9.3.4ではリンクエラーになりました. Windows7.Windows XPの複数台すべてで再現しました. 上記現象が起こる1台で9.3.4をアンインストールし.9.3.0をインストールするとエラー発生せず従来通り正常にリンクしました. 9.3.3以前ではこのエラーは発生

  • How to retreve images from DICOM

    Hi , I would like to ask a question regarding DICOM objects in database 11g . I would like to develop an application in java where i can read from dicom objects and display them in the web application (kinda dicom viewer) The question is how can i di

  • Failed to load Main-Class Manifest

    What l'm i doing wrong? Failed to load Main-Class manifest attribute from ButtonTest.jar Email: [email protected]