Scripts for multiple selections,roles,modules in a company!


Hi all!

I want a script for the following:

Modules:9(Nine).Companies:8(Eight).
Oracle v8i.OS:NT.

Guidelines:

1.Any user who logs on from the front end screen should know in which module he is working with what roles assigned and in which company.The frontend screen for user creation must accept username,pwd,company code.
2.A user may select modules,company name with company code,Role names to work on.
3.A user may have access to either one or multiple modules in a company he selects to work upon.
4.A user may have either one or multiple roles in one or multiple modules in a company.
5.Each module consists of 3(three) users i.e.,
STAFF,OFFICER,MANAGER.
6.Staff would have only:select,Insert privileges.
7.Officer would have only:select,insert,update privileges.
8.Manager would have only:select,insert,update,delete privileges.

Please treat this as imp.

Take care.

Amitst.

Posted On: Wednesday 7th of November 2012 07:57:13 AM Total Views:  275
View Complete with Replies

RELATED TOPICS OF Oracle PROGRAMMING LANGUAGE




Solaris 9i Db creation scripts

Does anyone have any database creation scripts for oracle 9i on solaris they could send me. My email is m_blakey2@hotmail.com I would normally bastardise the scripts created by the dbca but for some reason 9i doesnt generate these which im a bit suprised by. I guess there must be some method to there madness but I cant figure it out.
VIEWS ON THIS POST

90

Posted on:

Wednesday 7th November 2012
View Replies!

scripts for granting privs

Thanks all. I am not going to grant privs to all the objects to the user. I need to grant selective objects (different objects name). I also get the list of the objects name. I can put the objects in a file, anyone knows how to use "awk", so I can just use grant select on \tread from the file Thanks
VIEWS ON THIS POST

114

Posted on:

Wednesday 7th November 2012
View Replies!

Tuning scripts for blocks and extents of tables in 9i

I'm looking for scripts for tuning space allocation in tables. We have some tables where the only activity are inserts. We tried putting pctfree 5. Now I'd like to see if the distribution of data in the different blocks in the different tables. Does anybody know where I can find some good stuff
VIEWS ON THIS POST

117

Posted on:

Wednesday 7th November 2012
View Replies!

very usefull scripts for space management

---------------------------------------------- -- list tablespace Usage,MaxFree,Fragment -- author: kerlion he -- email: kerlion@netease.com -- location:beijing,china -- date: 15-may-2002 ---------------------------------------------- set pagesize 80 set linesize 80 col tablespace_name for a18 COL total for 999,999 heading "MB|Total" COL free for 999,999 heading "MB|Free" COL max_free for 999,999 heading "MB|Extent|MaxFree" col used_pct for 990.99 heading "Used|percnt" col free_cnt for 9999 heading "Free|Extent|Count" select a.tablespace_name, round(100-b.free/a.total*100,2) Used_pct, a.total, b.free, b.max_free, b.free_cnt from (select tablespace_name, sum(bytes)/1024/1024 total from dba_data_files group by tablespace_name ) a, (select tablespace_name, sum(bytes)/1024/1024 free, max(bytes)/1024/1024 max_free, count(bytes) free_cnt from dba_free_space group by tablespace_name ) b where a.tablespace_name=b.tablespace_name ; -- if high in extent free count,then alter tablespace &ts_name coalesce; --if still high in extent free,you need -- exp/imp or -- alter table tb_name move tablespace ts_name or -- alter index idx_name rebuild tablespace ts_name ---------------------------------------------- -- display map of all datafiles -- author: kerlion he -- email: kerlion@netease.com -- location:beijing,china -- date: 10-Mar-2002 ---------------------------------------------- set serveroutput on size 20000 set linesize 80 declare cursor c_map(p_file_id number) is (select file_id,block_id,blocks,'X' used from dba_extents where file_id=p_file_id union select file_id,block_id,blocks,'=' used from dba_free_space where file_id=p_file_id ) order by 1,2,3; cursor c_file is select file_name,file_id,blocks/400 bsize from dba_data_files; j number :=1; begin for r_file in c_file loop dbms_output.put_line('Map of '||r_file.file_name); for r_map in c_map(r_file.file_id) loop for i in 1..r_map.blocks/r_file.bsize loop dbms_output.put(R_MAP.USED); if j>=80 then j :=1;dbms_output.new_line; else j := j+1; end if; end loop; end loop; dbms_output.new_line;j:=1; end loop; end; / ---------------------------------------------- -- display detail map of special datafile -- author: kerlion he -- email: kerlion@netease.com -- location:beijing,china -- date: 10-Mar-2002 ---------------------------------------------- set serveroutput on size 2500 set linesize 80 set verify off declare v_file_id number :=&p_file_id; cursor c_map is (select file_id,block_id,blocks,'X' used from dba_extents where file_id=v_file_id union select file_id,block_id,blocks,'=' used from dba_free_space where file_id=v_file_id ) order by 1,2,3; j number :=1; bsize number; begin select blocks/(80*25) into bsize from dba_data_files where file_id=v_file_id; --that is display in 80 lines with linesize of 80 for r_map in c_map loop for i in 1..r_map.blocks/bsize loop dbms_output.put(R_MAP.USED); if j>=80 then j :=1;dbms_output.new_line; else j := j+1; end if; end loop; end loop; end; /
VIEWS ON THIS POST

104

Posted on:

Wednesday 7th November 2012
View Replies!

What are additional scripts to be run after a database is created

Hi I have created a new database in the my NT server using oradim utility and then 'create database' stmt. and subsequently running the files catalog.sql and catproc.sql and then running pupbld.sql in system user schema. I want to know what are additional files I will need to run. As I can see...If I use 'Select count(*) from tab' in SYS schema of the 'default' database it gives me count of 1583 where as in new created database the this count is 1310...therefore what are additional scripts that will create the rest of data dictionary Amol
VIEWS ON THIS POST

133

Posted on:

Wednesday 7th November 2012
View Replies!

want scripts

I build a Report Generator application for one oracle database. I make public synonym for tables . and grant(Select) them to report generator users. so i need some scrits for doing following actions, who can help me 1) list table_names and comments of them that report generator user has access to them. 2) list all related tables(with foriegn key) of one table; 3) list columns and comments of one table . attention that we are login with report generator user and want to get this information from other user(MIS User) Good Luck M. Siroos
VIEWS ON THIS POST

104

Posted on:

Wednesday 7th November 2012
View Replies!

Unix scripts

, how's everybody doing Not sure if this is the right forum to post this question but since I'm not a unix expert I hope I will find some unix gurus in here. This is my situation, I have an oracle alert file to look at everyday ( I know it's boring) and I know that there is a unix command that would do a search in an ascii file (e.g alert file). Is there any quick ways that can extract all the alerts written within the last 24 hrs ( e.g everything from yesterday upto EOF). Please show me the way if you know how to do this.
VIEWS ON THIS POST

107

Posted on:

Wednesday 7th November 2012
View Replies!

tuning scripts

Could someone please advise where I could find tuning scripts (IE. Disk space utilization, segment utilization) I am looking for a web-site that might have these kind of DBA scripts .
VIEWS ON THIS POST

103

Posted on:

Wednesday 7th November 2012
View Replies!

shell scripts

Hi Friends, I am new to shell scripts. I am trying to automate uninstallation and installation of the build on Solaris. The things to do is 1. copy the build from a location. 2. check the build whether installed , if its already installed uninstall. I have installation and uninstallation scripts, So I need call call them. To check whether the build is install is calling 'iwgethome,. It will return a value.
VIEWS ON THIS POST

121

Posted on:

Wednesday 7th November 2012
View Replies!

sysman and wmsys creation scripts

Where are schema sysman and wmsys creation scripts in oracle 10g
VIEWS ON THIS POST

202

Posted on:

Wednesday 7th November 2012
View Replies!

scripts

Hai , Can any one send the scripts of Start up and Shut down for multiple databases...It is very urgent to me.. or any links for scripts..
VIEWS ON THIS POST

89

Posted on:

Wednesday 7th November 2012
View Replies!

Startup and Shutdown scripts

Hi I am running Oracle 9i on the Redhat linux 8.0. Pl give the script which containts the When OS starts db will start and When OS Shutdown automatically Db also Shutdown.
VIEWS ON THIS POST

107

Posted on:

Wednesday 7th November 2012
View Replies!

schema scripts

Does anyone have any scripts to capture a database schema
VIEWS ON THIS POST

96

Posted on:

Wednesday 7th November 2012
View Replies!

Rman error with daily scripts (ORA-27101)

Oracle 9.2.0.2 on Solaris Someone else wrote this RMAN script and I am trying to determine why there are errors. It is run through a cronjob. RMAN-LOG:Recovery Manager: Release 9.2.0.2.0 - 64bit Production Copyright (c) 1995, 2002, Oracle Corporation. rights reserved. RMAN> connect target rman/rman 2> connect catalog rman/rman@bck1 3> 4> run { 5> 6> set command id to 'hotfull'; 7> 8> # Configure the tape drive as the default device and indicate parallelism 9> allocate channel t1 type 'SBT_TAPE' parms 'ENV=(NSR_SERVER=sunprod1,NSR_DATA_VOLUME_POOL=Default)'; 10> allocate channel t2 type 'SBT_TAPE' parms 'ENV=(NSR_SERVER=sunprod1,NSR_DATA_VOLUME_POOL=Default)'; 11> 12> debug on; 13> 14> # Have to use logs option for hotbackup. Cannot do nologs 15> backup incremental level=0 tag hot_level_0 filesperset=1 format 'FULL_%d_%u' database keep until time "trunc((sysdate + 62),'DD')" logs; 16> 17> debug off; 18> 19> # Now backup controlfile 20> backup current controlfile format 'CF_%d_%u'; 21> 22> release channel t1; 23> release channel t2; 24> 25> } 26> 27> exit; connected to target database: KOP (DBID=2863956211) RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-04004: error from recovery catalog database: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist SVR4 Error: 2: No such file or directory Recovery Manager complete. KOrn Shell scripts:bash-2.03$ more run_hotfull.ksh #!/bin/ksh # Remember to configure controlfile auto backup BASE_DIR=/users/oracle/local/admin/backup LOG_FILE=dbhotfull_`date '+%m%d%y_%H%M%S'`.log LOG_DIR=$BASE_DIR/logs $BASE_DIR/batch_env.ksh # Call archive log backup script rman cmdfile $BASE_DIR/db_hotfull.rcv log $LOG_DIR/$LOG_FILE #$BASE_DIR/bootstrap_backup.ksh bash-2.03$ more bootstrap_backup.ksh #!/bin/ksh savegrp -O -l full -P downtown -c sunprod1 -c sunprod1 I looked up all the errors and searched in the archives here and couldn't find anything pertaining to this problem. I was thinking some PATH was not set correctly.
VIEWS ON THIS POST

109

Posted on:

Wednesday 7th November 2012
View Replies!

Shell scripts

Dear I have a problem to write a shell script which is containing the case function as follows..This is the NAGIOS plugin then I have to sctrictly follows its some rules like I have to use said case function. --freespace) for result in `sqlplus -s ${3}/${4}@${2}
VIEWS ON THIS POST

108

Posted on:

Wednesday 7th November 2012
View Replies!

Question to Moderators about dbasupport.com scripts

I was looking to use some of these tuning scripts from dbasupport.com. I was looking at your contention script..but you havent provided any references to read the output. this is true for all scripts. 1 select 2 event, 3 sum(decode(wait_Time,0,0,1)) "Prev", 4 sum(decode(wait_Time,0,1,0)) "Curr", 5 count(*) "Tot" 6 from 7 v$session_Wait 8 group by event 9* order by 4 SQL> / EVENT Prev Curr Tot ---------------------------------------------------------------- --------- --------- --------- pmon timer 0 1 1 smon timer 0 1 1 SQL*Net message from client 1 1 2 rdbms ipc message 0 4 4
VIEWS ON THIS POST

151

Posted on:

Wednesday 7th November 2012
View Replies!

problem in automising backupscripts

I have prepared batch files for taking hot backup on NT environment.I have scheduled the batch files using at command on a machine where backup is to be kept.It copies the datafile from database server to the local machine.Every thing is working fine ,only problem is the batch file which is used for copying the datafiles is giving error "Access is denied" when i scheduled it, while the same is working fine if i directly execute it.It seems there is some scheduler problem ,but all other scheduled task are ok, it gives problem for copying batch file.If anyone is having any idea of the problem ,please help me.
VIEWS ON THIS POST

130

Posted on:

Wednesday 7th November 2012
View Replies!

startup /shutdown on windows 2000 scripts

does any body have a small scripts to shutdown and startup on windows 2000 \t
VIEWS ON THIS POST

156

Posted on:

Wednesday 7th November 2012
View Replies!

preference on how to store RMAN scripts

If I use RMAN catalog, are there any significant differences between putting RMAN script in an OS File and call it from RMAN command line and storing RMAN script in the catalog and put "run { execute ; }" in an OS file and call it at RMAN command line Either way works for me but I wonder if it makes any difference. ------ Also, can I specify a script in RMAN catalog directly from RMAN command line
VIEWS ON THIS POST

220

Posted on:

Wednesday 7th November 2012
View Replies!

Sql scripts in memory

We have implemented a new cold backup strategy and for that we have to close the database at about 2:00 am and start it again by 5:00 between this the backup will be taken simultaneously by 5 channels to speed up the process. Now when the users start their daily job they keep complainin about the DB performance for atleast 2.5 hrs of operation. I was think if its possible to select the sql statements from SGA during the peak time and save them in a script file and include that in our DB Startup script so that when ever the corntab run the start DB script it will also run the sql file which will pin the most use sql statments in the memory so that the users will not complain and will not feel the difference of the database performance. If someone have some sort of suggestion and scripts to collect the most used sql statements kindly let me know... and any other info in this regards will be highly appreciated. Thank you in advance
VIEWS ON THIS POST

84

Posted on:

Wednesday 7th November 2012
View Replies!