delete mass records
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: delete mass records

  1. #1
    Join Date
    Jan 2007
    Posts
    231

    delete mass records

    hello,
    Iam using SuseLinux server,oralce9.2 . i have nearly 35000 users in prodution database each users are linked with 170 tables.In that nearly 6500 users are disabled that is . the account is closed.I want to remova all disabled users from my db.All i have to do in 30 min pls help.

    thanks in advance

  2. #2
    Join Date
    Dec 2006
    Location
    hyderabad
    Posts
    21
    spool drop1.sql
    select 'drop user' || username || 'cascade;' from dba_users where account_status=locked;
    spool off

    @drop1.sql

    this scrip would collect the list of disabled users & drop them one by one
    try it on first on ur test database make sure there r no depending objects
    corresponding to the users being dropped with current users

  3. #3
    Join Date
    Jan 2007
    Posts
    231
    thanks giriraj,
    The problem is ,when a user singup his account willbe added in the person (master)table from master it is linked to other tables.So I want to remove his account from the table.

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    so this is an application thing, not a database thing - only you know the sql for doing that

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