Tuesday, May 12, 2009

list of uml diagrams softwares

StartUML

Saturday, May 9, 2009

oracle 10g installation

Notes on Oracle 10g Installation

Go to the Oracle download web site: http://www.oracle.com/technology/software/products/database/oracle10g/index.html

You may need two different downloads:

The 10g release is the database system itself. You need it only if you want to have databases local to your machine. 10g Client has the SQLPlusWorksheet application. It will allow you to connect to our Oracle server and/or your local database. Click on each release above to see the installation notes. There are additional notes on starting and stopping Oracle 10g, and logging on to Oracle.

Installing 10g

The following is a series of screen snapshots that capture the settings you'll need. Install Oracle at the top of C: (or some other disk). I don't think Oracle likes blanks in its path (e.g., like "Program Files").

Select personal edition, provide a database password and remember this password! Here's the next panel:

Click install. The installer will take a while. You may (or may not) get errors during installation. In such cases, you may or may not get a correct installation. When it has not worked, I ended all of my user processes, and started again. Finally this page appears:

The most important thing to do at this time is to click password management button. You MUST activate the Scott account (and any others that you want). You will then be presented with a screen of information that looks like the following. Copy its contents into a text file for safe keeping.

You're almost done. Search the Oracle installation directory for the tnsnames.ora file. It should be in directory oracle\product\10.1.0\DB4\NETWORK\ADMIN. Open it and you'll find an entry like the one below:

ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
)
)

Copy this, as we will need to paste it into a corresponding file in the 10g client, once it is installed. You may have a different name than ORACLE = . This is the service name (ORACLE or whatever) that you will use to log onto your database.

For reference, here is the tnsnames.ora file that I use for my 10g server. Remember, I used the name ORACLE for my service name; yours might be different. Note also that "commando" is the name of my machine.

# tnsnames.ora Network Configuration File: C:\oracle\product\10.1.0\Db_4\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = commando)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
)
)


MICROLAB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.microlab.cs.utexas.edu)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
(SERVER = DEDICATED)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

Starting and Stopping Oracle

Oracle will install lots of services which will heavily load your machine. Pull up the Windows services panel and see which ones are running. Make note of them, and do the following. Turn off each service and have it start manually. (If not, each time you boot your machine, Oracle will begin to run, and it is a resource hog). To run the local database, you need to start 3 services: OracleService, DBConsole, and CSService. I believe they can be started in any order. In fact, I use the following batch script on my windows machine to start, stop oracle:

rem %1 is either start or stop

net %1 OracleServiceORCL
net %1 OracleOradb10g_home1TNSListener
net %1 OracleCSService

Please note that the names of these services may be different on your machine, so modify the above script accordingly.


Installing 10g Client

Here is the splash screen:

Choose administrator, Next. The installer will grinds for about 10 minutes.

Click cancel. You're almost done.

Now, search for the tnsnames.ora file in the 10g Client installation. It should be in oracle\product\10.1.0\Client_2\NETWORK\ADMIN. Do the following:

  • Add the Oracle descriptor to this file that you extracted from your 10g install. (Click here see how to get this). This descriptor will allow you to log into to your local Oracle database. You can logon as "scott", password "tiger", and the installation service name that was defined in your Oracle 10g installation (e.g., ORACLE).
  • Now add the following additional descriptor. It will allow you to log on as yourself to our class's Oracle server at school. You log on with your user name and password, using microlab as the service.

MICROLAB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.microlab.cs.utexas.edu)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
(SERVER = DEDICATED)
)
)

For reference, here is the tnsnames.ora file that I use for my 10g client. Remember, I used the name ORACLE for my service name; yours might be different:

# tnsnames.ora Network Configuration File: C:\Oracle\product\10.1.0\Client_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

MICROLAB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.microlab.cs.utexas.edu)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
(SERVER = DEDICATED)
)
)

ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = commando)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
)
)

Logging onto Oracle

Use SQLPlusWorksheet to logon to either your local install of 10g or our classes server.

  • Local login: log on as "scott", password "tiger", and the installation service name that was defined in your Oracle 10g installation (e.g., ORACLE).
  • Server login: log on with your user name and password, using microlab as the service.

Unlocking The Scott Account

So you forgot to unlock the Scott account, eh? Here is a suggestion. Login using SQLPlusWorksheet to oracle as "System", using the password you gave to system accounts during installation. Then run the following script:

Notes on Oracle 10g Installation

Go to the Oracle download web site: http://www.oracle.com/technology/software/products/database/oracle10g/index.html

You may need two different downloads:

The 10g release is the database system itself. You need it only if you want to have databases local to your machine. 10g Client has the SQLPlusWorksheet application. It will allow you to connect to our Oracle server and/or your local database. Click on each release above to see the installation notes. There are additional notes on starting and stopping Oracle 10g, and logging on to Oracle.

Installing 10g

The following is a series of screen snapshots that capture the settings you'll need. Install Oracle at the top of C: (or some other disk). I don't think Oracle likes blanks in its path (e.g., like "Program Files").

Select personal edition, provide a database password and remember this password! Here's the next panel:

Click install. The installer will take a while. You may (or may not) get errors during installation. In such cases, you may or may not get a correct installation. When it has not worked, I ended all of my user processes, and started again. Finally this page appears:

The most important thing to do at this time is to click password management button. You MUST activate the Scott account (and any others that you want). You will then be presented with a screen of information that looks like the following. Copy its contents into a text file for safe keeping.

You're almost done. Search the Oracle installation directory for the tnsnames.ora file. It should be in directory oracle\product\10.1.0\DB4\NETWORK\ADMIN. Open it and you'll find an entry like the one below:

ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
)
)

Copy this, as we will need to paste it into a corresponding file in the 10g client, once it is installed. You may have a different name than ORACLE = . This is the service name (ORACLE or whatever) that you will use to log onto your database.

For reference, here is the tnsnames.ora file that I use for my 10g server. Remember, I used the name ORACLE for my service name; yours might be different. Note also that "commando" is the name of my machine.

# tnsnames.ora Network Configuration File: C:\oracle\product\10.1.0\Db_4\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = commando)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
)
)


MICROLAB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.microlab.cs.utexas.edu)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
(SERVER = DEDICATED)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

Starting and Stopping Oracle

Oracle will install lots of services which will heavily load your machine. Pull up the Windows services panel and see which ones are running. Make note of them, and do the following. Turn off each service and have it start manually. (If not, each time you boot your machine, Oracle will begin to run, and it is a resource hog). To run the local database, you need to start 3 services: OracleService, DBConsole, and CSService. I believe they can be started in any order. In fact, I use the following batch script on my windows machine to start, stop oracle:

rem %1 is either start or stop

net %1 OracleServiceORCL
net %1 OracleOradb10g_home1TNSListener
net %1 OracleCSService

Please note that the names of these services may be different on your machine, so modify the above script accordingly.


Installing 10g Client

Here is the splash screen:

Choose administrator, Next. The installer will grinds for about 10 minutes.

Click cancel. You're almost done.

Now, search for the tnsnames.ora file in the 10g Client installation. It should be in oracle\product\10.1.0\Client_2\NETWORK\ADMIN. Do the following:

  • Add the Oracle descriptor to this file that you extracted from your 10g install. (Click here see how to get this). This descriptor will allow you to log into to your local Oracle database. You can logon as "scott", password "tiger", and the installation service name that was defined in your Oracle 10g installation (e.g., ORACLE).
  • Now add the following additional descriptor. It will allow you to log on as yourself to our class's Oracle server at school. You log on with your user name and password, using microlab as the service.

MICROLAB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.microlab.cs.utexas.edu)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
(SERVER = DEDICATED)
)
)

For reference, here is the tnsnames.ora file that I use for my 10g client. Remember, I used the name ORACLE for my service name; yours might be different:

# tnsnames.ora Network Configuration File: C:\Oracle\product\10.1.0\Client_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

MICROLAB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.microlab.cs.utexas.edu)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
(SERVER = DEDICATED)
)
)

ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = commando)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
)
)

Logging onto Oracle

Use SQLPlusWorksheet to logon to either your local install of 10g or our classes server.

  • Local login: log on as "scott", password "tiger", and the installation service name that was defined in your Oracle 10g installation (e.g., ORACLE).
  • Server login: log on with your user name and password, using microlab as the service.

Unlocking the Scott Account

So you forgot to unlock the Scott account, eh? Using SQLPlusWorksheet, login as "system" using the password that you gave to system accounts when you installed oracle. Next, execute the following statements:

alter user scott account unlock;
grant connect, resource to scott;

That should do it. If you want to create new accounts, try this:

create user LOGINNAME profile default identified by PASSWORD;
alter user LOGINNAME account unlock;
grant connect, resource to PASSWORD;

oracle 10g forget password

Many times, users may find themselves with a lost SYS password when using Oracle 10g. Though it may appear difficult, there are many solutions to this issue.

For example, on Oracle DBA Forums, a user finds themselves troubled by a lost SYS password, and was given these solutions by various repliers:

  • First, 'Dave' advises that you can connect using the alter user privilege under any user, and change the password since it has been lost.

  • Next, JGarmany

  • Make sure that the database and listener services are started. Then open a command prompt and log in as / as sysdba. Then change the sys password.

    c:> sqlplus /nolog
    SQL> connect / as sysdba
    SQL> alter user sys identified by ,new password>;


    If you get asked for a password when you log in as / you need to create or recreate the password file using orapw. Check the $ORACLE_HOME/database directory for a file called orapw. That is the password file for the database. Create (or recreate) it using:

    c:\> orawpd file=$ORACLE_HOME/database/orapwd password= entries=5

    Notice it is from the dos prompt

  • Lastly, 'vienpbvbard' informs that you may also want to try the following when you are troubled by a lost SYS password:

  • 1. login oracle user
    2. cd $ORACLE_HOME/network/admin
    3. ed(vi) file sqlnet.ora
    4. Remark by # at begining of line
    SQLNET.AUTHENTICATION_SERVICES = (NONE)
    => #SQLNET.AUTHENTICATION_SERVICES = (NONE)

    5. sqlplus /nolog or (svrmgrl) command
    6. connect sys as sysdba, or connect internal
    (not need input the password).

******* please note that i got this info from internet .. i am not aware of this********