<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Oracle Tips and Techniques &#187; Oracle Concept</title>
	<atom:link href="http://www.oraclecity.com/category/oracle-11g-database-concept/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oraclecity.com</link>
	<description>Oracle 11g, Oracle 10g, PL/SQL, Oracle Enterprise Manager 11g Grid Control, Oracle Performance Tuning, Microsoft SQL Server and T-SQL</description>
	<lastBuildDate>Thu, 12 Jan 2012 11:36:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>ORA-00028: your session has been killed</title>
		<link>http://www.oraclecity.com/oracle-11g-database-concept/ora-00028-your-session-has-been-killed/</link>
		<comments>http://www.oraclecity.com/oracle-11g-database-concept/ora-00028-your-session-has-been-killed/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 16:02:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Concept]]></category>
		<category><![CDATA[ora]]></category>

		<guid isPermaLink="false">http://www.oraclecity.com/?p=718</guid>
		<description><![CDATA[oracle error ORA-00028: your session has been killed]]></description>
			<content:encoded><![CDATA[<p><strong>ORA-00028: your session has been killed</strong></p>
<p><strong>Cause</strong>: A privileged user has killed your session and you are no longer logged on to the database.</p>
<p><strong>Action</strong>: Login again if you wish to continue working. This simply means that your oracle session has been killed. So if you need you can login back to the database provided it is still available. You will also get this when your database goes down while you have a SQL*Plus session to the database.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oraclecity.com/oracle-11g-database-concept/ora-00028-your-session-has-been-killed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create or view Oracle AWR reports</title>
		<link>http://www.oraclecity.com/oracle-11g-database-concept/how-to-create-or-view-oracle-awr-reports/</link>
		<comments>http://www.oraclecity.com/oracle-11g-database-concept/how-to-create-or-view-oracle-awr-reports/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 15:38:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Concept]]></category>

		<guid isPermaLink="false">http://www.oraclecity.com/?p=575</guid>
		<description><![CDATA[Oracle provides to script that can be used to create AWR reports. @$ORACLE_HOME/rdbms/admin/awrrpt.sql @$ORACLE_HOME/rdbms/admin/awrrpti.sql The first script is used to generate AWR report for a standalone database. The second script is used to genrate AWR report for different instances in a RAC database cluster. While running the second script it will ask for the instance [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Oracle provides to script that can be used to create AWR reports.</strong></p>
<blockquote><p>@$ORACLE_HOME/rdbms/admin/awrrpt.sql<br />
@$ORACLE_HOME/rdbms/admin/awrrpti.sql</p></blockquote>
<p>The first script is used to generate AWR report for a standalone database. The second script is used to<br />
genrate AWR report for different instances in a RAC database cluster. While running the second script it will ask<br />
for the instance ID for which you want to generate the AWR report.</p>
<p>Here I am showing how to run this script to generate these reports. Once they are generated in text or html<br />
format they can be tranfered to your local machine to do further analysis.</p>
<pre><strong>Click the link to view </strong></em><a href="http://www.oraclecity.com/how-to-create-oracle-awr-report-for-a-single-instance-oracle-database/"><strong>Creating awr report for a single instance Oracle database</strong></a><strong>
</strong></pre>
<pre><strong>Click the link to view </strong></em><a href="http://www.oraclecity.com/how-to-create-oracle-awr-report-for-a-multiple-instance-rac-oracle-database/"><strong>Creating awr report for a multiple instance (RAC) Oracle database</strong></a></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.oraclecity.com/oracle-11g-database-concept/how-to-create-or-view-oracle-awr-reports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tnsnames.ora oracle file explained</title>
		<link>http://www.oraclecity.com/oracle-11g-database-concept/tnsnames-ora-oracle-file-explained/</link>
		<comments>http://www.oraclecity.com/oracle-11g-database-concept/tnsnames-ora-oracle-file-explained/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 14:46:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Concept]]></category>

		<guid isPermaLink="false">http://www.oraclecity.com/?p=559</guid>
		<description><![CDATA[Client Server Connection Oracle client connects to Oracle database server using Oracle Net services. In modern distributed systems, 99% of the time the users (clients) connecting to Oracle database server will connect from a different machine. Oracle Net service facilitates this connection through a number of text based configuration files. Tnsnames.ora is such a configuration [...]]]></description>
			<content:encoded><![CDATA[<p align="right">
<h4><span style="text-decoration: underline;">Client Server Connection</span></h4>
<p>Oracle client connects to Oracle database server using Oracle Net services. In modern distributed systems, 99% of the time the users (clients) connecting to Oracle database server will connect from a different machine. Oracle Net service facilitates this connection through a number of text based configuration files. Tnsnames.ora is such a configuration file which helps in establishing this connection. This file is located in</p>
<blockquote><p>Linux:                      ORACLE_HOME/network/admin</p>
<p>Windows:               ORACLE_HOME\network\admin</p></blockquote>
<p align="right">
<h4><span style="text-decoration: underline;">SQL*Plus command</span></h4>
<p>Consider the command:</p>
<div id="code"><strong> </strong></p>
<blockquote><p><strong>sqlplus system/oracle@MYORCL</strong></p></blockquote>
<p><strong> </strong></div>
<p>where</p>
<blockquote><p><strong>sqlplus </strong>– is the binary executable tool you can use to connect to Oracle</p>
<p><strong>system/oracle</strong> – is the username/password</p>
<p><strong>@</strong> &#8211; sign indicates that you want to connect to a remote database</p>
<p><strong>MYORCL </strong>– called an alias. This is a name specified in tnsnames.ora file that will point to the database server to connect.</p></blockquote>
<p>The main point discussion here is to understand what is “MYORCL” and how my Oracle client will know what MYORCL means. The process of “identifying the destination to connect from the alias” is called name resolution.<span id="more-559"></span></p>
<p>This simple alias name MYORCL should be able to inform Oracle Net service the following information:</p>
<p>-          Host Name/IP of the server which hosts the database server</p>
<p>-          Port number of the listener where it is listening</p>
<p>-          Network protocol to be used for communication</p>
<p>-          SID/Service name</p>
<p align="right">
<p align="right">
<h4><span style="text-decoration: underline;">Tnsnames.ora Example: </span></h4>
<p>an example is given here</p>
<blockquote><p><em><strong>MYORCL =<br />
(DESCRIPTION =<br />
(ADDRESS_LIST =<br />
(ADDRESS = (PROTOCOL = TCP)(Host = 113.10.38.10)(Port = 1521))<br />
)<br />
(CONNECT_DATA =<br />
(SID = ORCL)<br />
)<br />
)</strong></em></p></blockquote>
<p>The name you give to the alias “MYORCL” can be anything, but giving meaningful name makes life much easier. With this entry in tnsnames.ora file, if the command</p>
<blockquote><p><strong>sqlplus system/oracle@MYORCL</strong></p></blockquote>
<p>is executed, then what you are actually saying is “Connect me to a database called ORCL. The database server IP address is 113.10.38.10. The LISTENER is listening on port number 1521 (this is Oracle’s default listener port number)”.</p>
<p>Then if a database is running on that server and the listener is listening on port 1521, then the Oracle Net will be able to take your connection request to the listener.</p>
<p>Once the listener receives this request it will check if the database is up or down. If the database is up and the database name is correct then it will spawn a new server process in the database server machine and will open a new TCP port number which will be assigned to the new server process. Then this port number will be passed back to the client process (sql*plus in this case) and a session will be established.</p>
<p>Important point to note here is, once the connection is established (a new session created) between the client and the server, LISTENER is no more required in the communication between the client and the server processes. So even if LISTENER goes down or taken down, client and server will still be able to communicate and work as though nothing happened.</p>
<p>Another variation of the tnsnames entry given above is</p>
<blockquote><p><em><strong>MYORCL =<br />
(DESCRIPTION =<br />
(ADDRESS_LIST =<br />
(ADDRESS = (PROTOCOL = TCP)(Host = dbhost))(Port = 1521))<br />
)<br />
(CONNECT_DATA =<br />
(SID = ORCL)<br />
)<br />
)</strong></em></p></blockquote>
<p>In this case the database host is given as a name instead of the actual IP address. The name can be anything as long as it can be translated to some network IP address. This kind of configuration involves operating system “hosts” file.  This file is located in</p>
<blockquote><p><strong>Linux               /etc/hosts</strong></p>
<p><strong>Windows       C:\WINDOWS\system32\drivers\etc</strong></p></blockquote>
<p>There are many other variations for tnsnames entries.</p>
<p>For clustered databases the entry may look like</p>
<blockquote><p><strong><br />
MYORCL =<br />
(DESCRIPTION =<br />
(ADDRESS_LIST =<br />
(ADDRESS = (PROTOCOL = TCP)(Host = 113.10.38.10)(Port = 1521))<br />
(ADDRESS = (PROTOCOL = TCP)(Host = 113.10.38.11)(Port = 1526))<br />
)<br />
(CONNECT_DATA =<br />
(SID = ORCL)<br />
)<br />
)</strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.oraclecity.com/oracle-11g-database-concept/tnsnames-ora-oracle-file-explained/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>srvctl modify instance command syntax and example</title>
		<link>http://www.oraclecity.com/oracle-11g-database-concept/srvctl-modify-instance-command-syntax-and-example/</link>
		<comments>http://www.oraclecity.com/oracle-11g-database-concept/srvctl-modify-instance-command-syntax-and-example/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 16:17:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Concept]]></category>
		<category><![CDATA[crs commands]]></category>
		<category><![CDATA[srvctl]]></category>
		<category><![CDATA[srvctl add]]></category>
		<category><![CDATA[srvctl delete]]></category>
		<category><![CDATA[srvctl modify]]></category>
		<category><![CDATA[srvctl start]]></category>
		<category><![CDATA[srvctl stop]]></category>

		<guid isPermaLink="false">http://www.oraclecity.com/?p=413</guid>
		<description><![CDATA[The srvctl modify instance command is used to modify an instance configuration in the  OCR (Oracle cluster registry). Learn here the syntax and example of how to use this command]]></description>
			<content:encoded><![CDATA[<p>The srvctl modify instance command is used to modify an instance configuration in the  OCR (Oracle cluster registry).<br />
Used to modify the configuration for a database instance from its current node to another node or<br />
changes the dependency between and ASM instance and a database instance.</p>
<p><strong></strong></p>
<p><strong></strong></p>
<p><strong><span style="text-decoration: underline;">Syntax:</span></strong></p>
<p>srvctl modify instance -d db_unique_name -i inst_name {-n node_name | -s asm_instance_name | -r}</p>
<p>-d database name (unique name)<br />
-i database instance name.<br />
-n Node name.<br />
-s asm_instance_name: name of the ASM instance (dependency to database instance).<br />
-r : Remove ASM instance dependency from database instance.</p>
<p> </p>
<p> <br />
<strong><span style="text-decoration: underline;">Examples</span></strong></p>
<p>An example of this command to relocate a database instance is:</p>
<p><strong>srvctl modify instance -d crm -i crm1 -n my_new_node</strong></p>
<p>The following example of this command establishes a dependency between an ASM instance and a database instance:</p>
<p><strong>srvctl modify instance -d crm -i crm1 -s asm1</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oraclecity.com/oracle-11g-database-concept/srvctl-modify-instance-command-syntax-and-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle database startup stages and commands</title>
		<link>http://www.oraclecity.com/oracle-11g-database-concept/oracle-database-startup-stages-and-commands/</link>
		<comments>http://www.oraclecity.com/oracle-11g-database-concept/oracle-database-startup-stages-and-commands/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 23:05:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Concept]]></category>
		<category><![CDATA[alter database]]></category>
		<category><![CDATA[Oracle Advanved Tech]]></category>
		<category><![CDATA[startup nomount]]></category>

		<guid isPermaLink="false">http://www.oraclecity.com/?p=398</guid>
		<description><![CDATA[The three Oracle database startup stages executed while opening an Oracle database is explained here. Each stage is explained in separate section with commands. The commands are generic and should work for any version of Oracle execpt sqlplus / as sysdba which will not work in Oracle 8.]]></description>
			<content:encoded><![CDATA[<p> Simply starting an Oracle database with startup command is not too complex. Actually it is just running a few commands and your database will come up happily and be ready for normal operation.</p>
<p> For example to start your Oracle database you can just login and execute startup command as follows.</p>
<p><em><strong> $sqlplus / as sysdba</strong></em></p>
<p><em><strong> SQL&gt;startup</strong></em></p>
<p> </p>
<p>This command will start your database.</p>
<p> But in the background there are a few stages that are hidden when you use the above command. Understanding these stages will help you to get a better insight view of Oracle startup process.</p>
<p>Oracle startup process consists of three stages</p>
<p><strong>Stage 1: NOMOUNT</strong></p>
<p><strong>Stage 2: MOUNT</strong></p>
<p><strong>Stage 3: OPEN</strong></p>
<p> </p>
<p><span style="text-decoration: underline;"> <strong>Stage 1: NOMOUNT</strong></span></p>
<p>This is the first stage in the startup process.  You can start Oracle database in nomount mode using the command</p>
<p><em><strong>SQL&gt;startup nomount</strong></em></p>
<p>When you execute the above command, an Oracle instance is started. When instance starts it will read the initialisation file (commonly known as parameter file) called init.ora file. From this parameter file the instance will know about the size of SGA, PGA, database buffer size and other configurable parameters. The instance will also start the Oracle background process such as (PMON, SMON, LGWR etc). This stage also opens the alert log and the trace files.</p>
<p> </p>
<p><strong><span style="text-decoration: underline;">Stage 2: MOUNT</span></strong></p>
<p>The next stage after NOMOUNT is called MOUNT. You can manually start an Oracle database in MOUNT stage using the command</p>
<p><em><strong>SQL&gt;startup mount</strong></em></p>
<p>Or when database is already in nomount stage then you can change the stage by running the command</p>
<p><strong><em>SQL&gt;alter database mount;</em></strong></p>
<p> </p>
<p>When database goes into mount stage, it will read the control files specified in the parameter file. Remember the parameter file was read in the first stage (nomount). The control files contain the information about the physical structure of the database. So the control file will have the names and locations of all the datafiles and online redo log files. At this stage these datafiles and log files are not opened.</p>
<p> </p>
<p>Some database administration operations can only be performed when the Oracle database is MOUNT stage. For example Oracle full database recovery can be done only when the database is in mount stage. If you want to rename a datafile you may need to take the database to mount stage unless the tablespace of the datafile is already offline.</p>
<p> </p>
<p><strong><span style="text-decoration: underline;">Stage 3: OPEN</span></strong></p>
<p>The final stage in the Oracle startup process. When the database is open then only normal database operations can takes place. Which means users and applications can login and start reading/writing data.</p>
<p>Running the command below will start the Oracle database and put into OPEN stage.  </p>
<p><strong><em>SQL&gt;startup</em></strong></p>
<p>And if the database is already in MOUNT stage then you can open the database using the command</p>
<p><strong><em>SQL&gt; alter database open;</em></strong></p>
<p> </p>
<p>When database is open it will open the datafiles and redo log files. If any of these files are missing or corrupted then Oracle will not open successfully and will return error.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oraclecity.com/oracle-11g-database-concept/oracle-database-startup-stages-and-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

