system administration basics on the linux/oracle platform ce6 or vista 4 / mike cooling...

Post on 11-Jan-2016

214 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

System Administration Basics on the Linux/Oracle Platform

CE6 or Vista 4 / Mike Coolingcooling@csus.edu

California State University, SacramentoJuly 11, 2007

2

System Administration Basics (CE6 / Vista4)

About Your Speaker:• Over 30 years computing experience at

CSUS• Worked with unix over 20 years• Worked with Redhat linux over 7 years

since V5.2• Worked with WebCT over 7 years since

V1.3

3

System Administration Basics (CE6 / Vista4)

1. Test Environment

2. Disk Filesystems

3. Backups

4. System Management

5. Integration

▼ See references for URL to obtain samples. (whenever the red triangle appears)

4

1. Importance of Test Environment

Make all changes in test environment 1st

(tailoring web pages, setting changes, hotfixes, service packs)

• Let support staff see changes first hand and document them

• Test vendor releases before users see them (OS, BB/WebCT, Weblogic, or Oracle).

• Make mistakes, find installation bugs before they cause down time.

• Obtain exact timing for installs to determine downtime needs

5

2. Disk Filesystems

A. Database Server• Oracle table spaces

Control files, system space, temp space, etc.

• Oracle archived redo logsUsed for transaction recovery between backups. These can consume space quickly during peak times.

• WebCT table spaces

• Rman (database) backup files(Oracle Recovery MANager)

6

2. Disk Filesystems

B. Application Server / Managed Nodes

• WebCT filesystemWebCT software, Weblogic software, log files.

(ie. bea813 / bea920 directory)

• Section Backups (command line)Unix .BAK files

7

2. Disk Filesystems

C. Filesystem Flexibility• Plan for disk farm growth.• Practice array expansion and filesystem

resizing before you need it.– San add capacity.– Partition expansion using fdisk (keep starting cylinder

constant).– Linux command resize2fs.– LVM (logical volume manager) OK for smaller filesystems, low

performance needs. May create problems in high demand applications like Oracle.

8

3. Backups

A. Database Backups

RMAN (Oracle Recovery Manager)Recommended since you can run hot or cold backups.

Full (Standard edition) or Incremental (Enterprise edition only)

Export / ImportOlder technology backup. Only used if database is down.

9

3. Backups (database)

Sample Rman Configuration Statements:

$ rman target /RMAN> configure retention policy to recovery window of 2 days;RMAN> configure controlfile autobackup on;RMAN> configure controlfile autobackup format for device type

disk to '/DB-backups/sysbkups/%F';RMAN> configure channel 1 device type disk format

'/DB-backups/sysbkups/b_%u_%p_%c';RMAN> configure maxsetsize to 4096 m;RMAN> show all;RMAN> exit

10

3. Backups (database)

Sample Full Backup Rman script: ▼run {

backup incremental level 0 database include current controlfile;

SQL 'alter system archive log current';

backup archivelog all delete input; }

exit;

Note 1: If you want to do incremental backups, you MUST specify the incremental keyword for level 0 and level 1!

Note 2: Restores from an incremental backup take 2-3 times longer.

(Enterprise edition only)

11

3. Backups (database)

Sample Rman disaster recovery:

run {

restore database;

recover database; }

NOTE: Try this as a test at least once before going into production.

12

3. Backups (database)

Sample Rman limited recovery:(scn numbers are show with “list backup;” command)

run {

set until scn 69475014;

restore database;

recover database; }

13

3. Backups

B. Section Backups

• Unix line mode: backupRestoreCLI.sh ▼Creates .bak files on the app server filesystem where run.

Requires tailored xml file as input.

• GUI BackupsUsed by instructors, designers, or administrators.

Creates backups within the database.

Backups are a type of “snapshot” (using pointers) so they are efficient in terms of DB space.

14

3. Backups

C. System Backups

• Standard unix utilitiesDump/restore, cpio, tar

• Third party products

NOTE: exclude Oracle table spaces from system backup (/app/webctDB/*.dbf)!

15

4. System Management

A. Software Service• BB/WebCT Service Packs and Hotfixes,

Oracle upgrades, security patchesTry on test system first (preferably a copy of prod).

Backup database and bea813/bea920 directory before.

BB still learning also. Expect an install to fail to play it safe. Build in downtime to restore database each time.

Oracle security patches fairly safe.

Oracle minor upgrades (ie. 9206 to 9207) take more planning.

Oracle 9i to 10g takes the most planning and practice.

16

4. System Management

B. Operational Issues• CE / Vista Operations Guide

Great tips on managing Oracle logs, recovery issues, and database jobs.

Database performance monitoring.

Database tuning.

Advanced topics (standby databases, sub-clusters troubleshooting).

• CE / Vista Installation GuideChecking / recompiling invalid objects.

17

5. Integration

A. Migrating Courses (the easy way)• CEMT GUI Interface Awkward

Tough to document

Many steps

Wide variety of results when used by multiple staff

Typos can effect end result

• So Use Line Command and Script It ▼Streamlines process

Enforces standards

Everyone migrates same way

18

5. Integration

• Sample CE4 CEMT export:▼

#cd /home/$WCTID/webct/webct/generic/ce_migration_toolrm -f $OUTFIL#./extract_learning_context.pl \ -include_designers \ -only_designers_from_migrated_courses \ -enroll_designers -enroll_instructors \ -passwords -custom_columns \ -course=$SECTION \ -include_content \ -output_file=$OUTFIL/usr/local/etc/ce6-xmit $HOST >/dev/null

19

5. Integration

• Sample CE6 import: ▼

# First parm is name of xml file#cd /home/webct/$WCTID6/bea813/weblogic81/config/WebCTDomain#./siapi.sh ims import courses \ /home/webct/$WCTID6/import/$1 \ /home/webct/$WCTID6/import/content#rm -f /home/webct/$WCTID6/import/$1mv /home/webct/$WCTID6/import/content/*.zip \ /home/webct/$WCTID6/old-content#

20

5. Integration

• Sample CEMT script execution (on CE4):[webctce@webct99 webctce]$ ce6-content PT100 "Cooling, Mike" prod Notice: Exporting PT100... Notice: There are new warning/error messages written to ...cmu_log.txt. Notice: Export package completed (PT100_COURSE_20070628172914). Notice: Export package completed (0). Notice: Export packages completed in 1 and failed in 0.Reading information from password file: .../ce_migration_tool/server_backup/password_file...Reading information from mapping file: ...ce_migration_tool/server_backup/mapping_file...Reading information from data file: ...ce_migration_tool/server_backup/person_data...

The migration file has been saved.The file name of the migration file is (.../exported_packages/csus-PT100-course.xml).The course content package(s) are saved in .../exported_packages/.The file name of each course content package is in the format

<course_ID>_COURSE_yyymmddhhmmss.zipDone.

21

5. Integration

• Sample import script execution (on CE6):[webctce6@webct91 import]$ ce6-import crs csus-PT100-course.xml

Your environment has been set.

Person import failedResult was: Finished import with 10 errors and 0 warnings. See

logs/webct.log for details or logs/enterpriseImport.log for list of users who failed to import.

Import continued after the failureLearning Context import failed (yet content did exist)Result was: Finished import with 1 errors and 0 warnings. See webct.log for

details.Import continued after the failureMembership import completed successfullyPlease see enterpriseImport.log and webct.log for errors and warnings.

22

5. Integration

B. Adding and Enrolling Users

• Write Perl script to convert existing CSV files (used with CE4) into XML. ▼

It’s an extra step, but will buy you time while better ways can be developed.

23

REFERENCES

• URL’s ▼https://webct99.csus.edu/tools/

• BB/WebCT DocumentationInstallation Guide Doc V6.2.0.0 2006Administrator’s Guide Doc V6.2.0 2006Operations Guide Doc V4.2.0.0 2007System Integration Utility Guide Doc V6.2.0.0 2006CE 4.1 (MP) to CE 6.0: Upgrade Guide Doc V4.0.0.1 2005

• Oracle DocumentationBackup and Recovery ConceptsRecovery Manager User’s GuideRecovery Manager Reference

24

Want More?

• To view my resources and references for this presentation, visit

www.scholar.com• Simply click “Advanced Search” and

search by mcooling and tag: ‘bbworld07’

top related