0% found this document useful (0 votes)
50 views

UNIX Server Basics

Uploaded by

fffASYY
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

UNIX Server Basics

Uploaded by

fffASYY
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

ORACLE

Color profile: Generic CMYK printer profile


Composite Default screen

Series / Oracle9i UNIX Administration Handbook / Burleson / 0-07-222304-9 / Chapter 1


Blind Folio 1:ix

Contents

ACKNOWLEDGMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

xix
xxi

PART I

UNIX Server Basics


1 Introduction to UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction to the UNIX Architecture . . . . . . . . . . . . . . . . . . . . . . .
Dialects of UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
System Administration in UNIX . . . . . . . . . . . . . . . . . . . . . . .
UNIX and DOS Commands . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction to UNIX Commands . . . . . . . . . . . . . . . . . . . . . . . . . . .
UNIX Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Redirecting UNIX Output . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Piping UNIX Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UNIX Shells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using UNIX Command Options . . . . . . . . . . . . . . . . . . . . . . .
Common Oracle UNIX Commands . . . . . . . . . . . . . . . . . . . . . . . . .
Capturing Server Information with UNIX . . . . . . . . . . . . . . . .
The UNIX wc Command . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Capturing Date Information in UNIX . . . . . . . . . . . . . . . . . . .
UNIX User Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3
4
5
6
9
9
11
13
14
19
21
23
23
24
24
27

ix

P:\010Comp\Oracle8\304-9\fm.vp
Thursday, December 27, 2001 1:55:46 PM

ORACLE
Color profile: Generic CMYK printer profile
Composite Default screen

Series / Oracle9i UNIX Administration Handbook / Burleson / 0-07-222304-9 / Front Matter


Blind Folio FM:x

Oracle9i UNIX Administration Handbook

Locating Files in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Additional UNIX Utility Commands . . . . . . . . . . . . . . . . . . . .
Viewing and Editing Files in UNIX . . . . . . . . . . . . . . . . . . . . .
File Management in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The UNIX touch Command . . . . . . . . . . . . . . . . . . . . . . . . . .
Controlling UNIX File Permission with umask . . . . . . . . . . . .
The UNIX chmod Command . . . . . . . . . . . . . . . . . . . . . . . . .
Directory Management in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The UNIX pwd Command . . . . . . . . . . . . . . . . . . . . . . . . . . .
The UNIX ls Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Oracle Environment in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . .
Basic UNIX Environment Commands . . . . . . . . . . . . . . . . . . .
The UNIX Command Line Editor . . . . . . . . . . . . . . . . . . . . . .
Oracle Aliases for UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A Standard UNIX Prompt for Oracle Users . . . . . . . . . . . . . . .
Changing Your Oracle Environment in UNIX . . . . . . . . . . . . .
Dissecting Complex UNIX Commands . . . . . . . . . . . . . . . . . . . . . . .
Deciphering a Complex UNIX Command . . . . . . . . . . . . . . . .
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27
28
30
31
32
33
34
39
39
40
44
45
45
47
48
49
51
52
54

2 UNIX Server Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Process Internals for UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Run Queue and the Sleep Queue in UNIX . . . . . . . . . . . .
Process Command Execution . . . . . . . . . . . . . . . . . . . . . . . . .
The Fork System Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The UNIX Buffer Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Memory Management in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Virtual Memory in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jobs of the Oracle DBA and the UNIX System Administrator . .
Process Management Commands in UNIX . . . . . . . . . . . . . . . . . . . .
The UNIX ps Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The UNIX kill Command . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Killing Stubborn UNIX Processes . . . . . . . . . . . . . . . . . . . . . .
Displaying Kernel Values in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . .
Displaying Server Values in HP-UX . . . . . . . . . . . . . . . . . . . .
Displaying Server Kernel Values in AIX UNIX . . . . . . . . . . . . .

57
58
58
59
61
63
64
65
66
67
67
70
71
71
71
74

P:\010Comp\Oracle8\304-9\fm.vp
Thursday, December 27, 2001 1:55:47 PM

ORACLE
Color profile: Generic CMYK printer profile
Composite Default screen

Series / Oracle9i UNIX Administration Handbook / Burleson / 0-07-222304-9 / Front Matter


Blind Folio FM:xi

Contents

Displaying the Number of CPU Processors in UNIX . . . . . . . .


Using nice and priocntl to Change UNIX Execution Priority . .
Memory Management Commands in UNIX . . . . . . . . . . . . . . . . . . .
Displaying the Total RAM on the UNIX Server . . . . . . . . . . . .
Viewing Allocated RAM Memory Segments in UNIX . . . . . . .
Viewing RAM Swap Paging in UNIX . . . . . . . . . . . . . . . . . . .
Making Oracle RAM Non-Swappable in HP-UX and Solaris . .
Semaphore Management in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . .
System Default Values for Semaphores . . . . . . . . . . . . . . . . . .
Counting Used Semaphores . . . . . . . . . . . . . . . . . . . . . . . . . .
Determine What Oracle Database Has a Semaphore Set . . . .
Removing a Semaphore Set for Oracle . . . . . . . . . . . . . . . . . .
Displaying System Log Messages . . . . . . . . . . . . . . . . . . . . . . . . . . .
Show Server Log on HP-UX . . . . . . . . . . . . . . . . . . . . . . . . . .
Show Server Log on AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UNIX Server Monitoring Commands . . . . . . . . . . . . . . . . . . . . . . . . .
Using the UNIX top Utility . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using svmon on IBM AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The sar Utility in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the UNIX sadc Utility . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the glance Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overview of the vmstat Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Dialect Differences in vmstat . . . . . . . . . . . . . . . . . . . . . . . . .
What to Look for in vmstat Output . . . . . . . . . . . . . . . . . . . . .
Identifying CPU Bottlenecks with vmstat . . . . . . . . . . . . . . . .
Identifying High CPU Usage with vmstat . . . . . . . . . . . . . . . .
The UNIX Watch Command . . . . . . . . . . . . . . . . . . . . . . . . .
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76
77
78
78
81
84
85
87
88
88
88
90
90
91
91
91
91
94
95
98
98
106
108
109
110
111
112
113

3 Capturing UNIX Server Statistics with STATSPACK . . . . . . . . . . . . . . . .


UNIX Monitoring Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UNIX CPU Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Monitoring RAM Memory Consumption . . . . . . . . . . . . . . . . .
Capturing Server Performance Data Inside STATSPACK . . . . . . . . . .
A Script to Capture vmstat Information . . . . . . . . . . . . . . . . . .
Internals of the vmstat Capture Script . . . . . . . . . . . . . . . . . . .
Reporting vmstat Information on Other Oracle Servers . . . . . .

115
116
116
122
123
123
127
129

P:\010Comp\Oracle8\304-9\fm.vp
Thursday, December 27, 2001 1:55:47 PM

xi

ORACLE
Color profile: Generic CMYK printer profile
Composite Default screen

xii

Series / Oracle9i UNIX Administration Handbook / Burleson / 0-07-222304-9 / Front Matter


Blind Folio FM:xii

Oracle9i UNIX Administration Handbook

Reporting on UNIX Server Statistics . . . . . . . . . . . . . . . . . . . . . . . . .


Server Exception Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Daily vmstat Trend Reports . . . . . . . . . . . . . . . . . . . . . . . . . .
Long-Term Server Analysis and Trending . . . . . . . . . . . . . . . .
Daily Server Alert Report . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

130
130
134
138
138
141

4 Disk Management in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Basic UNIX Disk Management Commands . . . . . . . . . . . . . . . . . . . .
Viewing Physical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . .
Viewing UNIX Volume Groups . . . . . . . . . . . . . . . . . . . . . . .
Display UNIX Mount Points . . . . . . . . . . . . . . . . . . . . . . . . . .
Setting Your UNIX Oracle Environment for Dialect Differences . .
Monitoring File System Free Space in UNIX . . . . . . . . . . . . . .
Configuring Oracle Tablespaces and UNIX Datafiles . . . . . . . . . . . .
Oracle Tuning Factors that Influence Disk I/O . . . . . . . . . . . . . . . . .
Oracle Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Oracle Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Oracle SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Oracle Internals and Disk I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The db_file_multiblock_read_count and Disk I/O . . . . . . . . . .
The Database Writer Process and Disk I/O . . . . . . . . . . . . . . .
Oracle File Organization Techniques . . . . . . . . . . . . . . . . . . .
Transient Disk Hot Spots . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mapping Oracle Disk Architectures . . . . . . . . . . . . . . . . . . . . . . . . .
The Multiple RAM Buffer Issue . . . . . . . . . . . . . . . . . . . . . . . .
File Striping with Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using RAID with Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Oracle with Raw Devices . . . . . . . . . . . . . . . . . . . . . . .
Load Balancing Disks with Oracle Databases . . . . . . . . . . . . . . . . . .
STATSPACK Reports for Oracle Datafiles . . . . . . . . . . . . . . . . . . . . .
Detailed Disk and File I/O with STATSPACK . . . . . . . . . . . . .
A STATSPACK Report on Specific I/O Activity . . . . . . . . . . . .
A STATSPACK Script to Identify Hot Datafiles
...........
The Approach to Locating Hot Disks . . . . . . . . . . . . . . . . . . .
Viewing I/O Signatures with STATSPACK . . . . . . . . . . . . . . . . . . . . .
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

143
145
145
145
146
148
149
152
155
155
155
156
156
156
157
163
165
172
173
174
175
176
177
178
185
186
189
189
190
195

P:\010Comp\Oracle8\304-9\fm.vp
Thursday, December 27, 2001 1:55:47 PM

ORACLE
Color profile: Generic CMYK printer profile
Composite Default screen

Series / Oracle9i UNIX Administration Handbook / Burleson / 0-07-222304-9 / Front Matter


Blind Folio FM:xiii

Contents

5 Network Management in UNIX for Oracle . . . . . . . . . . . . . . . . . . . . . . . .


Network Tuning in a UNIX Environment . . . . . . . . . . . . . . . . . . . . .
Using the UNIX netstat Utility . . . . . . . . . . . . . . . . . . . . . . . .
Oracle Networking and UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Preparing to Connect to a Remote Server . . . . . . . . . . . . . . . .
Checking Net8 Adapters in UNIX . . . . . . . . . . . . . . . . . . . . . .
TNS and UNIX for Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Managing Net8 in a UNIX Environment . . . . . . . . . . . . . . . . . . . . . .
Managing the UNIX Oracle Listener . . . . . . . . . . . . . . . . . . . .
Debugging UNIX Net8 Problems . . . . . . . . . . . . . . . . . . . . . .
Optimizing Oracle Net8 Configuration . . . . . . . . . . . . . . . . . . . . . . .
The tcp.nodelay Parameter in protocol.ora . . . . . . . . . . . . . . .
The automatic_ipc parameter of sqlnet.ora . . . . . . . . . . . . . . .
SDU and TDU parameters in tnsnames.ora . . . . . . . . . . . . . .
The queuesize Parameter in listener.ora . . . . . . . . . . . . . . . . .
The break_poll_skip Parameter of sqlnet.ora . . . . . . . . . . . . . .
The disable_oob Parameter of sqlnet.ora . . . . . . . . . . . . . . . .
The epc_disabled Environment Variable . . . . . . . . . . . . . . . . .
Other Oracle Features that Affect Network Behavior . . . . . . . . . . . .
Using Array Fetches to Improve Network Throughput . . . . . .
Using the Multi-threaded Server . . . . . . . . . . . . . . . . . . . . . . .
Monitoring the MTS with the lsnrctl Command . . . . . . . . . . .
Connection Pooling and Network Performance . . . . . . . . . . . . . . . .
ODBC and Network Performance . . . . . . . . . . . . . . . . . . . . .
Tuning with Oracle Replication . . . . . . . . . . . . . . . . . . . . . . .
Monitoring Network Performance from Oracle STATSPACK . . . . . . .
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

199
200
201
203
204
206
206
208
208
211
212
213
213
214
216
216
217
217
218
218
218
220
222
223
224
226
229

PART II

The Interaction Between Oracle and the UNIX Server


6 Oracle Interfaces with the UNIX Server . . . . . . . . . . . . . . . . . . . . . . . . . .
The Oracle Background Processes in UNIX . . . . . . . . . . . . . . . . . . .
Displaying CPU and RAM for Oracle UNIX Processes . . . . . .
The Main Oracle Background Processes . . . . . . . . . . . . . . . . .

P:\010Comp\Oracle8\304-9\fm.vp
Thursday, December 27, 2001 1:55:48 PM

233
234
235
236

xiii

ORACLE
Color profile: Generic CMYK printer profile
Composite Default screen

xiv

Series / Oracle9i UNIX Administration Handbook / Burleson / 0-07-222304-9 / Front Matter


Blind Folio FM:xiv

Oracle9i UNIX Administration Handbook

Monitoring Oracle CPU Consumption in UNIX . . . . . . . . . . .


Oracle Interaction with the UNIX Server CPUs . . . . . . . . . . . .
Oracle and RAM Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Understanding UNIX RAM Memory Paging . . . . . . . . . . . . . .
SGA Memory Pinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RAM Page Fencing for Oracle . . . . . . . . . . . . . . . . . . . . . . . .
Oracle Interaction with the UNIX Disk I/O Subsystem . . . . . . . . . . .
Checking for Oracle File Wait Conditions . . . . . . . . . . . . . . .
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

239
241
247
248
250
251
253
254
256

7 Oracle Sessions and UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Monitoring UNIX Dedicated Connections to Oracle . . . . . . . . . . . . .
UNIX Interaction with the Multi-threaded Server . . . . . . . . . . . . . . .
Prerequisites for Using the MTS . . . . . . . . . . . . . . . . . . . . . . .
Oracle9i Dynamic RAM and UNIX . . . . . . . . . . . . . . . . . . . . . . . . . .
Oracle9i and UNIX Granules . . . . . . . . . . . . . . . . . . . . . . . . .
Changing Dynamic SGA and PGA Components . . . . . . . . . . .
Oracle9i PGA Memory Allocation for Dedicated Connections . . . . .
Automatic RAM Memory Management in Oracle9i . . . . . . . .
Moving Toward a Self-tuning Oracle9i Database . . . . . . . . . .
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

257
258
262
262
271
273
275
276
276
284
293

8 Oracle File Management in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


File Management in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General UNIX File Management Commands . . . . . . . . . . . . .
Oracle Performance and Disk I/O . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reducing Disk I/O in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . .
Oracle9i and Multiple Block Sizes . . . . . . . . . . . . . . . . . . . . . . . . . .
Large Blocks and Oracle Indexes . . . . . . . . . . . . . . . . . . . . . .
Monitoring UNIX Disk I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Building the Oracle File-to-Disk Architecture . . . . . . . . . . . . .
Reporting on the Oracle Disk Architecture . . . . . . . . . . . . . . .
Extending STATSPACK for Disk I/O Data . . . . . . . . . . . . . . . . . . . . .
The UNIX iostat Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining the STATSPACK Table . . . . . . . . . . . . . . . . . . . . . . .
Capturing the iostat Information . . . . . . . . . . . . . . . . . . . . . . .
Generating iostat Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

295
296
298
306
307
312
315
317
318
319
320
320
323
324
326
329

P:\010Comp\Oracle8\304-9\fm.vp
Thursday, December 27, 2001 1:55:48 PM

ORACLE
Color profile: Generic CMYK printer profile
Composite Default screen

Series / Oracle9i UNIX Administration Handbook / Burleson / 0-07-222304-9 / Front Matter


Blind Folio FM:xv

Contents

9 Oracle Server Exception Reports in UNIX . . . . . . . . . . . . . . . . . . . . . . . .


Scheduling and Customizing Oracle Alert Reports . . . . . . . . . . . . . .
Introduction to crontab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using crontab with Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . .
Oracle Trace File Alert Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Web Server Alert Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A Real-Time Check for Oracle Problems . . . . . . . . . . . . . . . . . . . . . .
Preliminary Checking and Set-up . . . . . . . . . . . . . . . . . . . . . .
Get the UNIX Home Directory . . . . . . . . . . . . . . . . . . . . . . . .
Get the Free Space Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Get the E-mail Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terminate the Script if the Database Is Down . . . . . . . . . . . . .
Clean Up Old Holding Files . . . . . . . . . . . . . . . . . . . . . . . . . .
Get Dictionary File Locations . . . . . . . . . . . . . . . . . . . . . . . . .
Get the Fully Qualified UNIX Path Names for Directories . . .
Alert for Bad Messages in the Alert Log . . . . . . . . . . . . . . . . . .
Mark the Dialect Differences for File Space Commands . . . . .
Check the Free Space in the Archived Redo Log Directory . . .
Check the Free Space in the UNIX Home Directory . . . . . . . .
Check Other UNIX Mount Points . . . . . . . . . . . . . . . . . . . . . .
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

331
332
332
334
335
338
339
341
342
342
343
343
344
344
346
347
349
350
352
353
355

PART III

UNIX Administration for the Oracle DBA


10 UNIX Environmental Administration for Oracle . . . . . . . . . . . . . . . . . . . .
Managing the UNIX Environment for the oracle User . . . . . . . . . . . .
A Standard UNIX Prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Useful UNIX Aliases for Oracle . . . . . . . . . . . . . . . . . . . . . . .
Standard Aliases for Changing the ORACLE_SID . . . . . . . . . .
Standard Command History . . . . . . . . . . . . . . . . . . . . . . . . . .
File Management Commands in UNIX . . . . . . . . . . . . . . . . . . . . . . .
Change Default File Permissions with umask . . . . . . . . . . . . .
Change File Permissions in UNIX . . . . . . . . . . . . . . . . . . . . . .
Change File Owners in UNIX . . . . . . . . . . . . . . . . . . . . . . . . .
Create a UNIX Soft Link for Oracle Files . . . . . . . . . . . . . . . . .

P:\010Comp\Oracle8\304-9\fm.vp
Thursday, December 27, 2001 1:55:48 PM

359
360
361
362
362
364
365
365
365
367
367

xv

ORACLE
Color profile: Generic CMYK printer profile
Composite Default screen

xvi

Series / Oracle9i UNIX Administration Handbook / Burleson / 0-07-222304-9 / Front Matter


Blind Folio FM:xvi

Oracle9i UNIX Administration Handbook

Copy tnsnames.ora to All UNIX Servers . . . . . . . . . . . . . . . . .


Make a UNIX Tape Backup . . . . . . . . . . . . . . . . . . . . . . . . . .
A UNIX Script to Detect Listener Failure . . . . . . . . . . . . . . . . .
A Simple Script to Exit When the Database Is Not Running . .
Detect When Oracle Is Not Accepting Connections . . . . . . . .
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

370
371
372
373
373
374

11 Oracle Task Management in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Oracle Job Management in UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . .
Submitting Oracle Jobs in the Background . . . . . . . . . . . . . . .
Watch the Execution of a Background Process . . . . . . . . . . . .
UNIX Task Management Techniques . . . . . . . . . . . . . . . . . . . . . . . .
Parameter Checking for Oracle Shell Scripts . . . . . . . . . . . . . .
Make Sure the UNIX User Is oracle . . . . . . . . . . . . . . . . . . . .
Validate an $ORACLE_SID Being Passed to a UNIX Script . . .
Multiplexing Oracle Tasks in UNIX . . . . . . . . . . . . . . . . . . . .
A UNIX Script to Ensure a Daemon Is Running . . . . . . . . . . . .
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

377
378
380
381
381
381
382
382
383
384
385

12 Miscellaneous UNIX Scripts for Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . .


How to Build UNIX Commands into Scripts . . . . . . . . . . . . . . . . . . .
Using UNIX to Locate and Tune Oracle SQL . . . . . . . . . . . . . . . . . .
Finding All SQL Referencing a Specific Table . . . . . . . . . . . . .
Using UNIX to Parse the SQL File . . . . . . . . . . . . . . . . . . . . . .
Miscellaneous UNIX Tips and Techniques . . . . . . . . . . . . . . . . . . . .
Add the UNIX Date to an Oracle Filename . . . . . . . . . . . . . . .
Monitor the Performance of Oracle Parallel Server . . . . . . . . .
UNIX Gotcha: Clobber Your Entire UNIX Server . . . . . . . . . .
Looping Between UNIX Servers . . . . . . . . . . . . . . . . . . . . . . .
Executing SQL*Plus on All Remote UNIX Servers . . . . . . . . . .
Sending UNIX Files to Internet Mail . . . . . . . . . . . . . . . . . . . .
Changing a String for All Files in a Directory . . . . . . . . . . . . .
How to Use UNIX to Display Row Information . . . . . . . . . . .
Killing UNIX Oracle Processes . . . . . . . . . . . . . . . . . . . . . . . .
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

387
388
389
390
391
393
393
394
395
396
397
398
399
400
401
402

P:\010Comp\Oracle8\304-9\fm.vp
Thursday, December 27, 2001 1:55:48 PM

ORACLE
Color profile: Generic CMYK printer profile
Composite Default screen

Series / Oracle9i UNIX Administration Handbook / Burleson / 0-07-222304-9 / Front Matter


Blind Folio FM:xvii

Contents

Appendix of UNIX Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Library Cache Mining Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
STATSPACK Extension Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vmstat Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table and Object Extension Scripts for STATSPACK . . . . . . . .
iostat Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Miscellanous UNIX Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index

P:\010Comp\Oracle8\304-9\fm.vp
Thursday, December 27, 2001 1:55:49 PM

403
404
418
418
430
446
451

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493

xvii

You might also like