status - Display the current status of the Oracle listener
services - Retrieve the listener services information
version - Display the oracle listener version information
reload - This will reload the oracle listener SID and parameter files. This is equivalent to lsnrctl stop and lsnrctl start.
save_config – This will save the current settings to the listener.ora file and also take a backup of the listener.ora file before overwriting it. If there are no changes, it will display the message “No changes to save for LISTENER”
trace - Enable the tracing at the listener level. The available options are ‘trace OFF’, ‘trace USER’, ‘trace ADMIN’ or ‘trace SUPPORT’
spawn - Spawns a new with the program with the spawn_alias mentioned in the listener.ora file
change_password – Set the new password to the oracle listener (or) change the existing listener password.
show - Display log files and other relevant listener information.
Help example: lsnrctl help show
Starting Up and Shutting Down Database
Start SQL*Plus without connecting to the database:
Here is a simple tutorial on how to install PostgreSQL 9.1, PostGIS 2.0, pgAdmin 3 and QGIS on Ubuntu 12.10.
Open terminal and execute the following code: Note: you only need to type (or copy/paste) text that comes after $ sign. Text that comes after # is a comment and it will not be executed. Internet connection is required.
OK, now we should have PostgreSQL with PostGIS up and running. Next thing we need to do is to add new SuperUser. To do that, open terminal and execute the following code:
#Create user zoranp
$ sudo -u postgres createuser
Enter name of role to add: zoranp
Shall the new role be a superuser? (y/n) y
#Set password for created user
$ sudo -u postgres psql postgres
postgres=# \password zoranp
Enter new password:
Enter it again:
Note: You can replace zoranp username with your own.
Next step is to create PostGIS template. Execute the following code in terminal:
#Allow non-superusers the ability to create from this template
$ psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';" -U zoranp -W -h localhost
$ psql -d postgres -c "UPDATE pg_database SET datallowconn='false' WHERE datname='template_postgis';" -U zoranp -W -h localhost
Note: You should check if postgis.sql and spatial_ref_sys.sql files are in /usr/share/postgresql/9.1/contrib/postgis-2.0/ directory. If they are not, you need to find correct directory and replace path in the code.