REGEX help in oracle 10g

Hi,
I have to check for non-numeric at a particular location of the usernames in my database.
The usernames i am looking for are something like given below:
SAMCM1
SAMCM2
SAMCM3
SAMDM1
SAMEM1
There are other usernames which i dont want to list ..something like the ones given below:
SAM1CM1
SAM2CM2
SAM4CM3
SAM8DM1
SAM3EM1
How to can i achieve to get the results ( the one mentioned in my 1st listing) above using regex in oracle 10g,the one where i dont want the usernames containing a numeric value at the 4th position of the username.
I tried but not success ,partly because my knowledge of regex is very poor.
Regds,
Kunwar

WITH t AS (SELECT COLUMN_VALUE nm
             FROM TABLE (sys.odcivarchar2list ('SAMCM1',
                                               'SAMCM2',
                                               'SAMCM3',
                                               'SAMDM1',
                                               'SAMEM1',
                                               'SAM1CM1',
                                               'SAM2CM2',
                                               'SAM4CM3',
                                               'SAM8DM1',
                                               'SAM3EM1')))
SELECT nm
  FROM t
WHERE REGEXP_LIKE (nm, '^.{3}[^[:digit:]]')
NM
SAMCM1
SAMCM2
SAMCM3
SAMDM1
SAMEM1

Similar Messages

  • How to use help in oracle 10g XE

    Hello,
    I just wanted to know how to use help in sql command line in oracle 10g XE
    regards,
    Sreekanth.

    Hi thankyou very much for the answer, that web-page is very good but....
    I was hoping for answer that would walk me through the help command used in the SQL PLUS like: "help create"
    after i have read few manuals i came to know we can use @hlpbld.sql for building help tables it asks me for entering value 1 and 2, after that it exits the prompt and when i re-login i dont see "help command" working...
    any comments ot procedure to do this...

  • Help with Oracle 10g--SYSDBA password

    Hi,
    I installed oracle 10g on my machine ( WIN XP Pro, 512 RAM ) . Installation was Ok and then I created a database which was created successfully.
    But now I am trying to SQL PLUS to logon to database to run some scripts . I ma trying to login as SYS but it says I can only login in as SYSDBA or SYSOPR .
    Problem is that while creating database it never asked for SYSDBA or SYSOPR passwords and I am just thinking may be there is a default password for these?
    Please let me know how can I connect to database to run some scripts?
    Any help will be appreciated.

    Hi Khushhal Mahajan, Oracle Corporation has upgraded the database creation procedure from version 9i, that if database is created that prompts for a password. At that time we cannot use the default password & more over SYSDBA & SYSOPR are not user logins they are psudeo roles. So you must remember the admin password which will be prompted at the end of the installation. Try the following
    sqlplus /nolog
    SQL> connect / as sysdba
    Before this set the environment variable to your database instance.
    If you are connected alter the sys and system user and change the password.
    kamalesh jk

  • Help with Oracle 10G on Solaris 9

    This is a question that belongs to Oracle forum since I am only a Unix Administrator but work closely with some DBA's. I am installing Oracle Companion CD 10G on Solaris 9. The Oracle 10G software, I was able to install successfully in the past. The DBA's asked me to also install the companion CD for some added features.
    Currently, the system is running Oracle 9i on Solaris 9. I installed Oracle 10G on this test environment. I have ensured to change the .profile entries in Oracle 9i and use the Oracle 10G profile so they dont overwrite one another. I have also made sure not to overwrite any files such as "oraenv" etc during the install. The install of Oracle 10G was successful. The dba's that I am trying to help out asked me if I could also install Oracle 10G companion CD 64 bit version.
    I tried to install it by placing the path to Oracle 10G
    But when the prerequisites started, I got the following:
    "Oracle OHS Standalone can not be installed into an existing Oracle RDBMS 9.2.0.1.0 or higher Oracle home."
    Now I know that at that time, I had all the Oracle instances down on 9i so it wont interfere with 10G but why is it still seeing 9.2.??? What can I do to bypass this message so I can install the Companion CD? Any suggestions would be appreciated.
    Seyamak Shahrzad
    [email protected]
    Solaris Engineer
    Sun Certified System Admin
    EMC Certified Associate
    ########################################

    The issue is now resolved. I was selecting a different product for the install.
    Thank you.

  • [help me] Oracle 10G + ASM "ORA-00376: file 5 cannot be read at this time"

    We have used Oracle 10G R2 RAC + ASM on Redhat 4 (EMC cx700 Storage)
    I found below errors on alert log and can't inserted, updated and deleted datas in database.
    Sun May 27 01:12:34 2007
    SUCCESS: diskgroup ARCH was mounted
    SUCCESS: diskgroup ARCH was dismounted
    SUCCESS: diskgroup ARCH was mounted
    SUCCESS: diskgroup ARCH was dismounted
    SUCCESS: diskgroup ARCH was mounted
    SUCCESS: diskgroup ARCH was dismounted
    Sun May 27 01:19:11 2007
    Errors in file /oracle/product/admin/DB/udump/db3_ora_15854.trc:
    ORA-00376: file 5 cannot read at this time
    ORA-01110: data file 5: '+DATA/db/datafile/undotbs3.257.617849281'
    ORA-00376: file 5 cannot be read at this time
    ORA-01110: data file 5: '+DATA/db/datafile/undotbs3.257.617849281'
    ORA-00376: file 5 cannot be read at this time
    ORA-01110: data file 5: '+DATA/db/datafile/undotbs3.257.617849281'
    ORA-00372: file 5 cannot be modified at this time
    ORA-01110: data file 5: '+DATA/db/datafile/undotbs3.257.617849281'
    So:
    I checked and recovered data file
    SQL> select name,status,file# from v$datafile where status ='RECOVER';
    NAME
    STATUS FILE#
    +DATA/db/datafile/undotbs3.257.617849281
    RECOVER 5
    RMAN> run {
    allocate channel t1 type 'SBT_TAPE';
    allocate channel t2 type DISK;
    recover datafile 5;
    recover completed.
    SQL> alter database datafile 5 online;
    Butttttttttttttttttt:
    What is going on?
    I checked EMC storage, not found any disk error.
    I checked alert log of ASM, no found anything.
    I don't know What the problem ?
    Because I had the same problem 2 days ago.
    This day error on undo datafile node 3.
    2 days aGo; error on undo node 4.
    Please please anybody
    What bug or anything wrong ?
    Please introduce me
    trace file:
    /oracle/product/admin/DB/udump/db3_ora_15854.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP and Data Mining options
    ORACLE_HOME = /oracle/product/10.2.0/db
    System name: Linux
    Node name: db03.domain
    Release: 2.6.9-42.ELsmp
    Version: #1 SMP Wed Jul 12 23:32:02 EDT 2006
    Machine: x86_64
    Instance name: DB3
    Redo thread mounted by this instance: 3
    Oracle process number: 65
    Unix process pid: 15854, image: [email protected]
    *** SERVICE NAME:(DB) 2007-05-27 01:19:11.574
    *** SESSION ID:(591.62658) 2007-05-27 01:19:11.574
    *** 2007-05-27 01:19:11.574
    ksedmp: internal or fatal error
    ORA-00376: file 5 cannot be read at this time
    ORA-01110: data file 5: '+DATA/db/datafile/undotbs3.257.617849281'
    ORA-00376: file 5 cannot be read at this time
    ORA-01110: data file 5: '+DATA/db/datafile/undotbs3.257.617849281'
    ORA-00376: file 5 cannot be read at this time
    ORA-01110: data file 5: '+DATA/db/datafile/undotbs3.257.617849281'
    ORA-00372: file 5 cannot be modified at this time
    ORA-01110: data file 5: '+DATA/db/datafile/undotbs3.257.617849281'
    Current SQL statement for this session:
    INSERT INTO DATA_ALL VALUES (:B1 ,:B2 ,:B3 ,:B4 ,:B5 ,:B6 ,:B7 ,:B8 ,:B9 ,:B10 ,:B11 ,:B12 ,:B13 ,:B14 ,:B15 ,:B16 ,:B17 ,:B18 ,:B19 ,:B20 ,:B21 ,:B22 ,:B23 ,:B24 ,:B25 ,:B26 ,:B27 ,:B28 ,:B29 ,:B30 ,:B31 ,:B32 ,:B33 ,:B34 ,:B35 ,:B36 ,:B37 ,:B38 ,:B39 ,:B40 ,:B41 ,:B42 ,:B43 ,:B44 ,:B45 ,:B46 ,:B47 ,:B48 ,:B49 ,:B50 )
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    0x21dc2b4b8 780 package body MGR.AC
    0x21e4815b0 3 anonymous block
    ----- Call Stack Trace -----
    calling call entry argument values in hex
    location type point (? means dubious value)
    ksedst()+31 call ksedst1() 000000000 ? 000000001 ?
    7FBFFF7290 ? 7FBFFF72F0 ?
    7FBFFF7230 ? 000000000 ?
    ksedmp()+610 call ksedst() 000000000 ? 000000001 ?
    7FBFFF7290 ? 7FBFFF72F0 ?
    7FBFFF7230 ? 000000000 ?
    ksupop()+3581 call ksedmp() 000000003 ? 000000001 ?
    7FBFFF7290 ? 7FBFFF72F0 ?
    7FBFFF7230 ? 000000000 ?
    opiodr()+3899 call ksupop() 000000002 ? 000000001 ?
    7FBFFF7290 ? 7FBFFF72F0 ?
    7FBFFF7230 ? 000000000 ?
    rpidrus()+198 call opiodr() 000000066 ? 000000006 ?
    .......etc.............................
    Message was edited by:
    HunterX (Surachart Opun)

    To me it looks like your undotbs on node3 is filled and not marking old undo as expired. Use this query to find out if it is labeling old undo as expired.
    SELECT tablespace_name, status, COUNT(*) AS HOW_MANY
    FROM dba_undo_extents
    GROUP BY tablespace_name, status;
    Another thing I noticed from your alertlog is it is only doing that on undotbs3, which I assumes is on node3.
    1) try recreate undotbs on node3
    2) take node3 out of service (stop nodeapps, ASM, instance and finally CRS on node3) and see if you can do DML on your database.
    -Moid

  • Help with Oracle 10g Client Connectivity from Linux to IBM SAN storage

    Hello Oracle Experts,
    This is my first post. My client is having oracle 10g database up and running in IBM SAN storage.
    We have some NMS tools running in Red Hat Linux version 5. So, these tools require connectivity to Oracle database which is residing in SAN storage connected with the Fibre cables.
    How do I establish the connectivity from Linux to SAN storage. If would be glad if you can explain me the steps and also if there is any pre-installation/post-installation, patches and procedures involved.
    If it is IP based network we normally give the IP address of the host running the database server. I have no idea about SAN storage connected with Fibre cable.
    Please guide me to establish the connectivity from linux 5 to SAN.
    Thanks.
    Regards,
    RaviShankar.

    user13153556 wrote:
    Hi Rajesh,
    Actually I will not be touching the Oracle instance SAN box directly. I will only access the database from another machine. I my case it is Linux box.
    So, my question is how do you make the Oracle Client in Linux box to connect to Oracle instance running in another non ip based machine SAN storage.Install Oracle client on this Linux machine ..
    Make sure you have network connectivity from linux machine to database server. You need to connect to server where db instance is running and you need not to bother about SAN storage.
    make tns entry into client $ORACLE_HOME/network/admin/tnsnames.ora file.
    Use sqlplus to connect to database using client.
    Regards
    Rajesh

  • Help with oracle 10g with servlet

    Someone please help me with this error when i compile this:
    import java.io.*;
    import java.net.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * @author GeorgeZheng
    * @version
    public class MyServlet2 extends HttpServlet {
    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
    * @param request servlet request
    * @param response servlet response
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException, SQLException, ClassNotFoundException {
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();
    doPost(request,response);
    out.close();
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    try {
    processRequest(request, response);
    } catch (SQLException ex) {
    throw new ServletException(ex);
    catch (ClassNotFoundException ex) {
    throw new ServletException(ex);
    /** Handles the HTTP <code>POST</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    try {
    processRequest(request, response);
    String username = request.getAttribute("username").toString();
    String password = request.getAttribute("password").toString();
    if(validateUser(username, password))
    response.sendRedirect("SQL.html");
    else
    response.sendRedirect("input.jsp");
    } catch (SQLException ex) {
    throw new ServletException(ex);
    catch (ClassNotFoundException ex) {
    throw new ServletException(ex);
    /** Returns a short description of the servlet.
    public String getServletInfo() {
    return "Short description";
    public boolean validateUser(String user, String pass)
    throws IOException, ServletException{
    int checker = 0;
    boolean test = false;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","hr", "123456kk");
    System.out.println("database connected");
    Statement sqlStatement = conn.createStatement();
    ResultSet rs = sqlStatement.executeQuery("select * from log");
    while(rs.next())
    if(rs.getString(1) == user)
    checker++;
    if(rs.getString(2) == pass)
    checker++;
    conn.close();
    return test;
    catch (SQLException e)
    throw new ServletException("Servlet cannot display the records", e);}
    catch (ClassNotFoundException e)
    throw new ServletException("JDBC Driver not found.", e);
    it gave me this error:
    Deploying application in domain failed; Error loading deployment descriptors for practiced Line 12 Column 48 -- Duplicate unique value [MyServlet2] declared for identity constraint of element "web-app".
    ; requested operation cannot be completed
    C:\Documents and Settings\GeorgeZheng\practiced\nbproject\build-impl.xml:452: Deployment error:
    The module has not been deployed.
    See the server log for details.

    I would guess that your problems has to do with your web.xml file.
    MeTitus

  • Help with oracle 10g install on solaris x86

    hi, i downloaded solaris 10 from oracle site (sol-10-u8-ga-x86-dvd.iso) and i have installed it on vmware. i was going through the installation guide for oracle 10 for solaris x86 and while on the pre-installation steps, i issued this command
    # /bin/isainfo -kv
    and it gave me
    # 64-bit amd64 kernel modules
    instead of
    # 32-bit i386 kernel modules
    as the guide expected.
    please what can i do, cos the guide says if i dont see the later, the installation cannot complete.
    thnx

    First check you Operating System Bit information whether it is 64 or 32 bit , for this first check any of the command path
    Example ls command
    $ which ls
    /usr/sbin/ls
    $ file /usr/sbin/ls
    It will show you whether your OS is 64 bit or 32 bit and accordingly download the software from below link ,if it is showing 64 bit os then you have to download 64 bit database software .
    http://www.oracle.com/technetwork/database/database10g/downloads/index.html

  • Need a help on oracle 10g

    dear sir,
    i have windows 7 and i have installed oracle10g that support the windows 7 OS.i m not geeting the buffer that means while i write some query and executed that query after that i need some change on that query so i write ed on the sql prompt than the afiedt.buf is not opened it displays the error msg SP2-0110: Cannot create save file "afiedt.buf"...
    so how can i get out from this problem ....plz help me ...............

    start in property not present in sql * plus.It's an attribute of Windows shortcuts (not executables themselves). Create a shortcut for SQL*Plus and edit the properties of that. See the other thread for more info...

  • Help with Oracle 10g and ODBC

    Hello,
    I dont use ODBC much. Been awhile since I have had to use it.
    I have Oracle 10.2.0.3 installed on a win2k workstation and installed 10203 patch, which consisted of copying over 3 dll's and some notes. Oddly enough, the notes wanted to go to an ODBC folder, which did not exist.
    I go to admin tools/odbc and no new oracle odbc option under system dns.
    Whats the trick here? What do I need to do to an existing 10.2.0.3 install to get the new odbc options available in the odbc data source admin?
    I think I am missing a simple step. Unfortunately there is nothing I can find in searching here.

    I am assuming that when you say "I have Oracle 10.2.0.3 installed on a win2k workstation", you are referring to having the 10.2.0.3 Oracle client on your machine, right? Did you install the Oracle ODBC driver when you first installed the 10.2 Oracle client (under the Oracle Windows Interfaces option when doing the install)?
    When you go to Control Panel | Administrative Tools | Data Sources (ODBC) | Drivers, you should see an entry for the Oracle ODBC driver. You can use that driver to create new DSN's that would appear under the System DSN tab, but installing the driver won't create any new DSN's.
    Justin

  • Error message when installing Oracle 10g on Windows XP Professional

    Hello,
    I need help installing oracle 10g database. When I attempt to run the installation from the setup.exe icon, I get a message that says
    "Error in writing to directory C:\Documents and Settings\Owner\Local Settings\Temp\OraInstall2007-04-29_01-19-29PM. Please ensure this directory is writable and has atleast 45Mb of disk space. Installation cannot continue."
    When I try to open the installation from the Autorun icon, it points to an innability to find setup.exe and when I go back to Setup.exe, it gives me the above error. Everytime I try to run the installation and it fails, the installation leaves a folder in my Temp folder with the above format. Any help would be appreciated. Thank you.

    I do have administrative privilege on my computer and I have plenty of space. I have 80gb of free space. What do I do to successfully install the software without incurring those messages I displayed in my first thread?

  • I'm debutante in oracle 10g how to create a database with picture?

    I'm debutante in oracle 10g how to create a database with picture? help please

    d7401ec1-d4d6-4e54-9eb4-2181ac367d0c wrote:
    I'm debutante in oracle 10g how to create a database with picture? help please
    Oracle 10g is obsolete.  Oracle 11g is already at terminal release.
    Have you installed the Oracle rdbms software?
    Installing Oracle and Building the Database
    If you are going to be a professional DBA, you need to learn to
    1) read the documentation
    2) wean yourself from dependence on pictures and GUIs.
    3) read the documentation
    =================================================
    Learning how to look things up in the documentation is time well spent investing in your career.  To that end, you should drop everything else you are doing and do the following:
    Go to  docs.oracle.com.
    Locate the link for your Oracle product and version, and click on it.
    You are now at the entire documentation set for your selected Oracle product and version.
    BOOKMARK THAT LOCATION
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab (for 10.x) or the "Master Book List" link (for 11.x) you will find the complete documentation library.
    Spend a few minutes just getting familiar with what kind of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what kind of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth.  They are reference manuals.  Just get familiar with what is there to be referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    Then set yourself a plan to dig deeper.
    - *Read a chapter a day from the Concepts Manual*.
    - Take a look in your alert log.  One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - *When you have finished reading the Concepts Manual, do it again*.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
    =================================

  • Need help with Oracle reports 10g

    Hi
    we have a requirement in a oracle 10g application
    this application is on the unix server
    the requirement is such that the user must be able to print a report directly to the default printer
    when the user clicks on the button a report must be printed on the users default printer
    can u help us understand that how can we configure the local printer of the user on the unix server?

    hi, piyush9010
    Check this following link...
    Oracle reports 10g output directly to printer
    Oracle reports 10g output directly to printer
    Make your printer as shared printer then try.
    Use DESTYPE=PRINTER.
    http://qamarsyed.blogspot.com/2011/02/how-to-print-oracle-report-to-network.html
    http://docs.oracle.com/cd/E14571_01/bi.1111/b32121/pbr_cla005.htm#i637246
    Hope this helps
    If someone's response is helpful or correct, please mark it accordingly.

  • I have installed oracle 10g in my winxp machine. i am using enterprise manager. i am not able to shutdown the system as it asks for os username and password. i have provided my os username and password but eerror persiste. somebody pls help me to get rid

    I have installed oracle 10g in my winxp machine. i am using enterprise manager. i am not able to shutdown the system as it asks for os username and password. i have provided my os username and password but eerror persiste. somebody pls help me to get rid of this.

    Here I am using Java Type IV for database
    connection.
    So,there was no necessity of creating DNS.How your app communicates with db shouldn't matter for the end user. Still, you may want to use a functional network name also for the thin client driver connection string.
    So,is there any other way to solve this problem.What is the problem really? Do you not use dns for network naming? Maybe you have to manage the hosts file on every client then.

  • Running Multiple queries in Oracle 10g Express Edition! Help Me!

    I am new to Oracle 10g Express Edition.
    I used my browser to navigated to http://127.0.0.1:8080/apex
    I saw the database page.. logged in.. went into the SQL section.. now am not able to run two or more queries at the same time.. i have given a screenshot too. Plz.. check it and reply me quickly..
    http://i71.photobucket.com/albums/i149/prasanna7287/546895215.jpg
    Help me plz..
    Prasanna.

    There are two possibilities:
    1) Run the SQL commands, one command at a time;
    2) Create a script of multiple commands, and run the script.
    These are discussed in some detail in the online documentation at http://www.oracle.com/pls/xe102/homepage
    In particular, look at
    http://download-east.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25108/xedev_sql.htm#BJEIEIFJ
    Message was edited by:
    Hans Forbrich
    No ... wait ... please do not read the documentation! <g>

Maybe you are looking for

  • Camera Raw 5.6 plugin with photoshop CS3

    I have just bought a Canon 7D and downloaded the Camera Raw 5.6 plugin. When trying to install the screen reads 'cannot install the plugin' I have creative suite CS3 for windows XP, is this the problem? Any help would be much appreciated. Deborah

  • Unable to save or print .pdf using Safari 7.02. and Reader 11.0.6. (reinstalled reader) files ("save

    Using Mac 10.9.2 and Reader 11.0.6 and Safari 7.0.2, problem seems to be linked to Safari Files - using "save as" (.pdf) or "print as" (.pdf) appear as adobe single-page blank documents.  When attempting to open them the following error message appea

  • [?] Main Menu not showing after "Restore", resetting not helping

    Hi, I recently received my 30GB iPod Video 5G (got it for myself for Christmas). I began charging it. Meanwhile, I uninstalled my old iTunes, and installed the iPod / iTunes / Quicktime software on the CD that came with the iPod. All fine. I checked

  • Packages: binaries, sources, headers, ...

    Hi, I'm confused. I read somewhere that every package gives you not only the binaries and manpages, but also the full sources. Didn't whoever said this actually meant 'header files' instead of full sources?  I see header files in /usr/include, but no

  • Replication of the httpsession information

    hi,           i need some help and maybe one of you can help or give me at least           a hint.           following configuration: two machines with each two weblogic instances           which works within one cluster. and another machine is worki