Feb
2
Written by:
Matt Wilkins
2/2/2012 1:14 PM
In my last post I outlined the method for accessing and using Quest Software’s Toad for Oracle Freeware and Toad for MySQL Freeware AMI, available at aws.amazon.com. I explained in detail how to start the instance, how to download and install an Oracle client, and how to make sure Toad Freeware recognizes the client. That was good enough to get you started, but what about actually using Toad? In this post I want to illustrate how to fire up a simple RDS instance and then connect to it from the Freeware AMI.
RDS is Amazon’s Relational Database Service, a feature of the Amazon AWS cloud computing platform. There is more than one way to connect to a database in the cloud, but RDS is a relatively simple and easy-to-use service for lightweight database storage needs. As such, it’s a suitable example for connections from Toad Freeware in the cloud. Many of the higher level DB administration tasks, such as backups, are handled on the Amazon RDS side. The corresponding windows in Toad for these tasks are therefore non-functional, and will pop up a message to that effect. If encountered, simply click OK and go on your way.
To get started, you’ll need an Amazon AWS account. Registration is fast and free, but keep in mind that nominal usage fees will apply as long as any instances are up and running. Once registered, go to the AWS Management Console and choose the RDS tab, and then Launch DB Instance:

Next, choose the DB platform. For this blog, we’re concerned with Oracle, although Toad for MySQL Freeware exists on the same AMI as Toad for Oracle, so the process is similar.

Select oracle-se which will put you in the next wizard screen:
Choose the settings as above and select a unique DB Instance Identifier (any descriptive term will do, but use no spaces) as well as a user name and password, then Continue. Select a Database Name and choose port 3306, then Continue. Depending on your network firewall settings, the port number may be different from what is shown. If 3306 does not work, try 1521 or ask your network administrator.

Accept the defaults on the Management Options screen, which is next in the wizard, then Continue. The Review screen will look something like the image below. When finished reviewing, click Launch DB Instance.

In the next screen, choose the link “View your DB instances on the DB Instances page,” which will resemble:
After a few moments, the status will change from “creating” to “available.” Tick the small box next to the DB Instance name in order to see all the necessary connection details in the lower pane:

In the image above, I have highlighted in red the important values you’ll need in the Toad login window to make your connection. Now, either launch Toad Freeware from your AMI instance, or launch an earthbound copy of Toad, Freeware or not. We’ll take the important bits above and plug them into the login screen’s direct connect tab:

Note how the four necessary database connection components map to the corresponding fields in the above screenshot: username and password, host, port, and service name. It’s really that simple!
Now click Connect. Connection should be (almost) as quick and trouble-free as any remote database server, and operating in Toad will be perfectly familiar. You’re now ready to start building DB objects, storing data, or creating PL/SQL as you would on any database.
When you’re ready to quit and want to save your hard-earned work, press the Take Snapshot button in the My DB Instances console back on AWS, and give the snapshot a name:

Alternatively, delete the instance and AWS will prompt you to create a snapshot first. Amazon is looking out for you!

After successfully creating your snapshot (which you can launch at later time), the instance will be deleted:

When you’re ready to resume work on the instance, simply restore from that snapshot:

From here, it’s the same process as creating the instance above; connect as you did previously in Toad. Be sure to create another snapshot when you’re finished!
In my next blog, I will show you how to create a full-blown database server on an Amazon EC2 instance. The EC2 instance can scale and grow as your database does, and should meet the needs of the more demanding user. Happy cloud computing!