Scheduling Tasks in Task Juggler

Last time I showed how I set up a project in TaskJuggler. Now it is time to add in the tasks.

Thinking about what I want to achieve, the project goes something like this:

The Project

Update the operating system on the database server

  1. Update the development database server during the patching window.
  2. Run a test to make sure it works. This includes
  • People using it during the day.
  • An automated test running overnight.
  1. Assuming it all works, update the test database server during the patching window.
  2. Run the same tests as above
  3. Update the UAT database server during the patching window
  4. Run the tests
  5. Update production during the patching window.

Patch the databases

This looks very similar to above

Manging Projects

One thing I have found terribly dull is project management. This is something we all have to do at times. My example is the quarterly patching from Oracle. We also take the opportunity to do operating system updates at the same time.

Thinking about how to do the work, we have a patch window where systems are allowed to be shut down (Given the appropriate change control of course) for maintenance to be done. These are twice a week. We have a numer of systems, dev, test, UAT and production like everyone else, and the patches are moved through so any issues are discovered before we hit production.

Gitlab and Sql Developer

We recently got access to Gitlab. It is rather more user friendly than our previous Gitolite install, and has lots more features.

One thing I thought might be useful is to connect SQL developer to it and use the IDE features.

The first thing I discovered is that running SQL Developer off a Windows share is a painful business. Also it is likely to be out of date. Installing it locally seems like a good move.

Automated Testing Users

Imagine a situation where a production database is copied to test, and the data scrambled. Our testers want to access the database because they need to find some data to use for testing.

  • The testing is automated.
  • The refresh is automated
  • The scrambling is automated.

How do we get the testers the password in a secure fashion? Also, how do we ensure testers don’t just use the test user normally? They should log in with their own user name and passwords. Also, the test user shouldn’t have the same password all the time, it should change periodically. This will ensure that if a tester has found out the password because they need it to develop the automated tests, they won’t know it after they leave, or be tempted to use it when they ought to be using their own user name.

Reducing Downtime With Tmadmin

Reducing Downtime

I want to reduce down time. Is it possible to clear a cache, or to restart a server without downtime? Tmadmin is provided by Oracle to perform low level tasks and includes this type of functionality.

Lets have a look.

Purging the cache

This can’t be done if cache sharing is enabled, but if it isn’t, it clears the cache for each process one at a time without downtime.

Un-Delete Open file

There is a way to un-delete a file if a program has it open in Linux.

How directory entries work in Unix

When you remove a file on Linux, what actually happens is that the file is unlinked. Lets have a look. I start with a clean directory:

1
2
3
4
$ ls -la
total 4
drwxrwxr-x  2 me me    6 Sep  4 15:58 .
drwxrwxr-x 14 me me 4096 Sep  4 15:28 ..

The directory has two entries, the current directory and the parent directory. The second entry, the number (2 and 14 above), is the number of links to the file. The current directory has 2 links, one for it’s entry in itself ‘.’ and one for its entry in the parent directory. If we create a file, it has one link:

Delete Online Logs

In the Oracle training courses they always say:

Your junior DBA deleted the online redo logs.

Of course, it is never your junior DBA that does that. They are standing behind you laughing.

Anyway, what to do if your junior DBA deletes the online redo logs. Or even if someone else does it, is first of all, not to panic. According to Ask TOM the worst thing to do is a shut down abort because if you do that, the database will need to be recovered from the online redo logs, and they have been removed.

More Windows Woes

Introduction

Having tested my Windows Ansible build all seemed to be going well. A colleague took the script and ran it, and all seemed to be well, except that Microsoft word didn’t work - It just hung.

The Problem

On the Windows process scheduler Microsoft Office can be invoked to run a macro to populate a template to form a Word Document.

The problem was that despite the Ansible install having run, and supposedly being repeatable, it didn’t work. The process never ended. Looking at task manager we can see that Microsoft Word is running, but it never ended.