乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      Oracle 數(shù)據(jù)泵遷移用戶創(chuàng)建 SQL語句

       LuciferLiu 2021-12-10

      在進(jìn)行數(shù)據(jù)泵遷移時,通常是按照用戶進(jìn)行導(dǎo)入導(dǎo)出,因此需要確認(rèn)當(dāng)前數(shù)據(jù)庫中存在那些非系統(tǒng)用戶!

      查看數(shù)據(jù)庫中用戶狀態(tài)為 OPEN 的用戶:

      select username,account_status,created,PROFILE from dba_users where account_status='OPEN' order by created;

      通過上述sql查詢出的結(jié)果中,根據(jù) created 字段可以篩選掉非系統(tǒng)用戶!

      查看數(shù)據(jù)庫中的角色:

      select * from dba_roles;

      創(chuàng)建用戶 SQL:

      select 'create user ' || t.username || ' identified by values ' || chr(39) ||   u.password || chr(39) || ' default tablespace ' ||   t.default_tablespace || ' profile ' || p.name || ' Temporary TABLESPACE '|| TEMPORARY_TABLESPACE  ||';' create_user_withoutpass  from dba_users t, sys.user$ u, sys.profname$ p, sys.user_astatus_map m where t.user_id = u.user#
         and u.resource$ = p.profile#
         and u.astatus = m.status#
         and t. username in ('需要創(chuàng)建的用戶名,用逗號隔開');

      用戶授權(quán):

      select 'GRANT connect,resource,unlimited tablespace,DBA to ' ||username|| ';' from dba_users where username in ('需要創(chuàng)建的用戶名,用逗號隔開');

      ?? 注意:如果是使用expdp,則不需要創(chuàng)建用戶和授權(quán)!


      本次分享到此結(jié)束啦~

      如果覺得文章對你有幫助,點(diǎn)贊、收藏、關(guān)注、評論,一鍵四連支持,你的支持就是我創(chuàng)作最大的動力。

        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多