Newbie: deleting and creating a similar user

Oracle 10g
HI: I need to remove and recreate the user. That's what I had in my previous notes.

1. How do I tell me what is the current default tablespace
2. how to find out the current temporary tablespace?
3. space table and space temporary table deleted when I drop the user. If so, is it possible some other user's default tablespace, and temporary tablespace is the same as well.
Drop user systems cascade;
/
CREATE USER SYSTEMS
  IDENTIFIED BY VALUES 'Test123'
  DEFAULT TABLESPACE USERS
  TEMPORARY TABLESPACE TEMPts1
  PROFILE DEFAULT
  ACCOUNT UNLOCK;
/

When you delete a user space temporary table and default don't get deleted.

Before you delete a user, the user creation script, give the script like this.

1. create the user script

Go head
set pages 0
long value 9999999
Select dbms_metadata.get_ddl ('USER', username) | usercreate ' / ' from dba_users;

or

SELECT DBMS_METADATA. GET_DDL ('USER', USERNAME) | ' / ' DDL FROM DBA_USERS;

2 grant script
SELECT DBMS_METADATA. GET_GRANTED_DDL ('ROLE_GRANT', 'username') FROM DUAL;
SELECT DBMS_METADATA. GET_GRANTED_DDL ('SYSTEM_GRANT', 'username') FROM DUAL;
SELECT DBMS_METADATA. GET_GRANTED_DDL ('OBJECT_GRANT', 'username') FROM DUAL;

Tags: Database

Similar Questions

  • How to remove an admin account and create a new user profile

    Hi, I have been using my 2 in 1 PC since July last year and I'd like you guys to show me the steps on How to remove an admin account and create a new user account.

    Hello Nicolas,.

    Thanks for posting your question on the Microsoft community.

    I would like to know some information about the problem so that we can help you better.

    1. you try to delete a local administrator account?
    2. are you able to connect using the Microsoft account?

    Thank you for your query details.

    I also like the fact you want to know how to remove an administrator account and create

    a new user account.

    If you are able to connect on the Microsoft account, I suggest you try the following steps to remove an administrator account.

    a. press Windows + X keys and click on computer management.
    b. click on "local users and groups" and then click on "users".
    c. right-click on the account which you want to remove, and then click 'Remove'.
    d. click 'Yes', if the prompt message.

    To create a new user account, please see this article:
    Create a user account
    http://Windows.Microsoft.com/en-us/Windows/create-user-account#create-user-account=Windows-8

    See also:
    User accounts: FAQ
    http://Windows.Microsoft.com/en-us/Windows/user-accounts-FAQ#1TC=Windows-8

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • drive appears as a drive system, but it is not. I deleted and created a new O drive, but Windows 7 backup insists that it is a system drive!

    drive appears as a drive system, but it is not. I deleted and created a new O drive, but Windows 7 backup insists that it is a system drive!

    Hello

    Backup to a different partition on the same drive is not recommended and the car fails, you will not be able to retrieve or use the backup.

  • ¿Will do a delete and create a new temp.dbf performance increase?

    I have a 32 GB temp file. I do not so understand what really mean that temp.dbf must be so great.

    The question is: can I delete and create a new temp.dbf? and what does this mean?

    I am beginner in this.

    Thank you, Luis.

    Published by: cabezanet on November 23, 2009 09:10

    Of course, delete and re-create the temp tablespace if the size is too large.

    cabezanet wrote:
    You have been very helpful. I guess in your reply that I can do a drop for temp.dbf I suppose that this isn't a problem, but it is not necessary unless the size used by this file is too large.

    Thank you very much!

    PS: But I see no marks on my post :)

  • Remove the admin and create a new user without disc 10.6.5

    I got a new computer from a friend, family, which has expired.    I did not drive or Admin password, how do I remove the admin wipe and back in mobile by default so I can create a new user

    You will need the original installation provided with computer discs.

    Clean Install of Snow Leopard

    1. start the computer using the Snow Leopard installation disc or disc 1 that came

    with your computer.  Insert the disc into the optical drive and restart the computer.

    After the ring, press and hold the C"" key.  Release the button when you see

    a small gear appear under the dark gray Apple logo.

    2. once the load setup program select your language and click continue

    button. When the menu bar appears select utility drive in the Utilities menu.

    After charge OF select hard drive entry in the list on the left (mfgr. ID and drive

    size.)  Click the Partition tab in the main window of THE.  Set the number of

    partitions to one (1) from the Partitions of the dropdown menu, click on the Options button

    GUID, click OK, and then select define the Mac OS Extended format type

    (Logged, if supported), and then click the apply button.

    3. when formatting is complete FROM and return to the installer.  Move forward

    with the installation of OS X and follow the instructions included with the installer.

    4. Once installation is complete your computer will restart in the Setup

    Assistant. After finishing Setup Wizard will complete the installation, after which

    you will use a new installation of Mac OS X.  You can now begin the process of updating

    at the opening of updated software and installing all recommend updates to bring your

    current installation.

    Download and install Mac OS X 10.6.8 v1.1 updated Combo.

  • How to create a stored procedure to delete and create table

    Version: Oracle 10g

    I am trying to create a stored procedure that is delete it and create a table based on a select statement. I can create the table, but I can't let it go.

    CREATE or REPLACE procedure EC_LOAD is
    Start
    INSERT INTO Sales_table
    (FSCL_WK,
    DIV,
    ACCT_TYPE)
    Select
    FSCL_WK,
    DIV,
    ACCT_TYPE
    Of
    sales_revenue;
    end ecload;

    I need to drop the Sales_table before inserting the values. How can I do this?

    user610131 wrote:

    I need to drop the Sales_table before inserting the values. How can I do this?

    If you drop off where you insert it :)? Do you mean DELETE or TRUNCATE?

    If table can be truncated (and don't forget TRUNCATE is DDL then he will commit):

    CREATE OR REPLACE procedure EC_LOAD is
    begin
    EXECUTE IMMEDIATE 'TRUNCATE TABLE Sales_table';
    INSERT INTO Sales_table
    (FSCL_WK,
    DIV,
    ACCT_TYPE)
    Select
    FSCL_WK,
    DIV,
    ACCT_TYPE
    from
    sales_revenue;
    end ecload;
    

    Otherwise, use DELETE:

    CREATE OR REPLACE procedure EC_LOAD is
    begin
    DELETE Sales_table;
    INSERT INTO Sales_table
    (FSCL_WK,
    DIV,
    ACCT_TYPE)
    Select
    FSCL_WK,
    DIV,
    ACCT_TYPE
    from
    sales_revenue;
    end ecload;
    

    SY.

  • Disk space reduced after deleting and creating SATA data warehouses

    I was experimenting with measurement feature multiple with a host ESXi 5.0 (build 515841), which has two 2 TB SATA drives connected to the motherboard SATA controller. For the test, the first hard drive was installed with a VMFS5 data store and the second disc was added as an additional measure. The ability to store data went up 3.62 to as expected (individual drives show up 1.81 TB in VMware). After the test, I deleted the data store to configure the drives as of separate data warehouses. The second disc correctly displays a 1.81 TB of available space, but the first drive shows only a maximum of 256 GB of available space. The structure of the disc shown before creating the data store on the first hard disk shows 1.81 TB of free space. Additional free space can be recovered without having to reinstall ESXi? Thank you.

    I didn't not experiment a lot with VMFS-5 me yet, but I have had a few discussions with other users. What they say, you can be able to increate the VMFS partition of size (in stages) by using partedUtil, and then run vmkfstools to cultivate the datatore. See for example Re: cannot increase the capacity of VMFS 5.54 data store

    With your layout of the partition, it would be s.th. as these two commands:

    partedUtil resize "/vmfs/devices/disks/vml.01000000002020202020204d4e313232304633304d41553544486974616368" 3 10229760 3907029167
    vmkfstools --growfs "/vmfs/devices/disks/vml.01000000002020202020204d4e313232304633304d41553544486974616368:3" "/vmfs/devices/disks/vml.01000000002020202020204d4e313232304633304d41553544486974616368:3"
    

    André

  • ORA-02289 delete and create sequences to help to run immediately

    Hi all

    I copied a schema of one database to another.
    In the former base my package works very well and the procedure inside the PKG_REFRESH package below works like a charm.

    PROCEDURE FILL_TABLE(P_PROC_ID INTEGER) AS
    BEGIN
    EXECUTE IMMEDIATE (' drop sequence sq1' ");
    EXECUTE IMMEDIATE (' create the sequence sq1 with cache of 1 500 ft);
    v_kenmerk: = 'dim_1 ';
    INSERT INTO dim_1)
    Field1
    Field2
    ... < snip >
    END;

    Now that I have imported the package in a different database, and while footage used by inside the packaging procedures exist, it gives the errors below:

    Start
    *
    LAUGHING at regel 1:
    . ORA-02289: sequence does not exist
    ORA-06512: at "OWNER. PKG_REFRESH", line 117
    ORA-06512: at "OWNER. PKG_REFRESH', line 80
    ORA-01031: insufficient privileges
    ORA-06512: at "OWNER. PKG_REFRESH', line 20
    ORA-06512: at line 3 level

    I checked and the sequence is abandoned, but has not been recreated. However, it only gives me an error message when you try to create the sequence.
    I'm puzzled... search this forum, google and metalink did not help me either.

    Does anyone have an idea why this is happening? Strange is that it does not work on the old database.

    Robin

    Published by: RobbieNerve on June 30, 2011 10:27 I forgot to say that the procedure is inside the package

    Try to give an explicit subsidy to the user:

    GRANT CREATE SEQUENCE TO OWNER;
    

    Max

  • Create the local user g 12 DB

    Hello

    I am trying to create a local test user (DB 12 g Win7 / 64):

    SQL > conn sys

    SQL > alter session set container = PDBORCL;
    Altered session.


    SQL > show con_name

    CON_NAME
    ------------------
    PDBORCL


    SQL > create user test identified by the test.


    == > ORA-01109: database is not open.

    Select... v_$ services;


    0pdborcl2477889254pdborcl0
    5db112gr1XDB1684560570db112gr1XDB25.07.134091627695
    6db112gr11712327574db112gr125.07.134091627695
    1SYS$ BACKGROUND16595921928.06.133062388681
    2USERS OF SYS$342705567628.06.133062388681



    Sorry, I do not learn and understand the new concept of the current user / local again.


    How can I start the PDB and create a local user to manage the normal grant as users of 11 g DB schema?


    A big thank you and best regards

    Friedhold



    Hi Friedhold,

    I think the problem is that you connect to the database container rather than to the snap-in data base. You must connect the name of service associated with this snap-in db. Change connection string to test/test@pdborcl

    that should be found in your tnsnames file. Or you can use a syntax ezconnect.

    sqlplus test/test@//localhost:1521/pdborcl (or something similar)

    I posted a similar example on my blog that you can follow from beginning to end that can help explain.

    http://dbaharrison.blogspot.co.UK/2013/07/create-simple-user-in-12C-pluggable.html

    see you soon,

    Harry

  • Click right does not work. Profile already deleted and started in safe mode

    I googled and used solutions of mozilla for safe mode, delete and create a new profile (deleted all files) disabled all the plugins. I discovered a problem where clicking on ask to activate does not drop down to select another option. I tried the plugins folder thought I could delete all the plugins and start again. Nothing I've tried has worked at all. I also uninstalled and reinstalled the latest version. I noticed that the version installed is under program (x 86), which is where I thought that 32-bit applications are implemented? Anyway, even by selecting text on a page and right click does not work

    You have a problem of mouse anywhere else?

    The software on your system is up to date?

    Start your computer in safe mode with network. Then launch Firefox.
    Is always the question?

    Start the computer in Mode safe;
    Free online encyclopedia

  • DROP table and CREATE with column name and ORA: 00904

    Hello
    I created a table with an attribute date CRTD_ON and two other attributes. Successfully created. I can see the data tab and the window empty data with column names in the header...
    Now, I had to change the name of field attribute date on OPNG_DATE so I don't bother to change, instead, I deleted and created with the name of the column has changed. Then I restart the ddl. Once again managed to create. But this time I am not able to see the data tab or the column headings. And I see the error of the log of the data Publisher ORA-00904: "CRTD_ON": invalid identifier
    Is this a bug?

    There is a current bug where you will get the data if you have a public synonym with the same table name pointing to another table with another structure. Can you confirm that in your environment?

    K.

  • How can I create a new user account any movement towards it and delete the old

    Win7 need to create a new user ACCT. move all the Info for it because want to rename the computer, and then delete the old user account

    To create a new user profile

    To create a new profile, you must first create a new user account. When the account is created, a profile will also be created.

    1. Open a user account by clicking on the button start , by clicking on the Control Panel, click user accounts and family safety (or by clicking on user accounts, if you are connected to a network domain), and then clicking user accounts.

    2. Click on manage another account. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    3. Click on create a new account.

    4. Type the name you want to assign to the user account, click an account type, and then click on create an account.

    To copy files to the new user profile

    After creating the profile, you can copy the files from the existing profile. You must have at least three user accounts on the computer to perform these operations, including the new account that you created.

    1. Log on as a user other than the new user that you created or the user that you want to copy the files.

    2. Open Documents by clicking on the button start , and then clicking Documents.

    3. Click on the Tools menu, and then click Folder Options.

      If you don't see the Tools menu, press ALT.

    4. Click the view tab, click hidden files and folders, clear the Hide protected operating system files check box, and then click OK.

    5. Find the C:\Users\Old_Username folder, where C is the drive that Windows is installed, and where ancien_nom_utilisateur represents the name of the profile you want to copy the files to.

    6. Select all the files and folders in this folder, except the following files:

      • Ntuser.dat

      • Ntuser.dat.log

      • Ntuser.ini

    7. Click the Edit menu and then click on copy.

      If you don't see the Edit menu, press ALT.

    8. Look for the C:\Users\New_Username folder, where C represents the drive Windows is installed, and New_Username is the name of the new user profile you created.

    9. Click the Edit menu and then click on paste.

      If you don't see the Edit menu, press ALT.

    10. Sign out and then sign back in as a new user.

      If you have messages in e-mail, such as Windows Mail, you must import your e-mail messages and addresses to the new user profile before you delete the old profile. If everything is working properly, you can delete the old profile.

  • I created a new user account and now I can't find my documents, photos and music

    I created a new user account and made computer administrater and now all my documents, music, photos have gone what to do to get back to my old account

    Hello

    1. did you remove the old account?

    If you have not deleted the old user account, and then follow the steps in this link to copy files to the new user account and check if it helps:

    http://Windows.Microsoft.com/en-us/Windows-Vista/fix-a-corrupted-user-profile

    Check if that helps.

  • Can we delete the views created for a user in Oracle BPM J2EE WL

    I use Oracle BPM 10.3 MP2 Enterprise Edition
    Version: 10.3.2
    Build: #100486

    Can we delete the views created for a user in the workspace?
    Usually, we use the filter option in the workspace and then saving them as a view.
    Would like to know if we can remove these views and create it again.

    These views are specific to the user

    Thanks in advance.
    Sree-

    I don't think that there is another way to do it, but maybe I'm wrong.
    Concerning

  • Last year, I bought my laptop and I tried to create a second user account but I placed it somehow this account as the Admin user. I don't remember the password and my file vault is of course.

    Last year, I bought my laptop and I tried to create a second user account but I placed it somehow this account as the Admin user. I don't remember the password and my file vault is of course.

    What password? You can change a password for the account, but if you do not know the FileVault password, you are in a bind. You need to call Apple directly if you their sent an emergency password when configuring the FV.

    For a user account:

    You forgot your password

    Lion or later version

    Reset a password in Mac OS X 10.7 Lion

    OS X Lion mountain - reset a login password,

    OS X Mavericks-solve password problems,.

    OS X Lion-Apple ID can be used to reset your password for the user account.

Maybe you are looking for