<?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 &#187; pparkko</title>
	<atom:link href="http://www.database.fi/author/pparkko/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.database.fi</link>
	<description>Database Performance &#38; Disaster Solutions</description>
	<lastBuildDate>Tue, 25 Oct 2011 07:43:08 +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>Dropping Enterprise Manager 12c repository</title>
		<link>http://www.database.fi/2011/10/dropping-enterprise-manager-12c-repository/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=dropping-enterprise-manager-12c-repository</link>
		<comments>http://www.database.fi/2011/10/dropping-enterprise-manager-12c-repository/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 07:26:39 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Enterprise Manager]]></category>
		<category><![CDATA[OEM 12c Cloud Control]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[OEM 12c CC]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=249</guid>
		<description><![CDATA[Just a real quick one, since I need to do it right away&#8230;
EM CC 12c installation blew up and need to re-create, since here are the instructions to remove an existing OEM CC (or OEM GC) repository of a failed installation using the following command:

$/sysman/admin/emdrep/bin/RepManager    -dbUser sys -dbPassword  -dbRole sysdba -reposName [...]]]></description>
			<content:encoded><![CDATA[<p>Just a real quick one, since I need to do it right away&#8230;</p>
<p>EM CC 12c installation blew up and need to re-create, since here are the instructions to remove an existing OEM CC (or OEM GC) repository of a failed installation using the following command:<br />
<code><br />
$<OMS_HOME>/sysman/admin/emdrep/bin/RepManager <repository_database_host> <repository_database_port> <repository_database_sid> -dbUser sys -dbPassword <sys password> -dbRole sysdba -reposName sysman -reposPassword
<password of sysman user> -action dropall [-mwHome <middleware home>] [-mwOraHome <Oracle Home>]<br />
</code></p>
<p>For Oracle Enterprise Manager Database Control (single instance) repository use this command:<br />
<code>emca -deconfig dbcontrol db -repos drop -cluster -SYS_PWD sys1 -SYSMAN_PWD SYS_PASSWORD<br />
</code></p>
<p>HTH,<br />
 Pasi</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2011/10/dropping-enterprise-manager-12c-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analyzing a specific time period with Oracle Statspack &#8211; DMBS_SCHEDULER</title>
		<link>http://www.database.fi/2011/10/analyzing-a-specific-time-period-with-oracle-statspack-dmbs_scheduler/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=analyzing-a-specific-time-period-with-oracle-statspack-dmbs_scheduler</link>
		<comments>http://www.database.fi/2011/10/analyzing-a-specific-time-period-with-oracle-statspack-dmbs_scheduler/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 09:45:28 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Jobs]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[Scheduler]]></category>
		<category><![CDATA[Statspack]]></category>
		<category><![CDATA[dbms_scheduler]]></category>
		<category><![CDATA[Oracle Performance Tuning]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=232</guid>
		<description><![CDATA[Hello, it&#8217;s been a while since last post. Too busy  
Here is just a small example of how to perform analysis on a specific time period. Of course with AWR it would be so simple, but if you do not have access to AWR (Standard Edition Oracle for example), you just have to make [...]]]></description>
			<content:encoded><![CDATA[<p>Hello, it&#8217;s been a while since last post. Too busy <img src='http://www.database.fi/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Here is just a small example of how to perform analysis on a specific time period. Of course with AWR it would be so simple, but if you do not have access to AWR (Standard Edition Oracle for example), you just have to make do with Statspack.</p>
<p>Let&#8217;s say that we have a problem which occurs late at night at customer site.<br />
It would be helpful to see what happens between 21 and 23 at night.</p>
<p>Of course we can just make statspack do snaps every 5 minutes and then turn it off later:<br />
<code>BEGIN<br />
	DBMS_SCHEDULER.CREATE_JOB ( job_name => 'STATSPACK_COLLECTION',<br />
		job_type => 'STORED_PROCEDURE',<br />
		job_action => 'statspack.snap',<br />
		repeat_interval => 'FREQ=MINUTELY; BYMINUTE=00,05,10,15,20,25,30,35,40,45,50,55',<br />
		enabled => TRUE,<br />
		comments => 'Statspack Collection'<br />
		);<br />
END;<br />
/</code></p>
<p>But it is way too easy to forget to turn it off and also you would allocate space from perfstat for no good reason. You&#8217;d probably end up filling up perfstat tablespace / quota.</p>
<p>The elegant way is to run snaps only for the time period you are interested in.<br />
For that, we need to add a schedule to dbms_scheduler, create a program and tie them together as a job.</p>
<p>We need to create a schedule:<br />
- Starts at 21:00<br />
- Ends at 23:00<br />
- When the schedule is active, Oracle must run statspack.snap every 5 minutes</p>
<p>Fine. How do we do that?</p>
<p>We need to create a schedule like this:</p>
<p><code>-- run every 5 minute from 21 PM to 23 PM<br />
begin<br />
dbms_scheduler.create_schedule(<br />
schedule_name  => 'INTERVAL_EVERY_5_MINUTES_2H',<br />
  start_date    => trunc(sysdate)+21/24,<br />
  repeat_interval => 'freq=MINUTELY;interval=5',<br />
  end_date	=> trunc(sysdate)+23/24,<br />
  comments     => 'Today from 21 to 23 PM, 5 minute interval');<br />
end;<br />
/<br />
</code></p>
<p>Also we need a program (Oracle scheduler term) to run statspack.snap:<br />
<code>-- Program to run statspack.snap<br />
begin<br />
dbms_scheduler.create_program<br />
(program_name=> 'STATSPACK_SNAP',<br />
 program_type=> 'STORED_PROCEDURE',<br />
 program_action=> 'statspack.snap',<br />
 enabled=>true,<br />
 comments=>'Procedure to create statspack snap.'<br />
 );<br />
end;<br />
/<br />
</code></p>
<p><code><br />
begin<br />
-- Create job which will run with the new schedule and program.<br />
dbms_scheduler.create_job<br />
 (job_name => 'STATSPACK_COLLECTION',<br />
  program_name=> 'STATSPACK_SNAP',<br />
  schedule_name=>'INTERVAL_EVERY_5_MINUTES_2H',<br />
  enabled=>true,<br />
  auto_drop=>false,<br />
  comments=>'Run statspack every 5 minutes from 21 to 23 PM today');<br />
end;<br />
/<br />
</code></p>
<p>That should do it.<br />
It will run statspack collection from 21 to 23 PM with 5 minute interval. </p>
<p>Tomorrow you&#8217;ll be able to create spreport.sql (statspack reports) from that time period and dig deeper into the problem.</p>
<p>Hope this helps,<br />
 Pasi</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2011/10/analyzing-a-specific-time-period-with-oracle-statspack-dmbs_scheduler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Expdp &amp; impdp and changing schemas with remap_schema</title>
		<link>http://www.database.fi/2011/05/using-expdp-impdp-and-changing-schemas-with-remap_schema/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-expdp-impdp-and-changing-schemas-with-remap_schema</link>
		<comments>http://www.database.fi/2011/05/using-expdp-impdp-and-changing-schemas-with-remap_schema/#comments</comments>
		<pubDate>Mon, 16 May 2011 09:00:53 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[expdp and impdp]]></category>
		<category><![CDATA[expdp]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[impdp]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[remap_schema]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=209</guid>
		<description><![CDATA[What is really great about expdp &#038; impdp is that you can export and import to new schemas very easily. That needed some work earlier with export and import.
Let&#8217;s say that I want to import into HR_NEW schema instead of HR.
We just add a remap_schema into the import command: remap_schema=HR:HR_NEW 
This will actually even create [...]]]></description>
			<content:encoded><![CDATA[<p>What is really great about expdp &#038; impdp is that you can export and import to new schemas very easily. That needed some work earlier with export and import.</p>
<p>Let&#8217;s say that I want to import into HR_NEW schema instead of HR.</p>
<p>We just add a remap_schema into the import command: remap_schema=HR:HR_NEW </p>
<p>This will actually even create the new user (schema)!</p>
<p>C:\Temp>impdp system/oracle dumpfile=hr.dmp directory=dmpdir schemas=hr logfile=<br />
hr_imp.log remap_schema=HR:HR_NEW</p>
<p>Import: Release 11.2.0.2.0 &#8211; Beta on Ma Touko 16 11:42:28 2011</p>
<p>Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.</p>
<p>Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 &#8211; Beta<br />
Master table &#8220;SYSTEM&#8221;.&#8221;SYS_IMPORT_SCHEMA_01&#8243; successfully loaded/unloaded<br />
Starting &#8220;SYSTEM&#8221;.&#8221;SYS_IMPORT_SCHEMA_01&#8243;:  system/******** dumpfile=hr.dmp direc<br />
tory=dmpdir schemas=hr logfile=hr_imp.log remap_schema=HR:HR_NEW<br />
Processing object type SCHEMA_EXPORT/USER<br />
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT<br />
Processing object type SCHEMA_EXPORT/ROLE_GRANT<br />
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE<br />
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA<br />
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA<br />
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE<br />
Processing object type SCHEMA_EXPORT/TABLE/TABLE<br />
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA<br />
. . imported &#8220;HR_NEW&#8221;.&#8221;COUNTRIES&#8221;                        6.367 KB      25 rows<br />
. . imported &#8220;HR_NEW&#8221;.&#8221;DEPARTMENTS&#8221;                      7.007 KB      27 rows<br />
. . imported &#8220;HR_NEW&#8221;.&#8221;EMPLOYEES&#8221;                        16.80 KB     107 rows<br />
. . imported &#8220;HR_NEW&#8221;.&#8221;JOB_HISTORY&#8221;                      7.054 KB      10 rows<br />
. . imported &#8220;HR_NEW&#8221;.&#8221;JOBS&#8221;                             6.992 KB      19 rows<br />
. . imported &#8220;HR_NEW&#8221;.&#8221;LOCATIONS&#8221;                        8.273 KB      23 rows<br />
. . imported &#8220;HR_NEW&#8221;.&#8221;REGIONS&#8221;                          5.476 KB       4 rows<br />
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX<br />
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT<br />
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS<br />
Processing object type SCHEMA_EXPORT/TABLE/COMMENT<br />
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE<br />
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE<br />
Processing object type SCHEMA_EXPORT/VIEW/VIEW<br />
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT<br />
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER<br />
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS<br />
Job &#8220;SYSTEM&#8221;.&#8221;SYS_IMPORT_SCHEMA_01&#8243; successfully completed at 11:42:47</p>
<p>The new user is still locked:<br />
SQL> connect hr_new/hr_new<br />
ERROR:<br />
ORA-28000: the account is locked</p>
<p>Unlock:<br />
C:\Temp>sqlplus system/oracle</p>
<p>SQL*Plus: Release 11.2.0.2.0 Beta on Ma Touko 16 11:44:30 2011</p>
<p>Copyright (c) 1982, 2010, Oracle.  All rights reserved.</p>
<p>Connected to:<br />
Oracle Database 11g Express Edition Release 11.2.0.2.0 &#8211; Beta</p>
<p>SQL> alter user hr_new account unlock;</p>
<p>User altered.</p>
<p>SQL> alter user hr_new identified by hr_new;</p>
<p>User altered.</p>
<p>SQL> connect hr_new/hr_new<br />
Connected.</p>
<p>SQL> select count(*) as amount, object_type<br />
  2  from user_objects<br />
  3  group by object_type;</p>
<p>    AMOUNT OBJECT_TYPE<br />
&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
         3 SEQUENCE<br />
         2 PROCEDURE<br />
         2 TRIGGER<br />
         7 TABLE<br />
        19 INDEX<br />
         1 VIEW</p>
<p>6 rows selected.</p>
<p>Sometimes you need to also remap_tablespaces with &#8230; remap_tablespace. What a tool!</p>
<p>That was of course possible with exp &#038; imp. But since it was not supported I remember setting quotas to 0 and changing default tablespaces to be able to import to different tablespace..</p>
<p>Hope this helps,<br />
 Pasi</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2011/05/using-expdp-impdp-and-changing-schemas-with-remap_schema/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using expdp and impdp export and import in 10g and 11g</title>
		<link>http://www.database.fi/2011/05/using-expdp-and-impdp-export-and-import-in-10g-11g/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-expdp-and-impdp-export-and-import-in-10g-11g</link>
		<comments>http://www.database.fi/2011/05/using-expdp-and-impdp-export-and-import-in-10g-11g/#comments</comments>
		<pubDate>Mon, 16 May 2011 08:49:24 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[expdp and impdp]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[expdp]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[impdp]]></category>
		<category><![CDATA[import]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=205</guid>
		<description><![CDATA[Just a quick example of expdp and impdp.
First, check that you have the OS directory like /temp or c:\temp.
Since this example was made in Windows world, we use c\temp.
Log in and create an Oracle Directory:
C:\Temp>sqlplus system/oracle
SQL*Plus: Release 11.2.0.2.0 Beta on Ma Touko 16 11:05:13 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick example of expdp and impdp.</p>
<p>First, check that you have the OS directory like /temp or c:\temp.</p>
<p>Since this example was made in Windows world, we use c\temp.</p>
<p>Log in and create an Oracle Directory:</p>
<p><code>C:\Temp>sqlplus system/oracle</p>
<p>SQL*Plus: Release 11.2.0.2.0 Beta on Ma Touko 16 11:05:13 2011</p>
<p>Copyright (c) 1982, 2010, Oracle.  All rights reserved.</p>
<p>Connected to:<br />
Oracle Database 11g Express Edition Release 11.2.0.2.0 - Beta</p>
<p>SQL> create directory dmpdir AS 'c:\temp';</p>
<p>Directory created.<br />
</code></p>
<p>You may have a suitable Oracle Directory already, you can check it from DBA_DIRECTORIES:</p>
<p><code>SQL> SELECT directory_name, directory_path FROM dba_directories ;</p>
<p>DIRECTORY_NAME<br />
------------------------------<br />
DIRECTORY_PATH<br />
-------------------------------------------------------------------</p>
<p>DMPDIR<br />
c:\temp<br />
</code></p>
<p>All right, we have what we need. </p>
<p>Let&#8217;s say that we need to export HR without knowing HR user&#8217;s password.</p>
<p>From OS level:</p>
<p><code>C:\Temp>expdp system/oracle dumpfile=hr.dmp directory=dmpdir schemas=hr logfile=<br />
hr_exp.log</p>
<p>Export: Release 11.2.0.2.0 - Beta on Ma Touko 16 11:29:37 2011</p>
<p>Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.</p>
<p>Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Beta<br />
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_02":  system/******** dumpfile=hr.dmp direc<br />
tory=dmpdir schemas=hr logfile=hr_exp.log<br />
Estimate in progress using BLOCKS method...<br />
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA<br />
Total estimation using BLOCKS method: 448 KB<br />
Processing object type SCHEMA_EXPORT/USER<br />
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT<br />
Processing object type SCHEMA_EXPORT/ROLE_GRANT<br />
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE<br />
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA<br />
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA<br />
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE<br />
Processing object type SCHEMA_EXPORT/TABLE/TABLE<br />
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX<br />
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT<br />
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS<br />
Processing object type SCHEMA_EXPORT/TABLE/COMMENT<br />
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE<br />
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE<br />
Processing object type SCHEMA_EXPORT/VIEW/VIEW<br />
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT<br />
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER<br />
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS<br />
. . exported "HR"."COUNTRIES"                            6.367 KB      25 rows<br />
. . exported "HR"."DEPARTMENTS"                          7.007 KB      27 rows<br />
. . exported "HR"."EMPLOYEES"                            16.80 KB     107 rows<br />
. . exported "HR"."JOB_HISTORY"                          7.054 KB      10 rows<br />
. . exported "HR"."JOBS"                                 6.992 KB      19 rows<br />
. . exported "HR"."LOCATIONS"                            8.273 KB      23 rows<br />
. . exported "HR"."REGIONS"                              5.476 KB       4 rows<br />
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_02" successfully loaded/unloaded<br />
******************************************************************************<br />
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_02 is:<br />
  C:\TEMP\HR.DMP<br />
Job "SYSTEM"."SYS_EXPORT_SCHEMA_02" successfully completed at 11:32:55</p>
<p>C:\Temp>dir</p>
<p>16.05.2011  11:30    <KANSIO>       .<br />
16.05.2011  11:30    <KANSIO>       ..<br />
16.05.2011  11:32           503 808 HR.DMP<br />
16.05.2011  11:32             2 395 hr_exp.log<br />
</code></p>
<p>Import is very simple.<br />
expdp / impdp is somewhat easier to use than exp/imp, since most of the times you can use the same parameters while exporting and importing.</p>
<p>Basically I changed EXPDP => IMPDP and the name of the logfile.</p>
<p>Impdp command:<br />
<code>impdp system/oracle dumpfile=hr.dmp directory=dmpdir schemas=hr logfile=hr_imp.log</code></p>
<p>What is really great about expdp &#038; impdp is that you can export and import to new schemas very easily. That needed some work earlier with export and import.</p>
<p><a href="http://www.database.fi/2011/05/using-expdp-impdp-and-changing-schemas-with-remap_schema/">I wrote another entry about that, just click here to see it. </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2011/05/using-expdp-and-impdp-export-and-import-in-10g-11g/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to check Oracle database character set?</title>
		<link>http://www.database.fi/2011/04/how-to-check-oracle-database-character-set/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-check-oracle-database-character-set</link>
		<comments>http://www.database.fi/2011/04/how-to-check-oracle-database-character-set/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 11:48:57 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[NLS]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Character set]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=158</guid>
		<description><![CDATA[Just a quick one.
If you need to check what is the running database character set&#8230; 
SELECT * FROM NLS_DATABASE_PARAMETERS;
SELECT value$ FROM sys.props$ WHERE name = &#8216;NLS_CHARACTERSET&#8217; ;
HTH,
 Pasi
]]></description>
			<content:encoded><![CDATA[<p>Just a quick one.</p>
<p>If you need to check what is the running database character set&#8230; </p>
<p>SELECT * FROM NLS_DATABASE_PARAMETERS;<br />
SELECT value$ FROM sys.props$ WHERE name = &#8216;NLS_CHARACTERSET&#8217; ;</p>
<p>HTH,<br />
 Pasi</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2011/04/how-to-check-oracle-database-character-set/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Database 11g Express Edition beta (XE) is finally here!</title>
		<link>http://www.database.fi/2011/04/oracle-database-11g-express-edition-beta-xe-is-finally-here/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=oracle-database-11g-express-edition-beta-xe-is-finally-here</link>
		<comments>http://www.database.fi/2011/04/oracle-database-11g-express-edition-beta-xe-is-finally-here/#comments</comments>
		<pubDate>Sun, 03 Apr 2011 20:25:33 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Express Edition]]></category>
		<category><![CDATA[Oracle XE]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=200</guid>
		<description><![CDATA[Apparently it came out on first of April 2011.
So far I&#8217;ve installed it on two boxes, no glitches at all.
More on this later.. Need to study it more.
SQL> select status, instance_name from v$instance;
STATUS       INSTANCE_NAME
------------ ----------------
OPEN         xe
SQL> select * from v$version;
BANNER
--------------------------------------------------------------
Oracle Database [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently it came out on first of April 2011.</p>
<p>So far I&#8217;ve installed it on two boxes, no glitches at all.</p>
<p>More on this later.. Need to study it more.<br />
<code>SQL> select status, instance_name from v$instance;</p>
<p>STATUS       INSTANCE_NAME<br />
------------ ----------------<br />
OPEN         xe</p>
<p>SQL> select * from v$version;</p>
<p>BANNER<br />
--------------------------------------------------------------</p>
<p>Oracle Database 11g Express Edition Release 11.2.0.2.0 - Beta<br />
PL/SQL Release 11.2.0.2.0 - Beta<br />
CORE    11.2.0.2.0      Production<br />
TNS for 32-bit Windows: Version 11.2.0.2.0 - Beta<br />
NLSRTL Version 11.2.0.2.0 - Production</p>
<p>SQL></code></p>
<p>BR,<br />
 Pasi</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2011/04/oracle-database-11g-express-edition-beta-xe-is-finally-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Internet Directory (OID) and Weblogic installation on Linux</title>
		<link>http://www.database.fi/2011/03/oracle-internet-directory-oid-and-weblogic-installation-on-linux/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=oracle-internet-directory-oid-and-weblogic-installation-on-linux</link>
		<comments>http://www.database.fi/2011/03/oracle-internet-directory-oid-and-weblogic-installation-on-linux/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 23:17:38 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle 11g]]></category>
		<category><![CDATA[Oracle Internet Directory]]></category>
		<category><![CDATA[Weblogic]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[OID]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=181</guid>
		<description><![CDATA[I was just recently asked to diagnose and re-install Oracle Internet Directory and I thought it might be a good idea to document the installation steps &#8211; so here goes.
We will use the latest versions available at the time of writing this (22th March 2011).
Installation manual:
http://download.oracle.com/docs/cd/E17904_01/install.1111/e12002/instps2001.htm
Basic steps:
1. Install Oracle
2. Install OID (and FMW control and [...]]]></description>
			<content:encoded><![CDATA[<p>I was just recently asked to diagnose and re-install Oracle Internet Directory and I thought it might be a good idea to document the installation steps &#8211; so here goes.</p>
<p>We will use the latest versions available at the time of writing this (22th March 2011).</p>
<p>Installation manual:</p>
<p>http://download.oracle.com/docs/cd/E17904_01/install.1111/e12002/instps2001.htm</p>
<p>Basic steps:<br />
1. Install Oracle<br />
2. Install OID (and FMW control and ODSM)</p>
<p>Oracle installation is quite trivial, so let&#8217;s focus on the OID installation.<br />
- Just remember to use the AL32UTF8 character set on the database!</p>
<p>You need to download:<br />
- Oracle WebLogic Server 10.3.4.<br />
- Oracle Identity Management 11.1.1.2.0 &#038; 11.1.1.3.0</p>
<p>Actual installation: </p>
<p>1. Install WLS 10.3.4<br />
- Run the installation .bin<br />
 * In 64 bit environments use: JAVA_HOME/bin/java -jar wls1034_generic.jar<br />
 * You need JDK 1.6 or later<br />
- Create a new FMW home<br />
- Register for security updates..<br />
- Typical or Custom<br />
- Change or accept the installation directories (df -h &#8230;)<br />
- Summary => Next<br />
- Installation&#8230;</p>
<p>2. Install OID 11.1.1.2.0<br />
- unzip ../ofm_idm_linux_11.1.1.2.0_32_disk1_1of1.zip &#8230;<br />
- ./runInstaller<br />
- Install Software &#8211; DO NOT CONFIGURE!<br />
- Use SAME MIDDLEWARE HOME as WLS above!<br />
- Oracle Home Directory: This will be the directory name under Middleware Home<br />
- Installation &#8230;<br />
- Run root script: /middleware_home_directory/oracle_home_dir/oracleRoot.sh<br />
- Save Summary.</p>
<p>3. Install OID 11.1.1.3.0 Patch Set<br />
- unzip ../ofm_idm_linux_11.1.1.3.0_32_disk1_1of1.zip &#8230;<br />
- ./runInstaller<br />
- Install Software<br />
- Use same homes !<br />
- Next, next<br />
- Root script<br />
- Save Summary</p>
<p>OID Configuration with FMW Control and ODSM:</p>
<p>1. Configuration</p>
<p>/middleware_home_directory/oracle_home_dir/bin/config.sh<br />
- Installer starts<br />
- Create new domain<br />
 => FMW Control is being configured to manage OID here<br />
 * User Name: WLS Admin user details<br />
 * Domain name<br />
- Installation location<br />
 * Weblogic Server Directory<br />
 * Oracle Instance location, new &#8220;ASInstance&#8221; (Not actual Oracle Instance)<br />
 * Oracle Instance Name, new &#8220;ASInstance&#8221; (Not actual Oracle Instance)<br />
- De-select others than Oracle Internet Directory<br />
 => We will configure only that<br />
- Auto configuration ports normally OK, you can select them if you want<br />
- Create Schema<br />
 * Create ODS Database Schema<br />
 * Connect string, for example: myserver:1521:orcl<br />
 * SYS<br />
 * Sys_password<br />
- OID Passwords<br />
 * ODS Schema password &#038; confirm  (all directory content)<br />
 * ODSSM Schema password &#038; confirm (OID statistics and DIP schema)<br />
- OID information<br />
 * Realm, for example: dc=us,dc=oracle,dc=com<br />
 * Admin user: orcladmin<br />
 * Admin password: &#8230;<br />
- Install<br />
- Save Summary<br />
 * Note: Weblogic Console ie: http://myhost.us.oracle.com:7001/console</p>
<p>Verify installation:<br />
- &#8230;home/bin/opmnctl status -l<br />
- Alive:<br />
 * OVD<br />
 * oidldapd<br />
 * oidldapd<br />
 * oidmon => LDAP port, LDAPS port<br />
 * EMAGENT<br />
- ldapsearch -p LDAP_port -b &#8220;&#8221; -s base &#8220;objectclass=*&#8221; orcldirectoryversion<br />
=> orcldirectoryversion=OID 11.1.1.3.0</p>
<p>Open Enterprise Manager Fusion Middleware Control 11g<br />
 * For example:  http://myhost.us.oracle.com:7001/em<br />
- Find oid1 in FMW Control<br />
- Verify version number in FMW Control</p>
<p>Open Oracle Directory Services Manager<br />
 * For example: http://myhost.us.oracle.com:7005/odsm<br />
- Connect to a directory<br />
 * OID &#8211; directory name<br />
 * User Name: cn=orcladmin<br />
 * password<br />
- Verify OID version</p>
<p>After you&#8217;re done installing and configuring the OID itself, you can proceed to netca to configure the destination databases &#8220;tnsnames.ora&#8221;.<br />
That will update sqlnet.ora and ldap.ora</p>
<p>Examples<br />
LDAP.ORA:<br />
DEFAULT_ADMIN_CONTEXT = “ou=ora,dc=company,dc=com”<br />
DIRECTORY_SERVERS = (ldap1.company.com:389, ldap2.company.com:389)<br />
DIRECTORY_SERVER_TYPE = OID</p>
<p>Oracle can &#8220;officially&#8221; only use OID or AD as LDAP servers.<br />
The type can be OID or AD. The multiple servers are for redundancy; it will not try each one in turn. Then in SQLNET.ORA:</p>
<p>NAMES.DIRECTORY_PATH=(LDAP, TNSNAMES)</p>
<p>The means try LDAP first, then try TNSNAMES.ORA, then give up.</p>
<p>If you want to use a third-party LDAP server, Oracle has a product called Virtual Directory that will act as a proxy between them.</p>
<p>Note:<br />
- OID is a standalone system component (no run time dependency on WLS)<br />
- FMW Control and ODSM are J2EE apps running in WLS. These components are used for managing OID via GUI interface.</p>
<p>Links section</p>
<p>Complete tutorial:</p>
<p>http://www.oracle.com/technetwork/middleware/id-mgmt/overview/ods11g-use-cases-084303.html</p>
<p>http://download.oracle.com/otndocs/products/oid/11113-oid-fresh-installation/11113oidfreshinstallation_viewlet_swf.html</p>
<p>http://www.oracle.com/technetwork/middleware/id-mgmt/overview/oracleauthenticationservices-100184.html</p>
<p>Concepts:</p>
<p>http://onlineappsdba.com/index.php/2009/07/28/oracle-fusion-middleware-11g-concepts-for-apps-dbas/</p>
<p>Download:</p>
<p>http://www.oracle.com/technetwork/middleware/downloads/fmw-11-download-092893.html</p>
<p>http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html</p>
<p>http://download.oracle.com/otndocs/products/oid/11113-oid-fresh-installation/11113oidfreshinstallation_viewlet_swf.html</p>
<p>http://www.oracle.com/technetwork/testcontent/index-092280.html</p>
<p>LDAP configuration:</p>
<p>http://serverfault.com/questions/192359/oracle-replacing-tnsnames-ora-with-ldap-lookup</p>
<p>http://laurentschneider.com/wordpress/2006/10/migration-of-tnsnamesora-to-ldap-sun-java-system-directory-server.html</p>
<p>Tnsnames.ora information from OpenLDAP:</p>
<p>http://oracle-cookies.blogspot.com/2007/01/get-tnsnamesora-from-openldap.html</p>
<p>Orafaq:</p>
<p>http://www.orafaq.com/wiki/Oracle_Internet_Directory</p>
<p>OID basics:</p>
<p>http://onlineappsdba.com/index.php/2006/12/04/oracle-internet-directory-oid/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2011/03/oracle-internet-directory-oid-and-weblogic-installation-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create user and grant basic rights in MySQL</title>
		<link>http://www.database.fi/2011/02/create-user-and-grant-basic-rights-in-mysql/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=create-user-and-grant-basic-rights-in-mysql</link>
		<comments>http://www.database.fi/2011/02/create-user-and-grant-basic-rights-in-mysql/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 22:04:38 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[create database]]></category>
		<category><![CDATA[create mysql database]]></category>
		<category><![CDATA[create user]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=161</guid>
		<description><![CDATA[Just a quick one.
Sometimes you would like to try out new software and need to create a frest environment for it.  Just add a new database, user and some rights to MySQL and you have all you need: 
&#8211; The Database:
CREATE DATABASE newsoftware;
&#8211; User:
CREATE USER &#8216;user1&#8242;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;pass1&#8242;;
&#8211; Too much right for the [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick one.</p>
<p>Sometimes you would like to try out new software and need to create a frest environment for it.  Just add a new database, user and some rights to MySQL and you have all you need: </p>
<p>&#8211; The Database:<br />
CREATE DATABASE newsoftware;</p>
<p>&#8211; User:<br />
CREATE USER &#8216;user1&#8242;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;pass1&#8242;;</p>
<p>&#8211; Too much right for the user:<br />
GRANT ALL ON newsoftware.* TO &#8216;user1&#8242;@&#8217;localhost&#8217;;</p>
<p>That&#8217;s it, now you can try the software. If it is <del>crap</del> not good, just remove user and drop database.. <img src='http://www.database.fi/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2011/02/create-user-and-grant-basic-rights-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing or Upgrading Oracle APEX</title>
		<link>http://www.database.fi/2011/01/installing-or-upgrading-oracle-apex/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=installing-or-upgrading-oracle-apex</link>
		<comments>http://www.database.fi/2011/01/installing-or-upgrading-oracle-apex/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 18:51:39 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Apex]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=120</guid>
		<description><![CDATA[HTML DB did not impress me much (huh?) &#8211; but I have to say I am pretty impressed with Oracle Apex.
It is one of the quickest ways to make db-aware web solutions. That combined with the fact that is uses Oracle is just great. 
Well, anyway &#8211; I was asked to upgrade the APEX to [...]]]></description>
			<content:encoded><![CDATA[<p>HTML DB did not impress me much (huh?) &#8211; but I have to say I am pretty impressed with Oracle Apex.</p>
<p>It is one of the quickest ways to make db-aware web solutions. That combined with the fact that is uses Oracle is just great. </p>
<p>Well, anyway &#8211; I was asked to upgrade the APEX to the latest version (4.02 while writing this).<br />
Here is a quick guide:<br />
1. Download apex installation package<br />
2. Unzip it somewhere like c:\oraclexe\apex or /var/oraclexe/apex<br />
3. Open shell or cmd and CD there, &#8220;sqlplus / as sysdba&#8221; from that directory<br />
4. @apexins SYSAUX SYSAUX TEMP /i/<br />
5. ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;<br />
5.1. ALTER USER APEX_PUBLIC_USER IDENTIFIED BY new_password</p>
<p>If your images are not displayed correctly, you may need to run also:<br />
@apxldimg c:\oraclexe\</p>
<p>In order to change the admin account password, run: @apxxepwd.sql</p>
<p>BR,<br />
 Pasi</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2011/01/installing-or-upgrading-oracle-apex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VirtualBox &#8211; Cloning a disk image in VirtualBox</title>
		<link>http://www.database.fi/2010/11/virtualbox-cloning-a-disk-image-in-virtualbox/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=virtualbox-cloning-a-disk-image-in-virtualbox</link>
		<comments>http://www.database.fi/2010/11/virtualbox-cloning-a-disk-image-in-virtualbox/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 08:06:58 +0000</pubDate>
		<dc:creator>pparkko</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[Clone]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[UUID]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://www.database.fi/?p=105</guid>
		<description><![CDATA[While preparing for a course I ran into a problem with cloning VirtualBox disk images&#8230; 
So you have a VirtualBox disk image and need to set up similar machine. 
When you need to clone a VirtualBox disk image, you cannot just copy &#038; clone the file. If you try, you just get an error message [...]]]></description>
			<content:encoded><![CDATA[<p>While preparing for a course I ran into a problem with cloning VirtualBox disk images&#8230; </p>
<p>So you have a VirtualBox disk image and need to set up similar machine. </p>
<p>When you need to clone a VirtualBox disk image, you cannot just copy &#038; clone the file. If you try, you just get an error message saying for example:</p>
<p><code>ERROR: Cannot register the hard disk 'G:\Virtual_Machines\VirtualBox\Virtual_Machine\XP_Pro\Firefox\firefox.vdi' with UUID {fa9b7cd6-a1c5-4f2a-b4e5-84e64919bb36} because a hard disk 'G:\Virtual_Machines\VirtualBox\Virtual_Machine\XP_Pro\Firefox\firefox.vdi' with UUID {fa9b7cd6-a1c5-4f2a-b4e5-84e64919bb36} already exists in the media registry ('C:\Users\Baka/.VirtualBox\VirtualBox.xml')<br />
Details: code E_INVALIDARG (0x80070057), component VirtualBox, interface IVirtualBox, callee IUnknown<br />
Context: "OpenHardDisk(Bstr(szFilenameAbs), AccessMode_ReadWrite, false, Bstr(""), false, Bstr(""), srcDisk.asOutParam())" at line 633 of file VBoxManageDisk.cpp<br />
</code></p>
<p>It means that the UUID of the hard drive is already used in the system. </p>
<p>The solution is that you need to change the UUID of the disk before you can use it as a new virtual machine.</p>
<p><code>VBoxManage internalcommands setvdiuuid disk_image.vdi</p>
<p>Oracle VM VirtualBox Command Line Management Interface Version 3.2.10<br />
(C) 2005-2010 Oracle Corporation<br />
All rights reserved.</p>
<p>UUID changed to: 8e8c1d07-15a4-467a-92e5-e11b328f9210<br />
</code><br />
Voilá!</p>
<p>Now you can add the disk since the UUID is changed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.database.fi/2010/11/virtualbox-cloning-a-disk-image-in-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

