1. Some bash shell scripting rules
1) The first line in your script must be
#!/bin/bash
That is a # (Hash) followed by a ! (ban) followed by the path of the shell. This line lets the environment know the file is a shell script and the location of the shell.
2) Before executing your script, you [...]
Read Full Post »
Posted in Uncategorized on April 18, 2008 | 4 Comments »
Database Administration Tasks
Plane and create database
Manage database availability
Manage physical and logical structures
Manage storage based on design
Manage security
Network administration
Backup and Recovery
Database tuning
Oracle Server = + Oracle Instance + Oracle database
Oracle Instance = Memory structures + Background process
Oracle Database = data files, control files, redo log files
SGA – (System Global [...]
Read Full Post »
Posted in SQL, tagged SQL on April 18, 2008 | Leave a Comment »
1. datafiles
SELECT ‘cp ‘||NAME ||‘ /localdisk/oradb/’||SUBSTR(NAME,INSTR(NAME,‘/’,-1,1)+1 )||‘ &’
from (
select name from v$datafile
union all
select name from v$controlfile
union all
select member from v$logfile
)
2. Rename Datafiles
SELECT ‘ALTER DATABASE RENAME FILE ”’||NAME ||”’ TO ”/localdisk/oradb/’||SUBSTR(NAME,INSTR(NAME,‘/’,-1,1)+1 )||”’;’
FROM (
SELECT NAME FROM V$DATAFILE
UNION ALL
SELECT MEMBER FROM V$LOGFILE
)
3. datafiles
SELECT ‘cp ‘||NAME ||‘ [...]
Read Full Post »