<?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>Database.fi</title>
	<atom:link href="http://www.database.fi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.database.fi</link>
	<description>Database information &#38; performance tuning</description>
	<lastBuildDate>Wed, 14 Apr 2010 13:06:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Oracle 11g virtual columns</title>
		<link>http://www.database.fi/2010/04/oracle-11g-virtual-columns/</link>
		<comments>http://www.database.fi/2010/04/oracle-11g-virtual-columns/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 13:06:22 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle 11g]]></category>
		<category><![CDATA[Oracle 11g New Features]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=74</guid>
		<description><![CDATA[When I found out about virtual columns I just had to try it.
Just a simple example for our familiar employees table. 
First I made a copy of the employees:
Create table duunarit as select * from employees;

SQL> desc duunarit
 Name                 [...]]]></description>
			<content:encoded><![CDATA[<p>When I found out about virtual columns I just had to try it.<br />
Just a simple example for our familiar employees table. </p>
<p>First I made a copy of the employees:<br />
Create table duunarit as select * from employees;</p>
<p><code><br />
SQL> desc duunarit<br />
 Name                                      Null?    Type<br />
 ----------------------------------------- -------- ---------------------</p>
<p> EMPLOYEE_ID                                        NUMBER(6)<br />
 FIRST_NAME                                         VARCHAR2(20)<br />
 LAST_NAME                                 NOT NULL VARCHAR2(25)<br />
 EMAIL                                     NOT NULL VARCHAR2(25)<br />
 PHONE_NUMBER                                       VARCHAR2(20)<br />
 HIRE_DATE                                 NOT NULL DATE<br />
 JOB_ID                                    NOT NULL VARCHAR2(10)<br />
 SALARY                                             NUMBER(8,2)<br />
 COMMISSION_PCT                                     NUMBER(2,2)<br />
 MANAGER_ID                                         NUMBER(6)<br />
 DEPARTMENT_ID                                      NUMBER(4)<br />
</code></p>
<p>I would like to add a salgrade column to the table with some simple reasoning based on salary:<br />
 when salary is less than 3000, print &#8216;Poor you&#8217;<br />
 when salary is 3000 &#8211; 5000, print &#8216;Lucky you&#8217;<br />
 when it is above 5000, print &#8216;You bastard&#8217;</p>
<p> <img src='http://www.database.fi/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So here is my column definition:</p>
<p><code>alter table duunarit add<br />
(salgrade varchar2(20)<br />
generated always as<br />
(<br />
case<br />
 when salary < 3000 then 'Poor you'<br />
 when salary < 5000 then 'Lucky you'<br />
 else 'You bastard'<br />
end<br />
)virtual<br />
);</p>
<p>Table altered.<br />
</code></p>
<p>Let's try it!</p>
<p><code>SQL> l<br />
  1* select last_name, salary, salgrade from duunarit</p>
<p>LAST_NAME                     SALARY SALGRADE<br />
------------------------- ---------- --------------------<br />
King                           24000 You bastard<br />
Kochhar                        17000 You bastard<br />
De Haan                        17000 You bastard<br />
Hunold                          9000 You bastard<br />
Ernst                           6000 You bastard<br />
Austin                          4800 Lucky you<br />
Pataballa                       4800 Lucky you<br />
Lorentz                         4200 Lucky you<br />
Greenberg                      12000 You bastard<br />
Faviet                          9000 You bastard<br />
Chen                            8200 You bastard</p>
<p>LAST_NAME                     SALARY SALGRADE<br />
------------------------- ---------- --------------------<br />
Sciarra                         7700 You bastard<br />
Urman                           7800 You bastard<br />
Popp                            6900 You bastard<br />
Raphaely                       11000 You bastard<br />
Khoo                            3100 Lucky you<br />
Baida                           2900 Poor you<br />
Tobias                          2800 Poor you<br />
Himuro                          2600 Poor you<br />
Colmenares                      2500 Poor you<br />
Weiss                           8000 You bastard<br />
Fripp                           8200 You bastard<br />
</code></p>
<p>This looks great functionality!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2010/04/oracle-11g-virtual-columns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing and configuring Statspack to Oracle (dbms_job configuration)</title>
		<link>http://www.database.fi/2010/03/installing-and-configuring-statspack-to-oracle/</link>
		<comments>http://www.database.fi/2010/03/installing-and-configuring-statspack-to-oracle/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 15:58:46 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Jobs]]></category>
		<category><![CDATA[Statspack]]></category>
		<category><![CDATA[dbms_ijob]]></category>
		<category><![CDATA[dbms_job]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[oracle job]]></category>
		<category><![CDATA[Oracle Performance Tuning]]></category>
		<category><![CDATA[Performance Tuning]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=55</guid>
		<description><![CDATA[I was asked to provide instructions on how to install and configure Statspack into Oracle so here goes.
The statspack scripts can be found from under this directory structure:
$Oracle_home/rdbms/admin

The installation needs to be run as SYS user.
Basic installation is done simply by running this script:
@?/rdbms/admin/spcreate.sql

This installs the Statspack engine &#038; tables to database.
You can (if you [...]]]></description>
			<content:encoded><![CDATA[<p>I was asked to provide instructions on how to install and configure Statspack into Oracle so here goes.</p>
<p>The statspack scripts can be found from under this directory structure:<br />
<code>$Oracle_home/rdbms/admin<br />
</code></p>
<p>The installation needs to be run as SYS user.</p>
<p>Basic installation is done simply by running this script:<br />
<code>@?/rdbms/admin/spcreate.sql<br />
</code></p>
<p>This installs the Statspack engine &#038; tables to database.</p>
<p>You can (if you want) automate the snap creation with this script:<br />
<code>@?/rdbms/admin/spauto.sql<br />
</code><br />
This script takes snaps every hour starting from the next hour.</p>
<p>You can modify this script to make another kind of scheduling.<br />
For example if you want to take snaps every half an hour, you need to modify:<br />
<code>"sysdate+1/24" => "sysdate+1/48"</p>
<p>dbms_job.submit(:jobno, 'statspack.snap;', trunc(sysdate+1/24,'HH'), 'trunc(SYSDATE+1/24,''HH'')', TRUE, :instno);<br />
</code><br />
=><br />
<code>dbms_job.submit(:jobno, 'statspack.snap;', trunc(sysdate+1/48,'HH'), 'trunc(SYSDATE+1/48,''HH'')', TRUE, :instno);<br />
</code></p>
<p>If you need to ie. change the currently running job interval, you need to find out the job number first.<br />
Connect as dba user to Oracle and run this query:<br />
<code><br />
select job, what, interval from dba_jobs;</p>
<p>       JOB<br />
----------<br />
WHAT<br />
-----------------------------<br />
INTERVAL<br />
-----------------------------<br />
        21<br />
statspack.snap;<br />
trunc(SYSDATE+1/24,'HH')</code></p>
<p>So the statspack.snap is run every hour and job number is 21. Fine.<br />
Let&#8217;s say that we need to run it every half an hour.<br />
We need to change the interval to: 1/48.</p>
<p>You can update the job interval like this. You can set is as the job owner with this syntax:<br />
<code>exec dbms_job.interval(21,'TRUNC(SYSDATE+1/48,''HH'')');</p>
<p>PL/SQL procedure successfully completed.<br />
</code></p>
<p>Or as another user with DBA privileges:<br />
<code>SQL> show user<br />
USER is "SYS"<br />
SQL> exec dbms_ijob.interval(21,'TRUNC(SYSDATE+1/48,''HH'')');</p>
<p>PL/SQL procedure successfully completed.<br />
</code></p>
<p><em>Please note: there are two single quotes &#8216; around HH, not one double-quote &#8220;.<br />
</em></p>
<p>Also you could remove the job with:<br />
<code>exec dbms_job.remove(21);</code></p>
<p>and re-create it with:<br />
<code><br />
variable jobno number;<br />
variable instno number;<br />
begin<br />
  select instance_number into :instno from v$instance;<br />
  dbms_job.submit(:jobno, 'statspack.snap;', trunc(sysdate+1/48,'HH'), 'trunc(SYSDATE+1/48,''HH'')', TRUE, :instno);<br />
  commit;<br />
end;<br />
/<br />
</code></p>
<p>You should try that the job runs now.</p>
<p>Run as the job owner:<br />
<code>SQL> exec dbms_job.run(21);</p>
<p>PL/SQL procedure successfully completed.<br />
</code><br />
Run as a DBA user:<br />
<code>SQL> exec dbms_ijob.run(21);</p>
<p>PL/SQL procedure successfully completed.</code></p>
<p>You can check when the next scheduled job run is:<br />
<code><br />
SQL> select job, what, interval, to_char(next_date, 'DD.MM.YYYY HH24:MI:SS') from dba_jobs where job=21;</p>
<p>       JOB<br />
----------<br />
WHAT<br />
-------------------------------------<br />
INTERVAL<br />
-------------------------------------<br />
TO_CHAR(NEXT_DATE,'<br />
-------------------<br />
        21<br />
statspack.snap;<br />
TRUNC(SYSDATE+1/48,'HH')<br />
29.03.2010 11:00:00</code></p>
<p>Statspack was introduced in Oracle 9i and it is still an usable tool in current Oracle version of 11.2.<br />
AWR is superior technology compared to Statspack, but for many purposes Statspack still holds its place.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2010/03/installing-and-configuring-statspack-to-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic start of Oracle database on Linux</title>
		<link>http://www.database.fi/2010/03/automatic-start-of-oracle-database-on-linux/</link>
		<comments>http://www.database.fi/2010/03/automatic-start-of-oracle-database-on-linux/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 21:46:47 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Auto-start]]></category>
		<category><![CDATA[Automatic start]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=18</guid>
		<description><![CDATA[In certain cases Oracle does not start automatically on Linux after installation.
To fix this, you need to do these steps:
Modify oratab
vi /etc/oratab
change the “N” at the end => “Y”
For example:
From: orcl:/u01/app/oracle/product/11.2.0/dbhome_1:N
To: orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y
Create a dbora file under /etc/init.d/
vi /etc/init.d/dbora
#!/bin/sh
# chkconfig: 345 99 10
# description: Automatic Oracle database start-stop script.
# Set ORA_OWNER to the user id of [...]]]></description>
			<content:encoded><![CDATA[<p>In certain cases Oracle does not start automatically on Linux after installation.<br />
To fix this, you need to do these steps:<br />
Modify oratab<br />
vi /etc/oratab<br />
change the “N” at the end => “Y”<br />
For example:<br />
From: orcl:/u01/app/oracle/product/11.2.0/dbhome_1:N<br />
To: orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y<br />
Create a dbora file under /etc/init.d/<br />
vi /etc/init.d/dbora<br />
#!/bin/sh<br />
# chkconfig: 345 99 10<br />
# description: Automatic Oracle database start-stop script.<br />
# Set ORA_OWNER to the user id of the owner of the<br />
# Oracle database in ORA_HOME.<br />
ORA_HOME=/u01/app/oracle/product/11.2.0/dbhome_1<br />
ORA_OWNER=oracle<br />
if [ ! -f $ORA_HOME/bin/dbstart ]<br />
then<br />
echo &#8220;Oracle startup: cannot start&#8221;<br />
exit<br />
fi<br />
case &#8220;$1&#8243; in<br />
&#8217;start&#8217;)<br />
# Start Oracle databases:<br />
su &#8211; $ORA_OWNER -c &#8220;$ORA_HOME/bin/dbstart $ORA_HOME&#8221;<br />
touch /var/lock/subsys/dbora<br />
;;<br />
&#8217;stop&#8217;)<br />
# Stop Oracle databases:<br />
su &#8211; $ORA_OWNER -c &#8220;$ORA_HOME/bin/dbshut $ORA_HOME&#8221;<br />
rm -f /var/lock/subsys/dbora<br />
;;<br />
esac<br />
If you modify the script above, remember to keep the 3 first commented lines (shell, chkconfig and description).<br />
Change the privileges to appropriate level with:<br />
chmod 750 /etc/init.d/dbora<br />
Now add the script to chkconfig:<br />
chkconfig &#8211;add dbora<br />
You can check this with:</p>
<p>$> chkconfig &#8211;list | grep db<br />
dbora 0:off 1:off 2:off 3:on 4:on 5:on 6:off<br />
You’re done, verify after next reboot:<br />
ps -ef | grep smon</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2010/03/automatic-start-of-oracle-database-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SELinux and Oracle – How to disable SELinux and make Oracle work</title>
		<link>http://www.database.fi/2010/03/selinux-and-oracle-%e2%80%93-how-to-disable-selinux-and-make-oracle-work/</link>
		<comments>http://www.database.fi/2010/03/selinux-and-oracle-%e2%80%93-how-to-disable-selinux-and-make-oracle-work/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 21:43:32 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Disable SELinux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SELinux]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=16</guid>
		<description><![CDATA[If you encounter this error on Oracle it is a good possibility that you have SELinux enabled on your Linux box:
$> sqlplus / as sysdba
sqlplus: error while loading shared libraries: /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied
The quick way to get Oracle working is to use setenforce:
$> setenforce 0
$> sqlplus / as sysdba
SQL*Plus: [...]]]></description>
			<content:encoded><![CDATA[<p>If you encounter this error on Oracle it is a good possibility that you have SELinux enabled on your Linux box:</p>
<p>$> sqlplus / as sysdba<br />
sqlplus: error while loading shared libraries: /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied<br />
The quick way to get Oracle working is to use setenforce:</p>
<p>$> setenforce 0<br />
$> sqlplus / as sysdba<br />
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 13 15:31:35 2010<br />
Copyright (c) 1982, 2009, Oracle. All rights reserved.<br />
&#8230;<br />
However, this solution will only work until you reboot the server.<br />
To permanently fix this issue you need to modify the SELinux configuration file:</p>
<p>$> vi /etc/selinux/config<br />
Change:<br />
SELINUX=enforcing<br />
To:<br />
SELINUX=disabled<br />
You should also be able to use permissive mode on single instances, if you change to this mode BEFORE you install Oracle:<br />
SELINUX=permissive<br />
CRS will not like permissive mode, so this does not apply for RAC installations.<br />
Now SQL*Plus works:</p>
<p>$> sqlplus / as sysdba<br />
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 13 15:31:35 2010<br />
Copyright (c) 1982, 2009, Oracle. All rights reserved.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2010/03/selinux-and-oracle-%e2%80%93-how-to-disable-selinux-and-make-oracle-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with Unicode in Oracle</title>
		<link>http://www.database.fi/2010/03/working-with-unicode-in-oracle/</link>
		<comments>http://www.database.fi/2010/03/working-with-unicode-in-oracle/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 21:42:36 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Dump]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Unicode]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=14</guid>
		<description><![CDATA[I have been working mostly with “normal” character set databases.
The last project however uses Unicode database (AL32UTF8) in 11.2
I ran into this strange behaviour (until I knew better):
create table test(field varchar2(10));
Table created.
SQL> insert into testi values (&#8216;öäåÖÄÅ&#8217;);
insert into testi values (&#8216;öäåÖÄÅ&#8217;)
*
ERROR at line 1:
ORA-12899: value too large for column &#8220;&#8221;TEST&#8221;.&#8221;FIELD&#8221; (actual: 18,
maximum: 10)
SQL> insert into [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working mostly with “normal” character set databases.<br />
The last project however uses Unicode database (AL32UTF8) in 11.2<br />
I ran into this strange behaviour (until I knew better):</p>
<p>create table test(field varchar2(10));<br />
Table created.<br />
SQL> insert into testi values (&#8216;öäåÖÄÅ&#8217;);<br />
insert into testi values (&#8216;öäåÖÄÅ&#8217;)<br />
*<br />
ERROR at line 1:<br />
ORA-12899: value too large for column &#8220;&#8221;TEST&#8221;.&#8221;FIELD&#8221; (actual: 18,<br />
maximum: 10)<br />
SQL> insert into test values (&#8216;öä&#8217;);<br />
1 row created.<br />
So – I created a field for 10 characters (or so I thought!) and tried to store only 6 characters and failed.<br />
What an odd thing.<br />
Closer look tells that each character actually uses 3 bytes each:</p>
<p>SQL> select dump(field) from test;<br />
DUMP(KENTTA)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Typ=1 Len=6: 239,191,189,239,191,189<br />
1 row selected.<br />
All right, so it seems that there is actually space for only 10 BYTES – not characters…<br />
After 5 seconds of furious googling the reason is clear and my world shattered, again.<br />
The VARCHAR2(10) REALLY means VARCHAR2(10 BYTE).<br />
What I should have always used is VARCHAR2(10 CHAR).<br />
A new test:</p>
<p>create table test2 (field varchar2(10 char));<br />
=><br />
SQL> insert into test2 values(&#8216;öäåÖÄÅ&#8217;);<br />
1 row created.<br />
How embarrassing after so many years of working with Oracle  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2010/03/working-with-unicode-in-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limiting rows per block in Oracle database table – setting Hakan factor</title>
		<link>http://www.database.fi/2010/03/limiting-rows-per-block-in-oracle-database-table-%e2%80%93-setting-hakan-factor/</link>
		<comments>http://www.database.fi/2010/03/limiting-rows-per-block-in-oracle-database-table-%e2%80%93-setting-hakan-factor/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 21:41:39 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Hakan factor]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Rows per block]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=12</guid>
		<description><![CDATA[This is something I learned today by accident
There are times when you need to optimize physical data arrangement in database, in this case in a database table. The reasons for this vary from row migration to concurrency problems.
Here is one way to limit rows inside database table to a set value.
You must understand this is [...]]]></description>
			<content:encoded><![CDATA[<p>This is something I learned today by accident<br />
There are times when you need to optimize physical data arrangement in database, in this case in a database table. The reasons for this vary from row migration to concurrency problems.<br />
Here is one way to limit rows inside database table to a set value.<br />
You must understand this is may not be the best way to accomplish this.<br />
Of course this can be done also by setting PCTFREE to a high value, but that is not as exact science as this.<br />
Here goes:</p>
<p>create table test(field number);<br />
insert into test values(1);<br />
commit;<br />
alter table test minimize records_per_block;<br />
&#8211;From this point on, number of rows per block will be limited to 1.<br />
I learned this from Mark J. Bobak from Oracle forums.<br />
Here are his words:<br />
“The alter table &#8230; minimize records_per_block;<br />
functionality sets the Hakan factor. This limits the number of rows per block to the max of the largest number of rows in any block in the table. This functionality was originally conceived to help optimize builds of bitmap indexes, but it can be used anytime you want to ‘artificially’ limit the number of rows per block.”</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2010/03/limiting-rows-per-block-in-oracle-database-table-%e2%80%93-setting-hakan-factor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle 11g and default 180 day default password life time ( PASSWORD_LIFE_TIME )</title>
		<link>http://www.database.fi/2010/03/oracle-11g-and-default-180-day-default-password-life-time-password_life_time/</link>
		<comments>http://www.database.fi/2010/03/oracle-11g-and-default-180-day-default-password-life-time-password_life_time/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 21:40:26 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Oracle 11g]]></category>
		<category><![CDATA[Passwords]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=10</guid>
		<description><![CDATA[Just a quick reminder about maybe the most common small problem in new 11g installations / upgrades.
When entering the 11g world, remember to do something to the default setting of password life time of 180 days. If you do nothing, your users / schemas will cease to work after half an year from creation.
select profile, [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick reminder about maybe the most common small problem in new 11g installations / upgrades.<br />
When entering the 11g world, remember to do something to the default setting of password life time of 180 days. If you do nothing, your users / schemas will cease to work after half an year from creation.<br />
select profile, limit from dba_profiles where resource_name = &#8216;PASSWORD_LIFE_TIME&#8217;;<br />
PROFILE LIMIT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
DEFAULT 180<br />
MONITORING_PROFILE DEFAULT<br />
If you want to remove the limits altogether, here is how to do it:<br />
SQL> alter profile default limit PASSWORD_LIFE_TIME unlimited;<br />
Profile altered.<br />
Verify with:<br />
1* select profile, limit from dba_profiles where resource_name = &#8216;PASSWORD_LIFE_TIME&#8217;<br />
PROFILE LIMIT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
DEFAULT UNLIMITED<br />
MONITORING_PROFILE DEFAULT</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2010/03/oracle-11g-and-default-180-day-default-password-life-time-password_life_time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Operating System (OS) authentication in Windows</title>
		<link>http://www.database.fi/2010/03/operating-system-os-authentication-in-windows/</link>
		<comments>http://www.database.fi/2010/03/operating-system-os-authentication-in-windows/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 21:39:06 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Operating System Authentication]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[OS Authentication]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=8</guid>
		<description><![CDATA[I had a question in training about OS authentication in Windows.
The question was about normal user authentication, not the SYSDBA authentication.
Hmm. I had never used it for authenticating normal users – so I just had to try.
First I need to know which user I am:
SQL> select UPPER(sys_context(&#8216;userenv&#8217;,'os_user&#8217;)) from dual;
UPPER(SYS_CONTEXT(&#8216;USERENV&#8217;,'OS_USER&#8217;))
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;
PASICITRUS\PASI PARKKONEN
SQL>
The next step is to create [...]]]></description>
			<content:encoded><![CDATA[<p>I had a question in training about OS authentication in Windows.<br />
The question was about normal user authentication, not the SYSDBA authentication.<br />
Hmm. I had never used it for authenticating normal users – so I just had to try.<br />
First I need to know which user I am:<br />
SQL> select UPPER(sys_context(&#8216;userenv&#8217;,'os_user&#8217;)) from dual;<br />
UPPER(SYS_CONTEXT(&#8216;USERENV&#8217;,'OS_USER&#8217;))<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
PASICITRUS\PASI PARKKONEN<br />
SQL><br />
The next step is to create that user and grant user rights:<br />
create user &#8220;PASICITRUS\PASI PARKKONEN&#8221; identified externally;<br />
User created.<br />
SQL> grant dba to &#8220;PASICITRUS\PASI PARKKONEN&#8221;;<br />
Grant succeeded.<br />
Now I can try to connect:<br />
SQL> connect /<br />
Connected.<br />
Who am I..?<br />
SQL> show user<br />
USER is &#8220;PASICITRUS\PASI PARKKONEN&#8221;<br />
Great, done!  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2010/03/operating-system-os-authentication-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to reinstall Enterprise Manager (Database Control)</title>
		<link>http://www.database.fi/2010/03/how-to-reinstall-enterprise-manager-database-control/</link>
		<comments>http://www.database.fi/2010/03/how-to-reinstall-enterprise-manager-database-control/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 21:34:01 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Database Control]]></category>
		<category><![CDATA[Enterprise Manager]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=4</guid>
		<description><![CDATA[If you have problems in running Enterprise Manager (aka Database Control), you may need to reinstall it.
Here is how to do it.
Run the following command: emca -deconfig dbcontrol db -repos drop
C:\>emca -deconfig dbcontrol db -repos drop
STARTED EMCA at 3.2.2010 13:10:47
EM Configuration Assistant, Version 11.1.0.5.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database [...]]]></description>
			<content:encoded><![CDATA[<p>If you have problems in running Enterprise Manager (aka Database Control), you may need to reinstall it.<br />
Here is how to do it.</p>
<p>Run the following command: emca -deconfig dbcontrol db -repos drop</p>
<p>C:\>emca -deconfig dbcontrol db -repos drop</p>
<p>STARTED EMCA at 3.2.2010 13:10:47<br />
EM Configuration Assistant, Version 11.1.0.5.0 Production<br />
Copyright (c) 2003, 2005, Oracle. All rights reserved.</p>
<p>Enter the following information:<br />
Database SID: orcl<br />
Listener port number: 1521<br />
Password for SYS user:<br />
Password for SYSMAN user:<br />
Password for SYSMAN user:<br />
Do you wish to continue? [yes(Y)/no(N)]: Y<br />
3.2.2010 13:13:34 oracle.sysman.emcp.EMConfig perform<br />
INFO: This operation is being logged at C:\app\oracle\cfgtoollogs\emca\orcl\em<br />
_2010_02_03_13_10_47.log.<br />
3.2.2010 13:13:45 oracle.sysman.emcp.EMDBPreConfig performDeconfiguration<br />
WARNING: EM is not configured for this database. No EM-specific actions can be<br />
erformed.<br />
3.2.2010 13:13:50 oracle.sysman.emcp.EMReposConfig invoke<br />
INFO: Dropping the EM repository (this may take a while) &#8230;<br />
3.2.2010 13:34:40 oracle.sysman.emcp.EMReposConfig invoke<br />
INFO: Repository successfully dropped<br />
Enterprise Manager configuration completed successfully<br />
FINISHED EMCA at 3.2.2010 13:34:40</p>
<p>The process may take a while.</p>
<p>After the drop you can reinstall the Enterprise Manager with: emca -config dbcontrol db -repos create</p>
<p>C:\>emca -config dbcontrol db -repos create</p>
<p>STARTED EMCA at 3.2.2010 13:37:18<br />
EM Configuration Assistant, Version 11.1.0.5.0 Production<br />
Copyright (c) 2003, 2005, Oracle. All rights reserved.</p>
<p>Enter the following information:<br />
Database SID: orcl<br />
Listener port number: 1521<br />
Password for SYS user:<br />
Password for DBSNMP user:<br />
Password for SYSMAN user:<br />
Password for SYSMAN user: Email address for notifications (optional):<br />
Outgoing Mail (SMTP) server for notifications (optional):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>You have specified the following settings</p>
<p>Database ORACLE_HOME &#8230;&#8230;&#8230;&#8230;&#8230;. C:\app\oracle\product\11.1.0\db_1</p>
<p>Local hostname &#8230;&#8230;&#8230;&#8230;&#8230;. IP_address<br />
Listener port number &#8230;&#8230;&#8230;&#8230;&#8230;. 1521<br />
Database SID &#8230;&#8230;&#8230;&#8230;&#8230;. orcl<br />
Email address for notifications &#8230;&#8230;&#8230;&#8230;&#8230;<br />
Outgoing Mail (SMTP) server for notifications &#8230;&#8230;&#8230;&#8230;&#8230;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Do you wish to continue? [yes(Y)/no(N)]: Y<br />
3.2.2010 13:38:43 oracle.sysman.emcp.EMConfig perform<br />
INFO: This operation is being logged at C:\app\oracle\cfgtoollogs\emca\orcl\emca<br />
_2010_02_03_13_37_18.log.<br />
3.2.2010 13:38:45 oracle.sysman.emcp.EMReposConfig createRepository<br />
INFO: Creating the EM repository (this may take a while) &#8230;<br />
3.2.2010 13:53:25 oracle.sysman.emcp.EMDBPostConfig performConfiguration<br />
INFO: Database Control started successfully<br />
3.2.2010 13:53:25 oracle.sysman.emcp.EMDBPostConfig performConfiguration<br />
INFO: >>>>>>>>>>> The Database Control URL is https://IP_address:5500/em <<<<<<<<br />
<<<<<br />
3.2.2010 13:53:27 oracle.sysman.emcp.EMDBPostConfig invoke<br />
WARNING:<br />
************************ WARNING ************************</p>
<p>Management Repository has been placed in secure mode wherein Enterprise Manager<br />
data will be encrypted. The encryption key has been placed in the file: C:\app\<br />
oracle\product\11.1.0\db_1\10.8.0.171_orcl\sysman\config\emkey.ora. Please ens<br />
ure this file is backed up as the encrypted data will become unusable if this fi<br />
le is lost.</p>
<p>***********************************************************<br />
Enterprise Manager configuration completed successfully<br />
FINISHED EMCA at 3.2.2010 13:53:27</p>
<p>Great! Now you can try to log in: https://IP_address:5500/em</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2010/03/how-to-reinstall-enterprise-manager-database-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
