When tackling a new scripting or programming language for use with Oracle there are a recurring set of core topics. If you simply focus on these you will get up-to-speed more quickly and it will be a lot less stressful. Maybe even enjoyable!
This is focused on Oracle System DBA support. If you need to have a script to calculate Pi to the last digit or extract stock prices of Eastern Prussian investments it is not covered here. I have found focusing on this small set of topics really jump starts one getting to the point of practicality in Oracle production environment support.
Core Oracle Scripting Topics
- Output to console\device.
- Assigning and outputting variables.
- Get input via user and script parameter.
- If\Else comparisons and operators.
- Case or Switch statements.
- Loops (including looping through an array).
- Test if a directory and file exists.
- Delete a file.
- Create\append to a log file.
- Get a value from a config file (.xml, .ini, .conf etc.).
- Put a small file's contents into a variable.
- Output date and time in multiple common formats.
- Extract the running scripts name.
- Include File and\or code reuse structure.
- Run an executable program and pass it parameters.
- Send an email.
- String manipulation (contains, length, position, substring, trim, toLower, toUpper etc.).
- Error block dispatching (usually a try-catch derivative).
- Connect to an Oracle database.
- Get a specific value from the database (like the version number etc.).
- Output values in an Oracle table.
- Execute a SQL statement.
- If OOP can be used:
- Create an object (AKA class).
- Get and set an object value.
- Call an object method.
- Use a constructor (set default values for object, AKA initialize).
File List for Core Topics
HelloWorld.x Vars.x Input.x If-Else.x Case-Switch.x Loops.x DirExists.x FileExists.x FileDelete.x LogWrite.x File2Var.x FileValue2Var.x DateTime.x ScriptName.x Include1.x Include2.x App_run.x Email_send.x Strings.x ErrorBlock.x Oracle_connect.x Oracle_getValue.x Oracle_getTable.x Oracle_execSQL.x oop_createObj.x oop_getObjValue.x oop_setObjValue.x oop_runObjMethod.x oop_initObj.x