Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: OCP Sample Test Questions

Re: OCP Sample Test Questions

From: Erika Grondzakova <Erika.Grondzakova_at_cern.ch>
Date: 2000/03/10
Message-ID: <38C8BEBE.14F62BDE@cern.ch>#1/1

Hello,

I think boths of you were rigth....
SQL> select banner from v$version;

BANNER



Oracle7 Server Release 7.3.4.5.0 - Production PL/SQL Release 2.3.4.5.0 - Production
CORE Version 3.5.4.0.0 - Production
TNS for Solaris: Version 2.3.4.0.0 - Production NLSRTL Version 3.2.4.0.0 - Production

SQL> create table test (n number);
Table created.
SQL> insert into test (n) values (5);
1 row created.
SQL> alter session set nls_date_format = 'YYYY-MM-DD HH24:MI:SS'; Session altered.
SQL> rollback;
Rollback complete.
SQL> select * from test;
no rows selected

However ALTER TABLE do an implicit commit...

SQL> insert into test (n) values (5);
1 row created.
SQL> alter table test add(primary key (n)); Table altered.
SQL> rollback;
Rollback complete.
SQL> select * from test;

        N


        5

Now my question. Is it ALTER (SESSION) different from ALTER (TABLE)? That the first one doesn't do an implicit commit and the second does???

Erika

Martin Haltmayer wrote:
>
> So in principle you are admitting that not your knowledge of Oracle is tested
> but your knowledge of the TEST itself - excuse me, what a nonsense!
>
> Martin
>
> tandym_at_hotmail.com wrote:
> >
> > It may be wrong according to the test that you used, however, according
> > to several study guides, and a sample question contained in the sample
> > tests you can download from Oracle's OWN website - they consider ALTER
> > to end a transaction. For example - taken verbatim from the 'Oracle
> > DBA Exam Cram Test 1 & Test 2', pp 137 (Chapter 5, end of chapter
> > question #9)
> >
> > You logged onto the database to update the inventory table. After your
> > session began, you issued three UPDATE commands then you issued the
> > ALTER TABLE command to add a column constraint. You were just about to
> > issue a COMMIT command when the system crashed. Which changes were
> > made to the inventory table?
> >
> > A) Only the UPDATE commands
> > B) Only the ALTER TABLE command
> > C) Both the UPDATE and the ALTER TABLE command
> > D) None
> >
> > The correct answer is c. This is almost a trick question because the
> > question is checking whether or not you understand that an implicit
> > commit is issued after each DDL command. Answer a is incorrect because
> > we know that the UPDATE preceded the ALTER TABLE and the ALTER TABLE
> > does an implicit commit, committing both sets of operations. Answer b
> > is incorrect because we know that the UPDATE commands that preceded the
> > ALTER TABLE command were covered by this implicit commit. Answer d is
> > incorrect because we know a DDL command always does an implicit commit,
> > thus both sets of operations are committed.
> >
> > sonya
> >
> > In article <38C7B3F1.8F42FB19_at_0800-einwahl.de>,
> > Martin.Haltmayer_at_0800-einwahl.de wrote:
> > > Oh yeah, d is also wrong:
> > >
> > > create table test (n number);
> > >
> > > insert into test (n) values (5);
> > >
> > > alter session set nls_date_format = 'YYYY-MM-DD HH24:MI:SS';
> > >
> > > rollback;
> > >
> > > select * from test;
> > >
> > > will not retrieve any row.
> > >
> > > Martin
> > >
> > > Martin Haltmayer wrote:
> > > >
> > > > Another one of the bullshit repertoire:
> > > >
> > > > Which of the following statements ends a transaction?
> > > >
> > > > a. COMMIT
> > > >
> > > > b. ROLLBACK
> > > >
> > > > c. DROP
> > > >
> > > > d. ALTER
> > > >
> > > > e. DELETE
> > > >
> > > > The suggested answer is b|c|d, a was missing.
> > > >
> > > > Martin
> > > >
> > > > John Claxton wrote:
> > > > >
> > > > > We're just getting started with sample questions for the Oracle
 Certified
> > > > > Professional (OCP) tests.
> > > > > You can test your skill and knowledge at
> > > > >
> > > > > http://www.networkessentials.com/certified/ocp
> > > > >
> > > > > where the questions are presented in random order with pop-up
 answers and
> > > > > cumulative scoring.
> > > > > You can enter comments/questions about each individual question.
> > > > > There's even a form for you to add questions of your own.
> > > > >
> > > > > jc
> > >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
Received on Fri Mar 10 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US