How to start and stop the database service
If you installed the Express Edition of the Oracle Database on your computer as described in appendix A, the database service starts automatically when you start your computer. This piece of software is often referred to as the database server, or the database engine. It receives SQL statements that are passed to it, processes them, and returns the results.
The database listener also starts automatically when you start your computer. This piece of software listens for requests from remote clients and returns the results to them.
From time to time, you may want to stop the database. If, for example, you aren’t going to be using the database and you want to free the resources on your computer, you can stop the database. Or, if the port that is being used by the Oracle Database conflicts with another program, you can stop the database. Then, when you want to work with the database again, you can start it.
The easiest way to stop the database service is to use the Stop Database command that’s available from the Windows Start menu as described in figure 2-1. When you select this item on a Windows system, a DOS window will be displayed that indicates that the Oracle service is stopping. Then, the DOS window will display a message when the Oracle service has successfully stopped. Although this doesn’t stop the database listener, the database listener won’t be able to return any results unless the database service is running.
When you’re running the Oracle Database on your own computer for training purposes, you can stop the database whenever you want. However, if a database is running in a production environment, you should make sure that all users are logged off and that no applications are using the database before you stop the database.
The easiest way to start the database service and listener is to use the Start Database command that’s available from the Windows Start menu. When you select this command on a Windows system, a DOS window will be displayed that indicates the status of the Oracle listener and service.
How to stop the database
- Start -> All Programs -> Oracle Database 11g Express Edition -> Stop Database
How to start the database
- Start -> All Programs > Oracle Database 11g Express Edition -> Start Database
Description
- After you install the Oracle Database, the database service and database listener starts automatically each time you start your computer. The database service can also be referred to as the database server or the database engine.
- To stop or start the database server and listener, you can use the commands that are available from the Windows Start menu.
- When Oracle Database 12c Express Edition becomes available, you should be able to use a similar technique to stop and start that version of the Oracle Database.
How to use the Database Home Page
Figure 2-2 shows how to use a web-based tool known as the Database Home Page to work with an Oracle database. This tool is installed when you install the Oracle Database as described in appendix A, and it’s useful for handling some tasks. In particular, it provides a way to create a new user for the database.
To begin, you can start the Database Home Page by selecting the Oracle Database 11g Express Edition -> Get Started command from the Windows Start menu. Then, select the Application Express tab, and log in as the system user. If you followed the advice of appendix A, that means you’ll use “system” as the username and “system” as the password.
After you’ve logged in, you can use the resulting web page to create a new user. When you create a new user, you provide a username and a password. In addition, you must provide a username for Application Express. In this book,you don’t need to use that username for anything.
You can get a feel for the information that’s available from the Database Home Page by clicking on its tabs. However, this tool doesn’t provide much functionality. To perform most tasks, you can use the SQL Developer tool that’s described later in this chapter.
How to start the Database Home Page
- From the Windows Start menu, select All Programs?Oracle Database 11g ExpressEdition > Get Started.
- From the Database Home Page, click the Application Express tab. If necessary, log in as the system user. Then, use the resulting page to create the user.
- The Database Home Page is a web-based tool that you can use to work with an Oracle Database.
- After you log in, you can use the Home, Storage Sessions, Parameters, and Application Express menus to work with the database.
- For most tasks, it’s easier to use the SQL Developer tool that’s described later in this chapter.