Loading...

Follow Oracle FAQ blogs on Feedspot

Continue with Google
Continue with Facebook
or

Valid
articles: 

Tablespace Capacity Planning Report
Author JP Vijaykumar
Written Sep 14 2017
Modified Mar 08 2019
***************************************************************************************************************
This script is provided for enducational purpose only.
The readers are advised to make necessary changes to the script as may be required for their use in their repective environments.
Pls test this script thoroughly in a lower environment, before using in any production db.

This script was generated/tested in Oracle 11G environment.
This script may not work in other versions of Oracle, pls modify the script as may be needed using your own discretion/ingenuity.
***************************************************************************************************************

I need to run capacity planning report in my project.

Requirements:

Predict db growth for 3 months, 6 months and one year.
Display message, if the available free space in each tablespace is less than it's projected growth for the next 3 months period.

Issues:

You need to increase the snapshot retention in the db to 3 months(conservative period).
If the snapshot retention is too low, the predictions may have huge variation on the expected actual growth of db.
If the available data in the dba_hist_tbsp_space_usage is scanty, the projections may not be near accurate.
If for some reason, the snapshots generation stopped, this report may not work as expected.

Usage:

Pl run this report in a lower environment and make necessary changes as applicable in your case.
This script work for Oracle rdbms, and was tested in version 11G.
If this script is to be used in a different version of Oracle rdbms, pls make necessary modifications to run.
As per your convenience/requirement, the flagged message "ADD SPACE" can be changed to display a meaningful message.

Owing to many limitations, there will be a fair chance of variation in the projected growth of the db and the actual growth of the db.
And yet, I will have a starting point as to how much diskspace, upfront I need to be procured for my db's future growth.
Few deviations this way that way are ok, as I may not be caught off the guard with sudden huge diskspace requirements.

connect veeksha/Saketh

set linesize 200 pagesize 100 colsep "," echo off feedback off timing off
column tablespace_name format a20
column avg_growth_per_day_gb format 9999.99 heading "AVG GROWTH|PER DAY GB"
column projected_growth_for_3mths_gb format 9999.99 heading "PROJECTED|GROWTH|FOR 3 MONTHS|GB"
column projected_growth_for_6mths_gb format 9999.99 heading "PROJECTED|GROWTH|FOR 6 MONTHS|GB"
column projected_growth_for_1yr_gb format 9999.99 heading "PROJECTED|GROWTH|FOR ONE YEAR|GB"
column msg format a15 heading "ACTION|TO BE TAKEN"
with t1 as (
select ss.run_time,ts.name,round(su.tablespace_size*dt.block_size/1024/1024/1024,2) alloc_size_gb,
round(su.tablespace_usedsize*dt.block_size/1024/1024/1024,2) used_size_gb
from
dba_hist_tbspc_space_usage su,
(select trunc(BEGIN_INTERVAL_TIME) run_time,max(snap_id) snap_id from dba_hist_snapshot
group by trunc(BEGIN_INTERVAL_TIME) ) ss,
v$tablespace ts,
dba_tablespaces dt
where su.snap_id = ss.snap_id
and su.tablespace_id = ts.ts#
and ts.name NOT LIKE '%TEMP%'
and ts.name NOT LIKE '%UNDO%'
and ts.name = dt.tablespace_name order by 2,1),
t2 as (
select e.run_time,e.name,e.used_size_gb,e.used_size_gb - b.used_size_gb growth
from t1 e, t1 b
where e.name = b.name and e.run_time = b.run_time +1),
t3 as (
select --fre.tablespace_name, fre.alloc,fre.used,
tsz.name,
tsz.alloc_size_gb,tsz.used_size_gb,ave.avg_growth_per_day_gb,ave.avg_growth_per_day_gb*90 projected_growth_for_3mths_gb
from
(select name,max(alloc_size_gb) alloc_size_gb, max(used_size_gb) used_size_gb from t1 group by name) tsz,
(select name,round(avg(growth),2) avg_growth_per_day_gb from t2 group by name) ave
where tsz.name = ave.name)
select t4.tablespace_name,t4.alloc alloc_sz_gb,t4.used used_sz_gb,
--t3.alloc_size_gb,t3.used_size_gb,
t3.avg_growth_per_day_gb,t3.projected_growth_for_3mths_gb,t4.free free_sz_gb,
case when t4.free projected_growth_for_3mths_gb*2 projected_growth_for_6mths_gb , projected_growth_for_3mths_gb*4 projected_growth_for_1yr_gb
from t3,
(select a.tablespace_name,
round(a.bytes/1024/1024/1024,2) alloc,
round(b.bytes/1024/1024/1024,2) used,
round(c.bytes/1024/1024/1024,2) free
from sys.sm$ts_avail a,
sys.sm$ts_used b,
sys.sm$ts_free c
where a.tablespace_name = b.tablespace_name(+)
and a.tablespace_name = c.tablespace_name(+)) t4
where t4.tablespace_name = t3.name(+)
order by 1;

Happy Scripting.

References:
http://www.toadworld.com/platforms/oracle/w/wiki/10837.tablespace-growth-report.aspx
http://www.databasejournal.com/features/oracle/article.php/3673616

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
Oracle FAQ blogs by Jp_vijaykumar - 2M ago
articles: 

********************************************************************************
APRIORI ALGORITHM
********************************************************************************
Modified March 08 2019

********************************************************************************
This script is for educational purpose only.
I created the table in Oracle 12C DB, used sql and pl/sql to find the frequent patterns.
This script works well with smaller datasets.
When dealing with large/voluminous datasets(GB of data), a different approach is to be implemented,
to handle voluminous data efficiently.

When handling data from different sources/formats, the script need to be
modified accordingly to handle data as may be necessary.
Readers discretion/ingenuity is advised, in making necessary changes/modifications as may be required for thier specific use.
********************************************************************************
"An idle man's brain is a devil's workshop".
Why can't I convert my idle brain into a data mining workshop.

My endeavour is to explore data mining algorithms in sql & pl/sql.
I am not running Oracle's datamining tool.
I generated these scripts on Oracle 11G.

My passion is for complex number crunching algorithms using shell or pl/sql or python languages.

export ORACLE_SID=orcl
export ORACLE_HOME=c:/app/oracle/product/12.2.0/dbhome_1
$ORACLE_HOME/bin/sqlplus " / as sysdba"
alter session set container=orclpdb;
--------------------------------------------------------------------------------

connect veeksha/saketh

drop table apriori;
create table apriori(items varchar2(50));
truncate table apriori;
insert into apriori values('apples,chacolates,donuts');
insert into apriori values('bananas,chacolates,eggs');
insert into apriori values('apples,bananas,chacolates,eggs');
insert into apriori values('bananas,eggs');
commit;

select items from apriori;

ITEMS
--------------------------------------------------------------------------------
apples,chacolates,donuts
bananas,chacolates,eggs
apples,bananas,chacolates,eggs
bananas,eggs

Based on the table apriori, I created a view as follows:

create or replace view apriori_vw as
select distinct trim(name) name from (
select
regexp_substr(items,'[^,]+', 1, level) as name,
rownum as nth
from apriori
connect by regexp_substr(items, '[^,]+', 1, level) is not null) order by 1;

--IMPLEMENTATION USING NESTED LOOPS
--------------------------------------------------------------------------------
Modified March 08 2019

set serverout on size 1000000 timing on
declare
v_sup number:=2; --MINIMUM SUPPORT FOR IMPLEMENTING APRIORI ALGORITHM
v_cnt varchar2(200);
v_num number;
v_str varchar2(2000);
begin
dbms_output.put_line('NUM_OCCURANCES NUM_ITEMS ITEMS');
for c1 in (select name from apriori_vw order by name) loop
begin
v_cnt:=c1.name;
v_str:='select nvl(count(*),0) from apriori where items like '''||'%'||c1.name||'%'||''' ';
execute immediate v_str into v_num;
if (v_num >= v_sup) then
dbms_output.put_line(rpad(v_num,14)||' '||rpad((regexp_count(v_cnt,',')+1),10)||' '||v_cnt);
for c2 in (select name from apriori_vw where name>c1.name order by 1) loop
begin
execute immediate v_str||' and items like '''||'%'||c2.name||'%'||''' ' into v_num;
if (v_num >= v_sup) then
v_str:=v_str||' and items like '''||'%'||c2.name||'%'||''' ';
v_cnt:=v_cnt||','||c2.name;
dbms_output.put_line(rpad(v_num,14)||' '||rpad((regexp_count(v_cnt,',')+1),10)||' '||v_cnt);
end if;
execute immediate 'select nvl(count(*),0) from apriori where items like '''||'%'||c1.name||'%'||
''' and items like '''||'%'||c2.name||'%'||''' ' into v_num;
if (v_num >= v_sup and c1.name||','||c2.name v_cnt) then
dbms_output.put_line(rpad(v_num,14)||' '||rpad(2,10)||' '||c1.name||','||c2.name);
--null;
end if;
exception
when others then
null;
end;
end loop;
end if;
exception
when others then
null;
end;
end loop;
end;
/
NUM_OCCURANCES NUM_ITEMS ITEMS
2 1 apples
2 2 apples,chacolates
3 1 bananas
2 2 bananas,chacolates
2 3 bananas,chacolates,eggs
3 2 bananas,eggs
3 1 chacolates
2 2 chacolates,eggs
3 1 eggs

PL/SQL procedure successfully completed.

--IMPLEMENTATION USING CONDITIONAL LOGIC
--------------------------------------------------------------------------------
Modified March 08 2019

connect veeksha/saketh

set serverout on size 1000000 timing on
declare
v_min varchar2(20);
v_max varchar2(20);
v_wrd varchar2(20);
v_cnt varchar2(2000);
--select items from apriori;
v_sup number:=2; --MINIMUM SUPPORT FOR IMPLEMENTING APRIORI ALGORITHM
v_num number;
v_trn number;
v_str varchar2(2000);
begin
dbms_output.put_line('NUM_OCCURANCES NUM_ITEMS ITEMS');
execute immediate 'select max(name) from apriori_vw' into v_max;
execute immediate 'select count(*) from apriori' into v_trn;
for c1 in (select name from apriori_vw order by name) loop
v_wrd:=c1.name;
v_str:='select nvl(count(*),0) from apriori where items like '''||'%'||c1.name||'%'||''' ';
execute immediate v_str into v_num;
if (v_num>=v_sup) then
v_cnt:=c1.name;
dbms_output.put_line(rpad(v_num,14)||' '||rpad((regexp_count(v_cnt,',')+1),10)||' '||v_cnt);

execute immediate 'select nvl(min(name),'''||'zzz'||''') from apriori_vw where name>'''||v_wrd||''' ' into v_min;
if (v_min'zzz') then
v_wrd:=v_min;
execute immediate v_str||' and items like '''||'%'||v_min||'%'||''' ' into v_num;
if (v_num>=v_sup) then
v_cnt:=v_cnt||','||v_min;

v_str:=v_str||' and items like '''||'%'||v_min||'%'||''' ';
dbms_output.put_line(rpad(v_num,14)||' '||rpad((regexp_count(v_cnt,',')+1),10)||' '||v_cnt);
end if;
execute immediate 'select nvl(count(*),0) from apriori where items like '''||'%'||c1.name||'%'||
''' and items like '''||'%'||v_wrd||'%'||''' ' into v_num;
if (v_num>=v_sup and v_cntc1.name||','||v_wrd) then
dbms_output.put_line(rpad(v_num,14)||' '||rpad(2,10)||' '||c1.name||','||v_wrd);
end if;
goto BEGIN_LOOP;
end if;
end if;
end loop;
end;
/
NUM_OCCURANCES NUM_ITEMS ITEMS
2 1 apples
2 2 apples,chacolates
3 1 bananas
2 2 bananas,chacolates
2 3 bananas,chacolates,eggs
3 2 bananas,eggs
3 1 chacolates
2 2 chacolates,eggs
3 1 eggs

PL/SQL procedure successfully completed.

There are few other methods to produce the required pattern results, the cusious readers may explore.

Happy scripting.

REFERENCES:
https://www.codeproject.com/Articles/70371/Apriori-Algorithm
http://www.vldb.org/conf/2004/DEMP2.PDF --COMPUTING FREQUENT DATA SETS IN ORACLE
https://community.oracle.com/thread/2131403?start=0&tstart=0 --Converting delimited string into table columns
https://www.oracle.com/technetwork/database/enterprise-edition/odm-techniques-algorithms-097163.html
https://www.oracle.com/technetwork/database/options/advanced-analytics/odm/overview/index.html

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
articles: 

********************************************************************************
--LINEAR REGRESSION ALGORITHM IN PL/SQL
--------------------------------------------------------------------------------
Modified Mar 8th 2019
Using Linear Regression algorithm, find the weight of a studen, whose is 71 inches tall.
Given the height and weight of 8 students.

This script is for educational purpose only.
Pls make necessary changes to the script, as may be required in your environment.
I generated this script and tested it in Oracle 12C.

set serverout on size 1000000 timing on
DECLARE
type tallarray IS VARRAY(8) OF float;
type heavyarray IS VARRAY(8) OF float;
height tallarray;
weight heavyarray;
total float;
xy float:=0;
sx float:=0;
sy float:=0;
x2 float:=0;
b1 float;
b0 float;
BEGIN
height := tallarray(65,65,62,67,69,65,61,67);
weight := heavyarray(105,125,110,120,140,135,95,130);
total := height.count;
FOR i in 1 .. total LOOP
xy:=xy + round((height(i)*weight(i)),2);
sx:=sx + height(i);
sy:=sy + weight(i);
x2:=x2 + height(i)**2;
END LOOP;
b1:=round((xy - ((sx * sy)/total))/(x2 - (sx**2/total)),2);
b0:=round((sy - (b1*sx))/total,2);
dbms_output.put_line(sx||' '||sy||' '||x2||' '||xy||' '||b0||' '||b1||' '||(b0 + b1*71));
END;
/
521 960 33979 62750 -186.74 4.71 147.67

PL/SQL procedure successfully completed

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
articles: 

--NAIVE BAYES ALGORITHM WITH SQL & PL/SQL
---------------------------------------------------------------------------------
--Written JP Vijaykumar
--Date Jan 4th 2019

--This script is provided for educational purpose only.
--The readers are advised to make necessary changes as may be required for their use.

--I love data mining algorithms for their complexity and number crunching toughest logic.
--Academically, I want to generate Naive Bayes algorythm in pl/sql to predict the outcome.

-------------------------------------------------------
OUTLOOK | TEMPERATURE | HUMIDITY | WIND | PLAY_BALL |
-------------------------------------------------------
Rain | Cool | High | Strong | ? |
-------------------------------------------------------

--For these scripts, I used a 12c oracle on windows platform.
--I used gitbash console to access my 12c oracle database.

export ORACLE_SID=orcl
export ORACLE_HOME=c:/app/oracle/product/12.2.0/dbhome_1

$ORACLE_HOME/bin/sqlplus veeksha/saketh

alter session set container=orclpdb;
alter database orclpdb open;

create or replace directory dp_dir as 'c:/jpscripts';

drop table xtern_decision_jp;
create table xtern_decision_jp (
outlook varchar2(10),
temperature varchar2(10),
humidity varchar2(10),
wind varchar2(10),
play_ball varchar2(10))
organization external
( default directory dp_dir
access parameters
( records delimited by newline
fields terminated by '|'
)
location ('decisiontree_data.txt')
);

--From the training dataset, I will predict the outcome for the above test data.

select * from xtern_decision_jp;

OUTLOOK TEMPERATUR HUMIDITY WIND PLAY_BALL
---------- ---------- ---------- ---------- ----------
Sunny Hot High Weak No
Sunny Hot High Strong No
Overcast Hot High Weak Yes
Rain Mild High Weak Yes
Rain Cool Normal Weak Yes
Rain Cool Normal Strong No
Overcast Cool Normal Strong Yes
Sunny Mild High Weak No
Sunny Cool Normal Weak Yes
Rain Mild Normal Weak Yes
Sunny Mild Normal Strong Yes
Overcast Mild High Strong Yes
Overcast Hot Normal Weak Yes
Rain Mild High Strong No

14 rows selected.

with cnt as
(select count(*) val from xtern_decision_jp),
--YES VALUES CALCULATION
yp as
(select count(*) val from xtern_decision_jp where play_ball='Yes'),
yop as
(select count(*) val from xtern_decision_jp where outlook='Rain' and play_ball='Yes'),
ytp as
(select count(*) val from xtern_decision_jp where temperature='Cool' and play_ball='Yes'),
yhp as
(select count(*) val from xtern_decision_jp where humidity='High' and play_ball='Yes'),
ywp as
(select count(*) val from xtern_decision_jp where wind='Strong' and play_ball='Yes'),
y as
(select (yop.val/yp.val)*(ytp.val/yp.val)*(yhp.val/yp.val)*(ywp.val/yp.val)*
(yp.val/cnt.val) val from cnt,yp,yop,ytp,yhp,ywp),
--NO VALUES CALCULATION
np as
(select count(*) val from xtern_decision_jp where play_ball='No'),
nop as
(select count(*) val from xtern_decision_jp where outlook='Rain' and play_ball='No'),
ntp as
(select count(*) val from xtern_decision_jp where temperature='Cool' and play_ball='No'),
nhp as
(select count(*) val from xtern_decision_jp where humidity='High' and play_ball='No'),
nwp as
(select count(*) val from xtern_decision_jp where wind='Strong' and play_ball='No'),
n as
(select (nop.val/np.val)*(ntp.val/np.val)*(nhp.val/np.val)*(nwp.val/np.val)*
(np.val/cnt.val) val from cnt,np,nop,ntp,nhp,nwp)
select round(y.val/(y.val + n.val),6) yval, round(n.val/(y.val + n.val),6) nval from y,n;

YVAL NVAL
---------- ----------
.366569 .633431

set serverout on size 1000000 timing on
declare
v_table varchar2(30):='XTERN_DECISION_JP';
v_clsfr varchar2(30):='PLAY_BALL'; v_rslt1 varchar2(3) :='Yes'; v_rslt2 varchar2(3):='No';
v_colm1 varchar2(30):='OUTLOOK'; v_clvl1 varchar2(30):='Rain';
v_colm2 varchar2(30):='TEMPERATURE'; v_clvl2 varchar2(30):='Cool';
v_colm3 varchar2(30):='HUMIDITY'; v_clvl3 varchar2(30):='High';
v_colm4 varchar2(30):='WIND'; v_clvl4 varchar2(30):='Strong';
v_reslt varchar2(30):='';
v_ysval number(10,6);
v_noval number(10,6);
begin
/*
execute immediate 'select outlook,temperature,humidity,wind,play_ball from (select rownum rnum, a.* from (select * from xtern_decision_jp) a) b where rnum =(select count(*) from xtern_decision_jp)'
into v_clvl1,v_clvl2,v_clvl3,v_clvl4,v_reslt;
*/
execute immediate
'with
t as
(select * from '||v_table||'), -- where rownum cnt as
(select count(*) val from t),
yp as
(select count(*) val from t where '||v_clsfr||'='''||v_rslt1||'''),
yop as
(select count(*) val from t where '||v_colm1||'='''||v_clvl1||''' and '||v_clsfr||'='''||v_rslt1||'''),
ytp as
(select count(*) val from t where '||v_colm2||'='''||v_clvl2||''' and '||v_clsfr||'='''||v_rslt1||'''),
yhp as
(select count(*) val from t where '||v_colm3||'='''||v_clvl3||''' and '||v_clsfr||'='''||v_rslt1||'''),
ywp as
(select count(*) val from t where '||v_colm4||'='''||v_clvl4||''' and '||v_clsfr||'='''||v_rslt1||'''),
y as
(select (yop.val/yp.val)*(ytp.val/yp.val)*(yhp.val/yp.val)*(ywp.val/yp.val)*
(yp.val/cnt.val) val from cnt,yp,yop,ytp,yhp,ywp),
np as
(select count(*) val from t where '||v_clsfr||'='''||v_rslt2||'''),
nop as
(select count(*) val from t where '||v_colm1||'='''||v_clvl1||''' and '||v_clsfr||'='''||v_rslt2||'''),
ntp as
(select count(*) val from t where '||v_colm2||'='''||v_clvl2||''' and '||v_clsfr||'='''||v_rslt2||'''),
nhp as
(select count(*) val from t where '||v_colm3||'='''||v_clvl3||''' and '||v_clsfr||'='''||v_rslt2||'''),
nwp as
(select count(*) val from t where '||v_colm4||'='''||v_clvl4||''' and '||v_clsfr||'='''||v_rslt2||'''),
n as
(select (nop.val/np.val)*(ntp.val/np.val)*(nhp.val/np.val)*(nwp.val/np.val)*
(np.val/cnt.val) val from cnt,np,nop,ntp,nhp,nwp)
select y.val/(y.val + n.val) , n.val/(y.val + n.val) from y,n' into v_ysval,v_noval;
dbms_output.put_line(v_clvl1||' '||v_clvl2||' '||v_clvl3||' '||v_clvl4||' '||v_reslt);
dbms_output.put_line('Yes: '||v_ysval||' No: '||v_noval);
exception
when others then
dbms_output.put_line(sqlerrm);
end;
/
Rain Cool High Strong
Yes: .366569 No: .633431

PL/SQL procedure successfully completed.

--USING NAIVE BAYES THEOREM IN PYTHON, VERIFIED THE RESULTS
No 0.6272
Yes 0.363

In both the above methods, the answer arrived at using Naive Bayes algorithm is a "NO".
Happy Scripting.

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
articles: 

We are happy to bring our sincere congratulations with upcoming Christmas and New Year holidays! It’s time for miracles and gifts, so try yourself at Devart’s Christmas Quest to get winter holiday discounts.

Help Santa to count a salary for his Elves so that they deliver other presents. With this purpose, Santa uses SQL query, but he is not so good in SQL. Please, help him to build the proper query! Santa Claus is about to pay generously to everyone who helps him!

Learn more about Devart’s Christmas Quest at https://www.devart.com/christmas-quest/

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
articles: 

Devart has released a brand new dbForge Documenter for Oracle 1.0, a tool for smart and easy documenting of Oracle databases, that automatically generates documentation for multiple Oracle databases in the HTML, PDF, and MARKDOWN file formats.

Devart, a Czech software vendor of database tools and data connectivity solutions, has rolled out a brand new tool for seamless documenting of Oracle databases, - dbForge Documenter for Oracle v1.0. Documenter automatically generates documentation for multiple Oracle databases in the HTML, PDF, and MARKDOWN file formats. What’s more, the tool offers robust customization for the generated documentation.

Here’s the scoop on the most significant features implemented in dbForge Documenter for Oracle:

1) Detailed and streamlined database structure
Documenter for Oracle allows extracting a comprehensive database information about all Oracle objects, their details, properties, SQL scripts, inter-object dependencies and present them as an accurate navigation tree.

2) Versatile customization to fulfill individual needs
Using dbForge Documenter for Oracle, users can select which database objects and properties to include in the documentation. Moreover, the tool allows choosing between different style templates or apply their own themes to get a striking layout.

3) Multiple file formats
Documenter for Oracle can generate documentation in searchable HTML, PDF, and MARKDOWN file formats.

4) Seamless navigation to find everything in no time
Users can easily navigate throughout the documentation with the built-in breadcrumbs or use handy text search to locate needed objects quickly.

5) Automatic database documenting to save users’ time
With the support for the command line interface, dbForge Documenter for Oracle enables users to set up automatic database documenting. The tool also allows generating a command line execution file (.bat) and perform the routine database documenting tasks in a click.

Take a closer look at all capabilities of dbForge Documenter for Oracle and try it for free during a 30-day trial at https://www.devart.com/dbforge/oracle/documenter/.

About Devart

Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects.
Learn more about Devart at https://www.devart.com.

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
articles: 

Weblogic Administration Online Training

This course introduces the student to Oracle WebLogic 12c. Students will learn skills necessary to understand basic WebLogic concepts and
administrative tasks. At the end of this course the student will learn how to install WebLogic, create WebLogic domains, and administer WebLogic.

This course is geared toward administrators, developers, or architects who are looking to understand fundamental WebLogic concepts and how to spin
up a WebLogic environment quickly.Screencasts will be used so the student can follow along at home. There will also be lab exercises and a quiz that can be done by the student offline to further develop.
For more info:
Telephone (India) : +91 988 502 2027
Telephone (USA) : +1 2103904819
Mobile : +91 988 502 2027
Email:
Skype id: svrtechnologies
Please visit our official site weblogic administrator training

We are also offer other IT courses, for complete courses list E learning courses

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
articles: 

package databasetesting;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;

public class Dbjdbc {

public static void main(String[] args) {
DBcreate();
}
public static void DBcreate()
{
Connection conn = null;
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","system","tiger");
String Str = "Create table Persons"+("PersonID int"+"LastName varchar(255)"+"FirstName varchar(255)"+"Address varchar(255)"+"City varchar(255)");
PreparedStatement state = conn.prepareStatement(Str);
state.executeUpdate();

}catch(Exception e)
{
e.printStackTrace();
}
}
/*public static void DBinsert()
{
Connection conn= null;
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","system","tiger");
String Str1 = "insert into Persons values(1+'Dhoni'+'Mahendra'+'New Road'+'Bangalore')";
String Str2 = "insert into Persons values(2+'Kohli'+'Virat'+'New Road'+'Bangalore')";
String Str3 = "insert into Persons values(3+'Gambhir'+'Gautam'+'New Road'+'Bangalore')";
String Str4 = "insert into Persons values(4+'Utthappa'+'Robin'+'New Road'+'Bangalore')";
String Str5 = "insert into Persons values(5+'Tendulkar'+'Sachin'+'New Road'+'Bangalore')";
String Str6 = "insert into Persons values(6+'Khan'+'Zaheer'+'New Road'+'Bangalore')";
PreparedStatement state1 = conn.prepareStatement(Str1);
PreparedStatement state2 = conn.prepareStatement(Str2);
PreparedStatement state3 = conn.prepareStatement(Str3);
PreparedStatement state4 = conn.prepareStatement(Str4);
PreparedStatement state5 = conn.prepareStatement(Str5);
PreparedStatement state6 = conn.prepareStatement(Str6);
state1.executeUpdate();
state2.executeUpdate();
state3.executeUpdate();
state4.executeUpdate();
state5.executeUpdate();
state6.executeUpdate();

}catch(Exception e)
{
e.printStackTrace();
}
}*/
}

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Separate tags by commas
To access this feature, please upgrade your account.
Start your free month
Free Preview