Searching the entire database for a text

Hi guys,
I need to get all the tables,cols which have a particular text,these tables have CLOB and similar datatypes also, so how do i find it?

i am not able use this query as suggested in that thread by MichaelS
  select distinct substr (:val, 1, 11) "Searchword",
                substr (table_name, 1, 14) "Table",
                substr (t.column_value.getstringval (), 1, 50) "Column/Value"
           from all_tab_cols,
                table
                   (xmlsequence
                       (dbms_xmlgen.getxmltype ('select ' || column_name
                                                || ' from ' || table_name
                                                || ' where upper('
                                                || column_name
                                                || ') like upper(''%' || :val
                                                || '%'')'
                                               ).extract ('ROWSET/ROW/*')
                   ) t
        where table_name in (SELECT table_name from all_tables)
        and owner NOT IN ('SYS','SYSTEM') and
        data_type IN ('CHAR','VARCHAR2') and
        data_length >= LENGTH(:val) and
        table_name in (SELECT table_name from all_tables);
       order by "Table";i get this following error
ORA-19202: Error occurred in XML processing
ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_XMLGEN", line 288
ORA-06512: at line 1
Any help here ?

Similar Messages

  • Search the whole database

    Hi
    I was tasked to search the whole database (all schemas, all tables) for hard-coded IP addresses and host names.
    I would divide the problem into two:
    1) how to search the whole database
    2) how to search for ip addresses - I've heard about 10g feature of regular expressions but AFAIK it is not the case of pre-10g db.
    Could you gimme the hint how to do it?
    Regards
    Paul G. Matuszyk

    Aside from a general caveat that if you don't know the data model well enough to be able to figure out the handful of columns in the handful of tables that might contain IP addresses and host names, any solution to this problem is going to be incomplete and miss some corner cases...
    You can search the entire database by writing dynamic SQL, i.e.
    FOR x IN (SELECT * FROM dba_tab_cols WHERE data_type IN ('CHAR', 'VARCHAR2')
    LOOP
      EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' || x.owner || '.' || x.table_name || WHERE isHostName( ' || x.column_name || ') = 1' INTO l_cnt;
      IF( l_cnt > 0 )
      THEN
        <<do something>>
      END IF;
    END LOOP;This assumes that you have functions like isHostName and isIPAddress and that you can restrict your search to CHAR and VARCHAR2 columns.
    Identifying a host name seems rather difficult unless you know that it is a fully qualified host name (i.e. <<host>>.foo.com) rather than the more common approach of assuming the .foo.com bit in an internal application.
    Identifying an IP address can be a challenge as well. It's possible that someone would have stored it in 4 separate columns rather than in a VARCHAR2 column as 4 numbers separated by periods. Assuming the latter, though, you can use INSTR and SUBSTR to parse a string looking for periods and then see if the string between periods are numeric.
    Of course, this solution is also going to be extremely slow, since you're going to be full scanning just about every table in the database, possibly multiple times.
    Justin

  • My iTunes keeps crashing.  I have uninstalled and reinstalled, including recreating the entire database, and it is still doing it.  I recently upgraded to 10.5.  Any ideas?

    My iTunes keeps crashing.  I have uninstalled and reinstalled, including recreating the entire database, and it is still doing it.  I recently upgraded to 10.5.  Any ideas?  I am running Windows 7 on a new, decent, laptop.  The music is on the laptop's hard drive.  There is plenty of hard drive space left.
    iTunes starts fine, and I can do stuff, then within a minute or two or three it gives me an error message pop-up. 

    The error message says:
    iTunes has stopped working.
    Windows can check nline for a solution to the problem.
    -> Check online for a solution and close the program
    -> Close the program
    Problem Event Name:          APPCRASH
      Application Name:          iTunes.exe
      Application Version:          10.5.0.142
      Application Timestamp:          4e9243f2
      Fault Module Name:          MSVCR80.dll
      Fault Module Version:          8.0.50727.6195
      Fault Module Timestamp:          4dcddbf3
      Exception Code:          c0000005
      Exception Offset:          0001500a
      OS Version:          6.1.7601.2.1.0.768.3
      Locale ID:          1033
      Additional Information 1:          0a9e
      Additional Information 2:          0a9e372d3b4ad19135b953a78882e789
      Additional Information 3:          0a9e
      Additional Information 4:          0a9e372d3b4ad19135b953a78882e789
    I've chosen both items, neither does anything but close the program.  This problem is new with iTunes 10.5; I did not have it before. 

  • How to search the entire catalog

    Question: I've got loads of folders in my library, and they span over several pages on the Folders section in the Library module. But, when I want to search for a photo using the Library filter, I need to always first, move my mouse and click manually over the Folders section to the top Parent folder before I can do a search on the entire catalog.
    I was wondering how you go about searching the entire catalog, but with a quicker solution? I don't want to always have to find the most parent folder and click on it before I do a search across the entire library.
    Thanks in advance!

    shaibn wrote:
    Question: I've got loads of folders in my library, and they span over several pages on the Folders section in the Library module.
    Maybe time to think about re-organising folders into sub-folders?  I got into the same position, and then created folders for each year, so I don't see individual folders unless I want to:
    If you do that, remember to do it from inside Lightroom (just drag folders around) or Lightroom gets thoroughly confused. 

  • Building the sample prefilter for full-text seach

    Hi.
    I'm struggling with the sample prefilter for full-text search in SA12. The problem is that the build.bat isn't producing any output files.
    I am completely blank on C++, and I have only barely gotten the build.bat to run without errors, but that is obviously not enough.
    If anybody could build the files for me, it would be nice, but even better is if there was an working VS solution, or at least some more documentation on how to build this thing.
    Thanks.

    Hello again tNeeson!
    You are a few builds behind the current build. I would advise bringing your server up to current build 9.00.5324.
    If you patch the servers and try again and see if the build works this time, I know there were 3 cumulative patches between your build and the current. Check out the below link
    http://sqlserverbuilds.blogspot.co.uk/
    I'm sure you can get someone to patch it for you if you aren't the one in control of the patching ;-)

  • Are there any calls to get the entire database schema ?

    I'm using JDBD Thin, are there any calls to get the entire database schema or do I need to use the thick libray ?
    Thanks.

    This could be done using the Azure Management Libraries for Azure Websites https://www.nuget.org/packages/Microsoft.WindowsAzure.Management.WebSites
    There you can find an API to enumerate your website's running instances.
    var client = new WebSiteManagementClient(new CertificateCloudCredentials("subscriptionid", cert));
    foreach (var webSiteInstanceId in client.WebSites.GetInstanceIds("webspacename", "sitename"))
    Console.WriteLine(webSiteInstanceId);
    You can also see this information using the Azure command line tools (both PowerShell and xplat).
    Note that scaling up doesn't guarantee you'll have more instances (unless you have Always On configured) to get those instances running you'll need traffic to your website.
    Thanks,
    Amit

  • Is there any way to change the default font for outgoing text-messages, in "Messages"? (OSX 10.10)

    Is there any way to change the default font for outgoing text-messages, in "Messages"?
    I can change it for one conversation, but then it resets to the default, tiny font.
    The preferences menu only lets me change the conversation font.
    (OSX 10.10)

    Hi,
    As you may remember there used to be a Messages pane to the Preferences where the Font and colour of the Balloons or background and the Font text colour could be changed.
    And there was a Format Menu for character, word and Sentence changes in the current IM or iMessage.
    Those have gone in Yosemite's version of Messages (Despite it retaining the designation of Messages 8 the same as Mavericks' version).
    All that can be done now is set the size of the font and this has been moved to the General Section of the Preferences.
    The Yosemite version has also been fixed to using the Balloons style of send and receiving any type of messages as well.
    Changing the Font would involved editing the Balloon.transcript file.
    10:34 pm      Saturday; December 13, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Making Pages the default program for opening text documents

    How do I make Pages the default program for opening text documents? Every time I open a text doc it launches in TextEdit. This must be an easy fix, but I can't seem to figure it out.

    Select a text document > Menu > File > Info > Open With > Browse into your appliCations folder > iWork > Pages > OK > Change All…+
    Peter

  • How to export the entire databse in a text file !!!

    I have oracle 11g Database and want to export the SH Database as a text file
    What will be the process to export it ?
    links or steps
    Thanks

    I have oracle 11g Database and want to export the SH Database as a text file
    What will be the process to export it ?
    links or steps I think there is no such operation, But you have some alternate.
    1) take export of database
    2) import into SQL file.
    one of example
    http://www.dba-oracle.com/t_data_pump_sqlfile_parameter.htm

  • Global query block is causing a DNS server to fail a query with error code Name Error exists in the DNS database for WPAD

    Global query block is causing a DNS server to fail a query with error code Name Error exists in the DNS database for WPAD on a Windows 2008 server.

    The global query block list is a feature that prevents attacks on your network by blocking DNS queries for specific host names.  This feature has caused the DNS server to fail a query with error code NAME ERROR for wpad.contoso.com. even though data
    for this DNS name exisits in the DNS database.  Other queries in all locally authoritative zones for other names that begin with labels in the block list will also fail, but no event will be logged when further queries are blocked until the DNS server
    service on this computer is restarted.

  • Howto create a powershell script to search the C drive for any *.pst files and copy them to a single directory

    I have a bunch of people who are saving their pst files all over the place. how do I write a script that does the following
    searches the C:\ drive for *.pst and copies them all the E:\pstfiles

    Hi,
    How about using below command:
    Move-Item c:\*.pst E:\pstfiles -force
    For more details about move-item, I would like suggest you use get-help command:
    get-help move-item
    In addition:
    Using the Move-Item Cmdlet
    http://technet.microsoft.com/en-us/library/ee176910.aspx
    Regards,
    Yan Li
    Yan Li
    TechNet Community Support

  • Why Sybase is not the prefered database for SAP?

    Dear Sir/Madam,
    Why Sybase is not the preferred database for SAP?
    What is the difference between Oracle performance and Sybase!
    I am sure that both are RDBMS!
    Please Clear this doubt.
    Sreevidya.S

    Because Sybase is a much smaller "player" in the DB world.
    Oracle is the industry leader; and it is usually a wise decision for a software product to store it's data into the "best of brand" technology.

  • My disk utility will not let me highlight jornaled in mthe drop down menu. I need to erase the entire mac for re sell purposes.

    My disk utility will not let me highlight journaled in the drop down menu. I need to erase the entire mac for re sell purposes.

    You need to be booted from another source as you cannot delete or reformat the drive you are booted from. See if you can either use the original install disks (Snow Leopard or earlier) or internet recovery (Lion or later) to boot from and then be able to use the Partition tab to partition and format it correctly.

  • What is the exact meaning for Screen Texts, GUI Status & GUI Titles

    What is the exact meaning for Screen Texts, GUI Status & GUI Titles and where we can find in SAP.
    What is called as these : Screen Texts, GUI Status & GUI Titles
    Kindly let me know.
    Akshtiha.

    Hi Akshitha,
    <b>Screen text</b>:They are labels that you can display beside your selection-screen parameters/select-options.. from the ABAP editor, use the menu option Go to> Text Elements>Selection Texts.
    <b>GUI STATUS</b>:go through this link
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba99935c111d1829f0000e829fbfe/content.htm
    <b>gui title</b>:The GUI status and GUI title are interface elements of screens. You create both of them using the Menu Painter in the ABAP Workbench. On screens, GUI statuses of type dialog status are used.
    Thanks
    Vikranth Khimavath

  • How to get the entire database from remote server to my server

    Hi,
    I am running a web application with sample data. Now i need to access the original data through this application. But the original data is located in the other server which is located in Mumbai.
    Now i need the copy of that database to my system(Chennai). with minimum effort.
    It is very urgent...
    Thanks in advance...
    Chaitanya.

    Hi
    Nicolas is right. You can also take advantage of exp/imp utility. That would not only get the entire db in one file but also the size will be a fraction of the entire db size.You can search for DataPump (that uses expdp and impdp) utility to expedite the export/import process.
    For simple exp/imp you can do the following.
    From Remote site(MUMBAI) issue
    ORACLE_HOME\BIN\exp file=c:\fulldbexp09sept05.dmp log=c:\fulldbexp09sept05log.log FULL=Y userid=system/pwd@connectstringOfyourdb
    Get a copy of fulldbexp09sept05.dmp and place it on your local drive in Chennai
    On Local Site (Chennai)
    ORACLE_HOME\BIN\imp file=fulldbexp09sept05.dmp log=fulldbimp09sept05 FULL=Y userid=system/pwd@connectstringOfyourlocaldb
    By this you can take advantage of having a different db name on remote and local sites. This is a fairly easy exercise. You just need to be sure that in your TNSNAMES.ORA you have correctly defined the connectString for your db.
    PS: Create a database on local server with default settings.
    Make use of following to create appropriate tablespaces and users if you desire ie.
    1. On Remote Site open SQLPLUS session and issue this command to find out the tablespaces, datafiles and their sizes
    SQL>SELECT SUBSTR(file_name,1,60) FILE_NAME, tablespace_name, bytes
    FROM dba_data_files
    GROUP BY tablespace_name, file_name;
    Now create the tablespaces on local sites using the result of the above query.
    2. On Remote Site open SQLPLUS session and issue this command to spool user creation script.
    SQL>spool c:\createuserscript.lst
    SQL> SELECT 'CREATE USER ||' IDENTIFIED BY VALUES '||'"'||PASSWORD||'"'||' DEFAULT TABLESPACE '||DEFAULT_TABLESPACE||' TEMPORARY TABLESPACE '||TEMPORARY_TABLESPACE||';'
    FROM dba_users
    WHERE username NOT IN ('SYS','SYSTEM')
    ORDER BY username;
    SQL>spool off
    Now edit this createuserscript using any editor and replace " with '. Copy this file to the local server and run it using @. This will create appropriate users.
    Let me know if you have any problems.
    Regards
    Adnan Mashhadi
    Nicolas I am not sure as how to eliminate the " in my script. Any comment will be appreciated.

Maybe you are looking for

  • Multiple imports from same dump file

    Hi, I have to import multiple related schemas - to avoid having to create multiple dump files can I just export them into one dump file (owner= a,b,c etc) and then run simultaneous imports like : export <dba_user> owner=a,b,c file=all.dmp --in newdb

  • After purchasing a new mac, none of the purchased songs can be played.

    I recently purchase a new iMac 3.4 Intel Core i7. After transferring all files, including iTunes library, I find I cannot play, share, or burn to an audio CD any of the songs I purchase from the iTunes Store. I keep getting an error message: "This co

  • I was never emailed a receipt of my purchase. How do I get one?

    I purchased an iPad in store last July and chose to have a receipt emailed to me rather than printing off one there bit I never received an email with the receipt. Now I need a receipt to insure it. How do I get them to send it to me?

  • Iphoto isn't working.

    i've tried to upload pictures on my mac but it saids that is loading and it never does.. can someone please help me

  • Se connecter a l'invite LOM de Sunfire 1280 avec Sunblade2500

    bonjour tous le monde, j ai suivi deux procedure differente � fin de se connecter au serveur sunfire/netra 1280 exactement � l'invite LOM via le port serie A -avec un cable RJ45 offert avec serveur) : avec hyperterminal sous windows xp SP1 (que j'ai