Database administrators (DBAs) are crucial members of every information technology team. They are responsible for mission-critical tasks such as the following:
Installing software and creating databases
Providing a highly scalable and well-behaving database environment
Monitoring and maintaining company databases
Ensuring that corporate data is backed up, secured, and protected
Troubleshooting system performance and availability issues
Being the holistic source of database engineering information
These responsibilities require that a DBA possess a combination of database and operating system (OS) expertise. Its a fact that you (the DBA) cannot architect, implement, or maintain a large, high-transaction database environment without being an expert on the underlying OS. In many situations, the OS is your only conduit to the database. Therefore, its imperative that you be particularly knowledgeable about the OS to competently perform your database administration duties.
When first building a database, DBAs should be able to specify solid, reliable, and scalable system configurations. Furthermore, DBAs are often the cog between system administrators, users, network administrators, managers, and corporate executives. If youre working (after the fact) on a poorly designed system, you have to possess the tools to diagnose and resolve bottlenecks in the entire technology stack. Regardless of the source of the issues, team members often look to the seasoned DBA to resolve systemic performance, security, and availability concerns. We know this to be true because we live it every day (including nights and weekends).
Oracle software runs on a variety of OSs, including many Linux/UNIX variants and Windows. A large number of Oracle installations are on Oracle Linux or Oracle Solaris. Oracle Linux is Oracles version of Linux based on Red Hat Enterprise Linux (RHEL). Oracle Solaris is a UNIX OS originally created by Sun Microsystems and now owned by Oracle Corporation since Oracles acquisition of Sun in 2010.
The Linux and Solaris OSs are widely recognized as reliable 24/7, mission-critical, enterprise server platforms. Employers specifically seek out DBAs with Linux/Solaris expertise. In fact, as a DBA, its inevitable that youll someday use Linux or Solaris servers to store your data. You will be responsible for ensuring that your database is working seamlessly with the underlying OS. Managers will look to you to guarantee that corporate databases are competently implemented and maintained.
This book focuses on helping you understand how to efficiently manage Oracle software on Linux and Solaris servers. On the surface, youll find Linux and Solaris are mostly identical in commands and syntax (the same can be said for Linux and any UNIX variant). Having said that, there are occasional differences between the OSs that you have to be aware of. Well strive to point out these subtle differences where they exist. When there are no differences, well simply refer to the OS as Linux/Solaris, meaning that the concept applies equally to both.
The information in this book will enable you to function as an expert DBA when performing key responsibilities. We provide direct answers to specific problems regarding Oracle database technology running on Linux/Solaris OSs. The recipes in this first chapter assume that you know nothing about Linux/Solaris and cover situations that youll be presented with when you first connect to a server and use OS commands. If you are already fairly experienced with the Linux/Solaris OS, feel free to skip this chapter.
In this chapter, we start by walking you through some of the most common methods for logging on to a Linux/Solaris server. We then cover the basics of running Linux/Solaris commands and detail how to use the built-in help and online documentation. We finish the chapter by showing techniques for correcting command-line mistakes and resetting a terminal screen.
1-1. Connecting Securely to a Remote Server
Problem
Youre using a Windowsbased laptop or workstation and want to securely connect to a remote Linux/Solaris database server over the network.
Solution
This solution shows how to download and use the PuTTY application to initiate secure remote connections over the network:
To get started, download PuTTY from an Internet site such as www.putty.org or www.chiark.greenend.org.uk/sgtatham/putty/download.html .
Once on the PuTTY download site, youll find links that enable you to download the PuTTY application. You can download just the putty.exe file or all utilities available via the putty.zip file.
After you download the desired files, navigate on your personal computer to the directory in which you downloaded the PuTTY utility. You should see a screen similar to Figure . Double-click the PuTTY icon to start the connection utility.
Figure 1-1.
PuTTY application icon
Figure shows a partial screenshot of what you see next. From this screen, you can enter the hostname or IP address and connection port of the remote server to which you want to connect. Enter the connection details of your Linux/Solaris database server and click the Open button to initiate a remote connection. If you arent sure about the connection information, contact your system administrator for details.
Figure 1-2.
PuTTY connection details
After you connect to your database server, you should see the screen shown in Figure provides more detail about shells.)
Figure 1-3.
Linux/Solaris server logon screen
How It Works
PuTTY is a free open source utility that allows you to create a secure shell (SSH) connection to a remote database server. This utility is popular because it is a free, easy-to-use application that enables you to connect securely from a Windows client over the network to remote Linux/Solaris database servers. With this tool, you can store your server preferences and connection information, which eliminates the need to retype lengthy hostnames or IP addresses.
Note
Other utilities also allow you to initiate remote connections via an SSH. For example, the Cygwin/X application is a popular Windows-based implementation of the X Window System. This Cygwin/X utility allows you to run X applications on your Windows desktop and start remote SSH connections to your database server.
You can also use PuTTY to connect via proxy servers and SSH tunneling. Examples are explained briefly in the next sections.