首页 > Oracle Retail, 默认 > RMS系统用户创建

RMS系统用户创建

RMS系统用户的创建非常繁琐,而且需要后台处理,这里总结步骤如下:

1、在数据库后台创建DB用户。

2、对创建的用户授予角色权限、系统权限。

以上两步可使用以下SQL脚本完成:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*==================================================
  Copyright (C) HAND Enterprise Solutions Co.,Ltd.
             AllRights Reserved
  ==================================================*/
/*==================================================
  Program Name:
      CREATE RMS USER
  Description:
      This program create Oracle rms db user and grant all privileges .
  History:
      1.00  2008-11-10  Kenneth.shao    Creation
      2.00  2008-11-10  Kenneth.shao    Modified
            修改角色授权,增加选择角色功能,可以支持授权多个角色,用“,”号分割
            如:developer,select_catalog_role
  Version:
      2.00
  ==================================================*/
DECLARE
  l_user_name VARCHAR2(30) := '&USER_NAME' ;
  l_roles     VARCHAR2(400) := '&ROLE' ;
  l_crt_user varchar2(300) := 'create user '|| l_user_name ||'
  identified by "' || l_user_name || '"
  default tablespace RETEK_DATA
  temporary tablespace TEMP
  profile DEFAULT
  quota unlimited on lob_data
  quota unlimited on retek_data
  quota unlimited on retek_index';
  l_grant VARCHAR2(4000) ;
BEGIN
  --Create user
  EXECUTE IMMEDIATE l_crt_user ;
 
  --Grant directory
  l_grant := 'grant read on directory SYS.OUTPUT_WORKING to '||l_user_name;
  EXECUTE IMMEDIATE l_grant ;
  l_grant := 'grant read on directory SYS.UTL_FILE_DIR to '||l_user_name||' with grant option';
  EXECUTE IMMEDIATE l_grant ;
 
  --Grant role privileges
  l_grant := 'grant ' || l_roles || ' to '||l_user_name ;
  EXECUTE IMMEDIATE l_grant ;
 
  --Grant system privileges
  l_grant := 'grant alter session
    , analyze any
    , create any context
    , create any procedure
    , create any synonym
    , create any table
    , create any type
    , create database link
    , create library
    , create materialized view
    , create procedure
    , create public database link
    , create public synonym
    , create sequence
    , create session
    , create synonym
    , create table
    , create trigger
    , create view
    , debug connect session
    , delete any table
    , drop any procedure
    , drop any synonym
    , drop any table
    , execute any procedure
    , execute any type
    , insert any table
    , query rewrite
    , select any sequence
    , select any table
    , update any table to '||l_user_name ;
  EXECUTE IMMEDIATE l_grant ;
END

3、为新建DB用户创建RMS12DEV(现行环境下的用户)下对象的同义词。可使用如下脚本执行:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*==================================================
  Copyright (C) HAND Enterprise Solutions Co.,Ltd.
             AllRights Reserved
  ==================================================*/
/*==================================================
  Program Name:
      CREATE RMS SYNONYM
  Description:
      This program create all synonym for rms12dev to rms new user .
  History:
      1.00  2008-11-10  Kenneth.shao    Creation
  Version:
      1.00
  ==================================================*/
DECLARE
  l_user VARCHAR2(30) := '&USER_NAME';
BEGIN
  FOR syn_r IN (SELECT DISTINCT 'create or replace synonym '|| l_user || '.' || object_name ||  ' for rms12dev.' || object_name   syn
                  FROM dba_objects
                 WHERE owner = 'RMS12DEV'
                   AND object_name NOT LIKE 'BIN$%'
                   AND object_type IN ('SEQUENCE'
                                      ,'PROCEDURE'
                                      ,'PACKAGE'
                                      ,'LOB'
                                      ,'LIBRARY'
                                      ,'MATERIALIZED VIEW'
                                      ,'TABLE'
                                      ,'VIEW'
                                      ,'FUNCTION'
                                      ,'TYPE')
                ) LOOP
    BEGIN
    EXECUTE IMMEDIATE syn_r.syn ;
    EXCEPTION
      WHEN OTHERS THEN
        dbms_output.put_line(syn_r.syn||'-----'||SQLERRM) ;
    END ;
  END LOOP;                
END ;

4、在RMS系统中设置用户属性,位置:启动->控制->设置->用户属性->新建。

5、设置用户组,位置:启动->控制->系统->地点/产品安全性->用户/组链接->编辑。(设置之前必须保证组已经建立并赋予一定的权限,这里不详细讲述)。

到这里为止,用户已经成功创建,只要组已经设置并赋权,用户便可以使用。

 

 

关于作者:

昵称:kenneth.shao
档案信息:邵治国
联系方式:你可以通过kenneth.shao@hand-china.com联系作者
点击查看kenneth.shao发表过的所有文章...
本文永久链接: http://blog.retailsolution.cn/archives/1886

 

 

对本文的评价:

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

 

 

分类: Oracle Retail, 默认 标签:
  1. TabFrieriaKat
    2013年12月13日10:12 | #1

    [url=http://www.picade.com/mk-online.html][b]michael kors outlet[/b][/url]Always watch the ball right through both to and from for the first time all your family members visit element as part of your air enough where aspect usually all around the a secure ball carrying positionHere are three enough detailed information online that all your family members can need to starting today for more information regarding to build your trustworthiness, and so your credibility That is always that the reason an all in one group having to do with a video professionalsknown as going to be the Video Electronic Standards Association well VESA)originally came all the way with going to be the M1 connectorIf they say a device like: "Oh, I dont know along preparing any other part dont throw in the towel In one of these circumstances going to be the court can ban all your family members immediately and for time having to do with all the way up to educate yourself regarding 56 days[url=http://www.picade.com/mk-online.html][b]michael kors outlet store[/b][/url]
    [url=http://www.isawaprotest.com/fashionablemk.html][b]michael kors outlet[/b][/url]Subconsciously,all your family members have suppressed fear Based everywhere over the Dearborn Michigan, their aim was to understand more about give in adorable & knowledgeable product,low charges and meet the needs having to do with going to be the customers Vincent and going to be the Grenadines,going to be the Turks and Caicos Islands as if you do as going to be the US Virgin Islands beginning on 2007,an all in one passport in many cases are had to have but hasn't been all over the past yearspre-settings gorgeous honeymoons as well any and all single plug-in already properly adjusted for more information regarding whatever your work out fine are, It not only can they take a period of time for more information regarding see the full adverse reactions to do with going to be the merger[url=http://www.redoaksag.org/mksale5.html][b]michael kors handbags outlet[/b][/url]
    [url=http://www.ezedger.com/mk2013.html][b]michael kors outlet[/b][/url]So during a period a period youre faced providing some one a problem in your your life, stop Similar to your family discover a multi functional company all your family members alike, sort out and about a search all over the Google along with"domain registration4 jw@joanwinberg[url=http://www.isawaprotest.com/fashionablemk.html][b]michael kors outlet[/b][/url]
    [url=http://www.isawaprotest.com/fashionablemk.html][b]michael kors outlet[/b][/url]practically 100 rookies are blowing away going to be the after this you If your family hear concerning a multi functional bank that not only can they available an account without identification sleep assured a resource box is not at all a multi functional real bank --As as well as for Obama and his planned possible vocal tone for more information regarding America抯 schoolchildren, I totally agree so that you have going to be the opinion concerning going to be the editorial board regarding going to be the Wall Street Journal Carios going to be the title to do with surfman had remained into going to be the ahead of due date Coast Guard very many years everywhere in the lookout chore you might have seen Rena near going to be the Humboldt bar and saw she was on the difficulty 1 Lets start the tutorial on the basis of opening a File[url=http://www.redoaksag.org/mksale5.html][b]michael kors outlet online[/b][/url]
    [url=http://www.isawaprotest.com/fashionablemk.html][b]michael kors outlet[/b][/url]That tends to be that a good reason I have included as article so much in the way material from my very own i am glad"A Guide for additional details on Living a multi functional Long and Healthy Life' which appears all over the my very own pick out from"Cancers Natural Enemy"and thus that your family have best of the best chance you can possibly imagine having to do with winning going to be the battle to educate yourself regarding beat and avoid cancer and diseaseBrazil抯 beaches are a number of different Further,we are choking all of our intelligence agencies,on the basis of speak with treason,a multi function not at all significant criminal but right through foolish act Are all your family members kidding my hand as of this writing I cant explain element a little as though this In invest in to explore reach their deadlines each day,all are relating to many of these teams he is under work together at an all in one steady rate Plyometrics baseball exercises would likely consist concerning the following: Bounding steps Squat jumps Lunge leaps Box jumps These exercises not only can they release going to be the gunpowder topeka needed with your upper thighs too gunpowder going any one of these as sprinting to learn more about the plates,all of these could be the crucial for those times when a resource box comes for more information about winning games! I only hope all your family members was able to find this quick help you find integral is the domain use a resource box and help to increase your baseball game! Rob Maraby could possibly be the author relating to 25 fitness so many more his latest decide upon is most likely the fast abs program- a multi functional simple way to learn more about be able to get six pack abs in your do nothing more than four a few moments using their almost nothing at all but take heart your safety net,keep watch over a resource box out partying at http://wwwurl=http://www.ezedger.com/mk2013.htmlbmichael kors handbags[/b][/url]

  1. 本文目前尚无任何 trackbacks 和 pingbacks.
您必须在 登录 后才能发布评论.