How to create database roles  ?

Hi ,
i am trying to create database roles,
what is the best way to do that ?
I want to be able to create the following database roles on my local machine:
CSDExec
CSDAdmin     
TCFBurOps     
TCFAreaLieutenants     
TCFCourtSupervisors
More to this problem, each role will be accessing an X number of tables , not all.
Also, I will be creating the same roles on the Dev Box at the client site.
What is the best way to do it in ?
Should I use a procedure, package, etc.
Please help me with examples:
This is my first time creating database roles.
I am using SQL Developer
thanks,

Hi,
For things like that, I use SQL*Plus scripts, containing the CREATE ROLE and GRANT commands.
Often, in the Development database, I build these scripts a little at a time, commenting out commands after I've done them. Then, when I'm ready to make the changes in the Test and Production databases, I remove the comments.
For example, on Monday I may create a role and grant some privileges, so I write and run a script like this:
CREATE ROLE     firbolig_user;
GRANT SELECT      ON  table_x      TO firbolig_user;
GRANT EXECUTE      ON  pkg_a       TO firbolig_user;On Tuesday, I create another table, and schange the script to this:
/*     *****  This section has already been done in Development  *****
CREATE ROLE     firbolig_user;
GRANT SELECT      ON  table_x      TO firbolig_user;
GRANT EXECUTE      ON  pkg_a       TO firbolig_user;
GRANT SELECT      ON  table_y      TO firbolig_user;and run it.
On Wednesday, I decide I need another role, so I change the script to this:
/*     *****  This section has already been done in Development  *****
CREATE ROLE     firbolig_user;
GRANT SELECT      ON  table_x      TO firbolig_user;
GRANT SELECT      ON  table_y      TO firbolig_user;
GRANT EXECUTE      ON  pkg_a       TO firbolig_user;
CREATE ROLE     firbolig_admin;
GRANT          firbolig_user     TO firbolig_admin;
GRANT SELECT, INSERT, UPDATE, DELETE
          ON table_x     TO firbolig_admin;
GRANT SELECT     ON table_z     TO firbolig_admin;
GRANT SELECT     ON x_seq     TO firbolig_admin;and run it.
I continue like that through the development process.
Then, when I'm ready to move to the Test database, I remove the comment lines and run the entire script in Test.

Similar Messages

  • CRM 7.0 How to create Business role & generate

    Hi Team,
    Can you please let me know some breif idea about CRM 7.0 security guide.
    How to created Business role is this part of functional activity?
    Whats the role of Technical colleagues BASIS guys in CRM 7.0 security .
    Please help me to get some document regarding business role creation , generation , assignment & authorization checks in CRM 7.0.
    Thanks & Regards,
    Vyash Mishra

    Hello Viyash
    I will add the most important information for generation of business roles and assignment of authorizations to users.
    You must first create the PFCG roles. PFCG role is built based on the Business Role.
    Please see documentation in : SPRO
    SAP Implementation Guide =>  Customer Relationship Management
    UI Framework  > Business roles > Define Authorization Role
    Then the PFCG role can be assigned to the business role in 
    SAP Implementation Guide =>  Customer Relationship Management
    UI Framework  > Business roles > Define Business role
    Finally you must assign business roles to Organizations or positions in organizations in
    SAP Implementation Guide =>  Customer Relationship Management
    UI Framework  > Business roles > Define Organizational Assignment
    The users that are assigned to such organizations / positions will be therefore linked to the business role.
    With the previous steps the users will have the authorizations that are assigned to the PFCG profile that is linked to their business role.
    Business roles are the main way to configure authorizations for users in CRM but you have more options that give you flexibility.Each business role has assigned one PFCG role, but the relationship between business role and PFCG role is not strict. You can even assign a dummy PFCG role to a certain business role in business role customizing and then go to transaction PFCG and assign other PFCG role(s) to the users that are assigned to that business role.
    I would say that the previous tasks must be performed by the basis team but in cooperation with the functional team
    Best Regards
    Luis Rivera

  • How to create database in 10g xe

    How to create database in 10g xe? could you please direct me to which documentation in 10g xe website? is it possible to create the db from the web console? if so, how? I can't seem to find a way to do it? Thanks

    You cannot: there can only be one XE database per host and it's created when you install Oracle XE.

  • How to create database from .sql file

    how to create database from .sql file..?? i put the sintax query in a sql file.. and i want to call it in java code..
    ho to do it..??

    why do you want to do this from java?
    i just don't see the point.
    find your dba and have him/her run it for you

  • How to create database item for fast formula?

    Hi,
    Is there any document for how to create database item for fast formula? I could not find in Metalink or this forum. Thanks.
    Andy

    Oracle ship many pre-delivered Database Items plus they're created automatically when you create Input Values (etc).
    There's often something already there for you. If there's not, you usually create Fast Formula functions to retrieve other data. You don't create your own custom DBIs; Oracle don't deliver APIs for that.

  • How to create database link from oracle to sql server

    Please help with how to create database link from oracle to sql server
    Best regards,
    Vishal

    Please help with how to create database link from oracle to sql server
    Best regards,
    Vishal
    Hi Vishal,
    I found a lof of information regarding how to create a database link from Oracle to SQL Server, please see:
    https://www.google.co.in/?gws_rd=cr&ei=vd3XUvGFO8TgkAXqlYCADg#q=how+to+create+database+link+from+oracle+to+sql+server
    We discuss SQL Server related issue in this forum. If you have any more question regarding Oracle, please post it in Oracle communities forum for better support.
    Regards,
    Elvis Long
    TechNet Community Support

  • How to create database using shell script

    hai
    how to create database using shell script

    The documentation details the steps to create a database manually. Another option is to use DBCA to create the scripts. DBCA will give you a complete set of scripts that will create a database.
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14231/create.htm#sthref220

  • How to create database with ASM

    HI
    How to create database with ASM?
    I install vmware workstation on window XP .On virtual machine install Linux 5 enterprise (Oracle) install.
    I install oracle DB software only. Also make 3 disk for ASM .
    1 -- When I want to install oracle DB with ASM . In this process candidate disks not show . Why?
    How I can see disks ..
    so I simple install oracle DB software only.
    2 -- Now I want to create database with ASM by DBCA .
    What process I will follow ?
    Please guide me
    Thanks

    Hi
    Steps to create database with ASM.
    1.Install oracle binary with active CRS(For single node installation CRS is activated when you run root.sh) .
    2.Create disk without file ssytem.
    3.Assign disk to raw .
    4.Change owner and permission to raw devices.
    5.Configure ASM manually or USing DBCA.
    Manually ASM Configuration.
    a.Create initialization parameter file and password file.
    b.Mandatory parameter is "instance_type=asm" as per your need configure rest of parameter like db_cache_size,large_pool_size,processes,remote_login_passwordfile,shared_pool_size etc..
    c.To discover disk configure "asm_diskstring=/dev/raw/raw*"
    Using DBCA to configure ASM.
    1.In storage type section choose ASM.It will ask for password of sysdba in 10g.
    2.ASM configuration window will open -> here it create disk group -> it shows all available ASM candidate disk automatical -> choose normal redundancy,external redundancy or high redundancy.
    ASM disk also can be conbfigured with ASMLIB .
    If ASM disk is configured you can start asm instance in nomount state and query to v$asm_disk to see all candidate disk.V$asm_disk only shows disk which is configured in asm_diskstrings.
    Hope this will help U,
    Tinku

  • How to create database dynamically

    Hi,
    Some one suggest, how to create database dynamically in oracle 8.1.6.0.0 standard edition with an example.
    Thanks in advance,

    Hello,
    I'd ask in the
    Windows Presentation Foundation (WPF) forum.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • How to create Database, table , and apply triiger on oracle10g lite ?

    Hello All,
    I want to use oracle 10g lite , i just download oracle 10g lite from oracle site and just install on my system, i have no any knowledge how to create database, how to create tables and how to apply triggers on tables. I want to access this database using JDBC.
    plzzzzzzzzzzzzzzzzzz help me...............
    Thanks in advance
    Pankaj

    are you trying to use oracle lite just as a database? it is normally used as part of a data synchronisation from a server, replicating snapshots to create the database and tables on the client.
    PL/SQL format triggers are not supported in the oracle lite client. Java stored procedures are, but you would need to build the table interactions

  • How to create database link between oracle9i database and oracle10g

    How to create database link between oracle9i database and oracle10g
    oracle9i database name "Prod" windows server 2003 ( 172.x.x.x)
    oracle10g database name "TEST" sun solaris 9 (165.x.x.x.x)
    Please help me on this

    For connections between 10.2 and 9.2 the 9.2 end MUST be at 9.2.0.4 or higher. Connections between 10.2 and 9.2.0.1, 9.2.0.2 or 9.2.0.3 are not supported.
    Connections between 10.2 and 9.0.1 was never been supported.
    Cheers !!!!
    Bhupinder

  • How to create database and table with GUI?

    How to create database and table with GUI?
    for linux can do that?
    or have only way to create table by use sql*plus.
    everyone please help me.
    thanks

    go to www.orasoft.org
    here is a gui tool.
    null

  • How to create database in timesten?

    Please let me know how to create database in timesten as we create in Oracle 10g named orcl
    Please guide in detail
    Thanks.

    Hi!
    You can use TimesTen in standalone mode instead of Cache connect to Oracle.
    If you have deployed TimesTen on Linux then you should make DSN in sys.odbc.ini which is located in info folder of TimesTen. If you are using Windows then you can use ODBC utility in control panel.
    You can see the documentation of TimesTen for more detailed information.
    /Ahmad

  • How to create authorization role for just displaying query prefix Q and X.

    Hi Expert,
    I hope someone can help me on how to create authorization role for just displaying and executing  BEX  Queries prefix Q and X. I'm currently using SAP BI 7.1.
    Actually, I already created one role called : Z_FORINDO_ONLYDISPLAY_QX
    where I only put in the Authorization Component (in the Role Maintenance - Tcode 'pfcg'):
    -->Manually Business Information Warehouse
        --> Manually Business Explorer - Components
    Activity : Display, Execute, Enter, Include, Assign
    InfoArea : *
    InfoCube : *
    Name(ID) of a reporting component : *
    Type of a reporting component : Calculated key figure, Restricted key figure, Template structure
        --> Manually Business Explorer - Components
    Activity : Display, Execute
    InfoArea : *
    InfoCube : *
    Name(ID) of a reporting component : Q* , X*
    Type of a reporting component : Query
    But, the problem is I still can make changes on that queries (Q* and X*). Even, I still can run query with prefix Z. I use S_RS_RREPU Tamplete for Query Display and execution.
    Please assist. Very much appreciate your help. Thanks.
    Edited by: nadiyah salleh on Mar 18, 2008 11:22 AM

    Question close. This issue has been resolved.

  • If ur database crash u have only export of database how u create database f

    if ur database crash u have only export of database how u create database from starting with help of export give steps

    What is an "export give steps?"
    If ur's database crashes, how is it u's responsibility to restore it?
    Now, if my database crashes, I just restart it in crash recovery mode and not even worry about the backup or export. It is not needed.

Maybe you are looking for