DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: drop user

  1. #1
    Join Date
    Dec 2002
    Posts
    89

    drop user

    Hi,
    Is there anyway i can update all tables have column which has data called "user1" to "user".
    my problem is i am trying to drop user "user1" but has referential constraint on lots of table .So i disable all constraint drop user "user1" and create user "user" but now i am not able enable constraint.

  2. #2
    Join Date
    Mar 2002
    Posts
    200

    Re: drop user

    Originally posted by kpate
    Hi,
    Is there anyway i can update all tables have column which has data called "user1" to "user".
    my problem is i am trying to drop user "user1" but has referential constraint on lots of table .So i disable all constraint drop user "user1" and create user "user" but now i am not able enable constraint.

    Hmmm. I am not sure if I understand your requirement.

    But if you wanted everything of USER1 to remain "as-is" and that it's just the question of changing the name of USER1 to USER (Can you create a user with the name "user" ? ) - Then you may do the following:

    1)Export All Tables of USER1
    2)DROP USER USER1 Cascade;
    3)Create the new USER
    4)Import the tables into the new USER's Schema

    Does that help, not sure.

  3. #3
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    you will have to recreate the constraints...

    as the constraints refer to the user1.table_name.column_name but now its like user.table_name.column_name
    now as the user1 no longer exists the constraints cannot be enabled...

    HTH
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width