Hi frnds this is the code for dynamic creation of users in plsql but these statements r not executing so pls help me for this error

DECLARE
n NUMBER;
BEGIN
n:=1;
WHILE(n<=10)
LOOP
CREATE user EM||n IDENTIFIED BY KLU;
GRANT CREATE SESSION,GRANT ANY PRIVILEGE TO EM||n;
COMMIT;
n:=n+1;
END LOOP;
END;

Hi,
     Here is the dynamic query for creating user and to give grants to user,
DECLARE
   n         NUMBER;
   cr_user   VARCHAR2 (300);
   gr_user   VARCHAR2 (300);
BEGIN
   n := 1;
   WHILE (n <= 10)
   LOOP
      cr_user := 'CREATE user EM' || n || ' IDENTIFIED BY KLU';
      gr_user := 'GRANT CREATE SESSION,GRANT ANY PRIVILEGE TO EM' || n || '';
      EXECUTE IMMEDIATE cr_user;
      EXECUTE IMMEDIATE gr_user;
      n := n + 1;
   END LOOP;
END;
Edited: Removed When OTHERS Exception Handling from Code.
Cheers!

Similar Messages

  • HT201272 A few songs from my old purchase is not available for download. It shows as purchased but I can't download it. Please help me resolve this problem, what do I need to do to enable download for all my purchased songs/movies etc. - Avinash

    Hi,
    A few songs from my old purchase is not available for download. It shows as purchased but I can't download it. Please help me resolve this problem, what do I need to do to enable download for all my purchased songs/movies etc.
    - Avinash

    The purchases are probably hidden:
    http://support.apple.com/kb/ht4919

  • I imported some 24P HD videos from my DSLR to Aperture but these videos do not show up in iMovie '09 for editing purposes. Although my previous 24P HD Videos from iPhoto '09 show up. Why can't I access these videos stored in Aperture library?

    I imported some 24P HD videos from my DSLR to Aperture but these videos do not show up in iMovie '09 for editing purposes. Although my previous 24P HD Videos from iPhoto '09 show up. Why can't I access these videos stored in Aperture library? I assumed that like  the videos in iPhoto, I would be able to access the videos in Aperture through iMovie. Come on Apple! I am starting to get frustrated with your products here. And this is saying a lot when I have been using and loving apple products for the last 4 years.

    Hi. My camera is a Canon 600D. And yes my videos are stored in the Aperture library and they are not referenced. Even then I tried to select all the videos in Aperture and clicked 'consolidate masters' and there was a messge that said all 'none of the files are referenced',... so they didn't need consolidating.
    I also tried preferences> export> external video editor > choose > iMovie. And then right click on the video to edit with imovie. Even then the video didn't show up in iMovie. It seems like the only option for me is to import the videos directly to iMovie which means there will be two versions of the same file stored in my computer eating up space.
    APPLE. What are you doing?

  • My ipod touch brightness just went to zero after charging it. i've tried adjusting it to 100% but it still does not changed. can anybody help me solve this problem? thankS!

    my ipod touch brightness just went to zero after charging it. i've tried adjusting it to 100% but it still does not changed. can anybody help me solve this problem? thankS!

    Have yu tried the standard fixes:
    - Resetting:
    Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Restoring the iPOd via iTunes.  First from backup and if problem persists, restore to factory defaults/new iPod
    - Make an appointment at the Genius Bar of an Apple store since you likely have a hardware problem

  • Where is this: " / in the code?

    http://www.simplyorganicskincare.com/ContactUs.html
    I transfered this site from Yahoo to Host Gator and fell into a pile of mush. None of the links were right, I think about 10,000 had to be changed. Anyway...
    Where is this in the code? " /> it's right above the form on the visible page.
    I've looked and looked and must be blind. It all looks pretty cluttered to me, but I'm not being paid, so am not going to do a big redo at this time. Oh, Host Gator is paying for getting the site transfered to them.
    Thanks for your help.
    Kath

    Run your page through the vaildator:
    http://validator.w3.org/
    Typically when that is showing it's an improperly closed tag.  The validator will tell you the line numbers to look at to fix the code.

  • Can't open iTunes. Get this msg: "The iTunes Library file is locked, on a locked disk, or you do not have write permission for this file." HELP!

    Can't open iTunes. Get this msg: "The iTunes Library file is locked, on a locked disk, or you do not have write permission for this file." HELP!

    go to the directory where the itunes librairy is stored (google search!). Select the file hit "command+i" on your keyboard or control click on the file and select get info. there is an option to either lock or ulock the file. unlock it. restart your computer and see if it works.

  • I bought  my MacBook Pro in 2010. This is the first Mac I have owned and recently it is having some difficulty loading we pages, often timing out. This Mac environment is entirely different for me and I am not sure where to begin troubleshooting/clean-up.

    I bought  my MacBook Pro in 2010. This is the first Mac I have owned and recently it is having some difficulty loading we pages, often timing out. This Mac environment is entirely different for me and I am not sure where to begin troubleshooting and/ or clean-up. I have moderate computer skills and try not to download or access questionable material, however recently I visited the Ap Store and purchased a couple of different aps to use in record keeping and for making a flyer. I am not even sure how to remove these programs to see if it helps.
    Any tips or tricks are appreciated.
    Thank you!

    Time to see about the PRAM battery.
    By the way iOS and OS X are different systems.
    iOS is the operating system for iPads, iPhones, and iPod touch.
    Mac OS X is the operating system for Mac labelled computers.

  • HT1349 The nice man Joseph Shen helped me with my google problem on my iPhone and worked for 2 days and now not working again please help me solve this problem were I can retrieve my messages on the I phone when I am not at home  on my wi Fi is the only t

    The nice man Joseph Shen helped me with my google problem on my iPhone and worked for 2 days and now not working again please help me solve this problem were I can retrieve my messages on the I phone when I am not at home  on my wi Fi is the only time it works correct. Bill. [email protected]  708 752  3667 

    http://lifehacker.com/5852948/what-to-do-if-youve-forgotten-your-iphones-passcod e

  • HT201210 once again my iphone not working. i have a usb sign pointing to an itune icon on the screen. this is been on for over 24 hours. tried to restore but keeps coming up with era can anyone help please

    once again my iphone not working. i have a usb sign pointing to an itune icon on the screen. this is been on for over 24 hours. tried to restore but keeps coming up with era can anyone help please

    What is the error that is occurring?  We are not mind readers.

  • Hi ...Some days ago i bought a used iphone 4s....but i can't activate the phone...when i connect it to itunes it shown that activate the phone but the person was not give me the ID & password....pls help me for this issue....Iphone is my favourite ph

    Hi ...Some days ago i bought a used iphone 4s....but i can't activate the phone...when i connect it to itunes it shown that activate the phone but the person was not give me the ID & password....pls help me for this issue....Iphone is my favourite phone...in my child hood i love Apple products & till now......I can't activate it & for this reason i can't find the carrier network & can't make any call....pls help me...thanks for always support..My device ios is 7.1.2
    & IMEI is : *****
    Br-----------------------
    Fazlur
    <Personal Information Edited By Host>

    It's a security risk to post your IMEI number and I've asked the Hosts to remove it.
    If a second-hand iOS device has been 'Activation locked' then only the previous owner can unlock it, either by providing you with the account ID and password, or by removing it from his list of devices (as he should have done before selling it) - please see http://support.apple.com/kb/ts4515
    If you are unable to contact him to do this then I'm afraid you will not be able to use the device - there is no other way of unlocking it at all. Apple cannot unlock it for you.
    You should if possible return it to wherever you bought it and ask for a refund as in this event the device is completely useless.

  • How to configure the schema name dynamically based on user input.

    configure the schema name dynamically based on user input.
    For ex:
    We have two schemas:
    Schema1  - base schema having 15 tables.
    Schema2 -  tables which is specific to modules. Having only 10 tables which is also available in Schema1
    Login to application using Schema 1
    Access a particlular module and select the country. Here country selection is identified.
    Based on the country selection, we need to connect the schema respectively.
    If the user selects France --> It should connect Schema1
    If the user selects Germeny --> It should connect schema2.
    Used: Eclipselink

    You may want to have a different persistence unit for each country, then you just need to switch persistence units, and can put the schema in your orm.xml file.
    You may also want to investigate EclipseLink multi-tenant support,
    http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/a_multitenant.htm
    You can the schema in a persistence unit in code using a SessionCustomizer and the tableQualifier.

  • Can someone pls help me with this code

    The method createScreen() creates the first screen wherein the user makes a selection if he wants all the data ,in a range or single data.The problem comes in when the user makes a selection of single.that then displays the singleScreen() method.Then the user has to input a key data like date or invoice no on the basis of which all the information for that set of data is selected.Now if the user inputs a wrong key that does not exist for the first time the program says invalid entry of data,after u click ok on the option pane it prompts him to enter the data again.But since then whenever the user inputs wrong data the program says wrong data but after displaying the singlescreen again does not wait for input from the user it again flashes the option pane with the invalid entry message.and this goes on doubling everytime the user inputs wrong data.the second wrong entry of data flashes the error message twice,the third wrong entry flashes the option pane message 4 times and so on.What actually happens is it does not wait at the singlescreen() for user to input data ,it straight goes into displaying the JOptionPane message for wrong data entry so we have to click the optiion pane twice,four times and so on.
    Can someone pls help me with this!!!!!!!!!
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import java.util.*;
    public class MainMenu extends JFrame implements ActionListener,ItemListener{
    //class     
         FileReaderDemo1 fd=new FileReaderDemo1();
         FileReaderDemo1 fr;
         Swing1Win sw;
    //primary
         int monthkey=1,counter=0;
         boolean flag=false,splitflag=false;
         String selection,monthselection,dateselection="01",yearselection="00",s,searchcriteria="By Date",datekey,smonthkey,invoiceno;
    //arrays
         String singlesearcharray[];
         String[] monthlist={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"};
         String[] datelist=new String[31];
         String[] yearlist=new String[100];
         String[] searchlist={"By Date","By Invoiceno"};
    //collection
         Hashtable allinvoicesdata=new Hashtable();
         Vector data=new Vector();
         Enumeration keydata;
    //components
         JButton next=new JButton("NEXT>>");
         JComboBox month,date,year,search;
         JLabel bydate,byinvno,trial;
         JTextField yeartext,invtext;
         JPanel panel1,panel2,panel3,panel4;
         JRadioButton single,range,all;
         ButtonGroup group;
         JButton select=new JButton("SELECT");
    //frame and layout declarations
         JFrame jf;
         Container con;
         GridBagLayout gridbag=new GridBagLayout();
         GridBagConstraints gc=new GridBagConstraints();
    //constructor
         MainMenu(){
              jf=new JFrame();
              con=getContentPane();
              con.setLayout(null);
              fr=new FileReaderDemo1();
              createScreen();
              setSize(500,250);
              setLocation(250,250);
              setVisible(true);
    //This is thefirst screen displayed
         public void createScreen(){
              group=new ButtonGroup();
              single=new JRadioButton("SINGLE");
              range=new JRadioButton("RANGE");
              all=new JRadioButton("ALL");
              search=new JComboBox(searchlist);
              group.add(single);
              group.add(range);
              group.add(all);
              single.setBounds(100,50,100,20);
              search.setBounds(200,50,100,20);
              range.setBounds(100,90,100,20);
              all.setBounds(100,130,100,20);
              select.setBounds(200,200,100,20);
              con.add(single);
              con.add(search);
              con.add(range);
              con.add(all);
              con.add(select);
              search.setEnabled(false);
              single.addItemListener(this);
              search.addActionListener(new MyActionListener());     
              range.addItemListener(this);
              all.addItemListener(this);
              select.addActionListener(this);
         public class MyActionListener implements ActionListener{
              public void actionPerformed(ActionEvent a){
                   JComboBox cb=(JComboBox)a.getSource();
                   if(a.getSource().equals(month))
                        monthkey=((cb.getSelectedIndex())+1);
                   if(a.getSource().equals(date)){
                        dateselection=(String)cb.getSelectedItem();
                   if(a.getSource().equals(year))
                        yearselection=(String)cb.getSelectedItem();
                   if(a.getSource().equals(search)){
                        searchcriteria=(String)cb.getSelectedItem();
         public void itemStateChanged(ItemEvent ie){
              if(ie.getItem()==single){
                   selection="single";     
                   search.setEnabled(true);
              else if (ie.getItem()==all){
                   selection="all";
                   search.setEnabled(false);
              else if (ie.getItem()==range){
                   search.setEnabled(false);
         public void actionPerformed(ActionEvent ae){          
              if(ae.getSource().equals(select))
                        if(selection.equals("single")){
                             singleScreen();
                        if(selection.equals("all"))
                             sw=new Swing1Win();
              if(ae.getSource().equals(next)){
                   if(monthkey<9)
                        smonthkey="0"+monthkey;
                   System.out.println(smonthkey+"/"+dateselection+"/"+yearselection+"it prints this");
                   allinvoicesdata=fr.read(searchcriteria);
                   if (searchcriteria.equals("By Date")){
                        System.out.println("it goes in this");
                        singleinvoice(smonthkey+"/"+dateselection+"/"+yearselection);
                   else if (searchcriteria.equals("By Invoiceno")){
                        invoiceno=invtext.getText();
                        singleinvoice(invoiceno);
                   if (flag == false){
                        System.out.println("flag is false");
                        singleScreen();
                   else{
                   System.out.println("its in here");
                   singlesearcharray=new String[data.size()];
                   data.copyInto(singlesearcharray);
                   sw=new Swing1Win(singlesearcharray);
         public void singleinvoice(String searchdata){
              keydata=allinvoicesdata.keys();
              while(keydata.hasMoreElements()){
                        s=(String)keydata.nextElement();
                        if(s.equals(searchdata)){
                             System.out.println(s);
                             flag=true;
                             break;
              if (flag==true){
                   System.out.println("vector found");
                   System.exit(0);
                   data= ((Vector)(allinvoicesdata.get(s)));
              else{
                   JOptionPane.showMessageDialog(jf,"Invalid entry of date : choose again");     
         public void singleScreen(){
              System.out.println("its at the start");
              con.removeAll();
              SwingUtilities.updateComponentTreeUI(con);
              con.setLayout(null);
              counter=0;
              panel2=new JPanel(gridbag);
              bydate=new JLabel("By Date : ");
              byinvno=new JLabel("By Invoice No : ");
              dateComboBox();
              invtext=new JTextField(6);
              gc.gridx=0;
              gc.gridy=0;
              gc.gridwidth=1;
              gridbag.setConstraints(month,gc);
              panel2.add(month);
              gc.gridx=1;
              gc.gridy=0;
              gridbag.setConstraints(date,gc);
              panel2.add(date);
              gc.gridx=2;
              gc.gridy=0;
              gc.gridwidth=1;
              gridbag.setConstraints(year,gc);
              panel2.add(year);
              bydate.setBounds(100,30,60,20);
              con.add(bydate);
              panel2.setBounds(170,30,200,30);
              con.add(panel2);
              byinvno.setBounds(100,70,100,20);
              invtext.setBounds(200,70,50,20);
              con.add(byinvno);
              con.add(invtext);
              next.setBounds(300,200,100,20);
              con.add(next);
              if (searchcriteria.equals("By Invoiceno")){
                   month.setEnabled(false);
                   date.setEnabled(false);
                   year.setEnabled(false);
              else if(searchcriteria.equals("By Date")){
                   byinvno.setEnabled(false);
                   invtext.setEnabled(false);
              monthkey=1;
              dateselection="01";
              yearselection="00";
              month.addActionListener(new MyActionListener());
              date.addActionListener(new MyActionListener());
              year.addActionListener(new MyActionListener());
              next.addActionListener(this);
              invtext.addKeyListener(new KeyAdapter(){
                   public void keyTyped(KeyEvent ke){
                        char c=ke.getKeyChar();
                        if ((c == KeyEvent.VK_BACK_SPACE) ||(c == KeyEvent.VK_DELETE)){
                             System.out.println(counter+"before");
                             counter--;               
                             System.out.println(counter+"after");
                        else
                             counter++;
                        if(counter>6){
                             System.out.println(counter);
                             counter--;
                             ke.consume();
                        else                    
                        if(!((Character.isDigit(c) || (c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)))){
                             getToolkit().beep();
                             counter--;     
                             JOptionPane.showMessageDialog(null,"please enter numerical value");
                             ke.consume();
              System.out.println("its at the end");
         public void dateComboBox(){          
              for (int counter=0,day=01;day<=31;counter++,day++)
                   if(day<=9)
                        datelist[counter]="0"+String.valueOf(day);
                   else
                        datelist[counter]=String.valueOf(day);
              for(int counter=0,yr=00;yr<=99;yr++,counter++)
                   if(yr<=9)
                        yearlist[counter]="0"+String.valueOf(yr);
                   else
                        yearlist[counter]=String.valueOf(yr);
              month=new JComboBox(monthlist);
              date=new JComboBox(datelist);
              year=new JComboBox(yearlist);
         public static void main(String[] args){
              MainMenu mm=new MainMenu();
         public class WindowHandler extends WindowAdapter{
              public void windowClosing(WindowEvent we){
                   jf.dispose();
                   System.exit(0);
    }     

    Hi,
    I had a similar problem with a message dialog. Don't know if it is a bug, I was in a hurry and had no time to search the bug database... I found a solution by using keyPressed() and keyReleased() instead of keyTyped():
       private boolean pressed = false;
       public void keyPressed(KeyEvent e) {
          pressed = true;
       public void keyReleased(KeyEvent e) {
          if (!pressed) {
             e.consume();
             return;
          // Here you can test whatever key you want
       //...I don't know if it will help you, but it worked for me.
    Regards.

  • My iPhone's screen black, it does not work and I tied to hold press power and home press but it did not work? By the way for seconds I saw iTunes cabal  simple, but unfortunately, I do not have backup for my iPhone in my mac, so how can I restore my iphon

    My iPhone's screen black, it does not work and I tied to hold press power and home press but it did not work? By the way for seconds I saw iTunes cabal  simple, but unfortunately, I do not have backup for my iPhone in my mac, so how can I restore my iphone without loss my date?
    Thanks

    lbryan1987 wrote:
    I dont want the button problem solved i need to know how to restore the phone without using that button or going into settings
    You don't in the condition it's in. You will either have to get the phone replaced by Apple or pay a 3rd party to repair it.
    there seriously should be more than two ways to solve this other wise apple is useless and we will never buy another apple product.
    Seriously? It's physically broken!

  • I have adobe acrobat pro for windows and it is freezing up when I try to convert a word file to pdf... I have tried to get this done six ways from Sunday but it is just not working... help!  Chris.

    I have adobe acrobat pro for windows and it is freezing up when I try to convert a word file to pdf... I have tried to get this done six ways from Sunday but it is just not working... help!  Chris.

    It would be helpful to know what version of Acrobat, WORD, and operating system.
    Without that info, I would suggest at this point to open your WORD file and then go to the print menu and print to file using the Adobe PDF printer. Open the created file in Distiller and see if you get a PDF. If so, check to see if AcroTray is running in the background.
    You say you tried many ways. It would help to know what you tried and what worked or did not work, and at what point the failure occurs.

  • I have a 2010 Macbook Pro and am a very new user to Mac community. My Mac is just hanging and I am unable to shut it down or do anything at all.  I left it for 2.5 days hoping the battery will run flat but it is not working. Pls help! I am desperate. Tx

    I have a 2010 Macbook Pro and am a very new user to Mac community only started to use this PC a few weeks ago.
    My Mac is just hanging and I am unable to shut it down or do anything at all.  I left it for 2.5 days hoping the battery will run flat but it is not working. Pls help! I am desperate. Tx

    In order to resolve the issue if it occurs again, more info would be helpful as to what occurred prior to the "hang." One potential fix would be to try a Safe Boot:
    After the Mac is completely shut down, push the power button and immediately after the startup tone, hold down the Shift key. The Shift key should be held as soon as possible after the startup tone but not before.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    There should be a message that says "SafeBoot." After the Mac is completely booted, try restarting and see if the issue is gone.

Maybe you are looking for

  • Reverse compile from 7.0 to 6.1

    after i open / save vi in 7.0 it does not work on 6.1 computer ... i have 7.0 version only now... i would like to reverse compile attached vi s can i? Attachments: Get_File_List.vi ‏42 KB LabVirew_Dir_List.vi ‏37 KB Write_String_Array_To_Spreadsheet_

  • Alternative BOM problem in MRP run

    Hello Experts, We have two BOM for one material.Now I want to use BOM-1 for MRP run & BOM-2 for subcontracting.I have maintined following settings. 1) Production version. 2) BOM explosion selection method in MRP4 -2 3) Assign PV in inforecord for sub

  • Settlement values in transaction currency for a project

    Hi All, We have peroformed results analysis and settlement for a project. System is performing settlement to profitability segment and FI. However, system is not updating the settlement values in transaction currency. Please advise. Thanks, Ashok

  • Hyperion Planning and eBusiness Suite ODI integration

    Hi, I have to integrate eBusiness Suite and Hyperion Planning, mostly exporting data from eBusiness Suite to load into Hyperion Planning. I'm allready using eBusiness Suite connectors. I'd like to know if there is some start point to understand eBS m

  • Windows server 2012 RDSH

    I have application servers running on windows server 2008 R2. Is it possible that i can install session host role on windows server 2008 R2 and web access and connection broker role with windows server 2012.