Learning is not a spectator sport

April 12, 2014

An accusatory error message

Filed under: Uncategorized — connormcdonald @ 10:40 pm

I found this hilarious

SQL> startup
ORACLE instance started.

Total System Global Area 1469792256 bytes
Fixed Size                  2402776 bytes
Variable Size             536872488 bytes
Database Buffers          922746880 bytes
Redo Buffers                7770112 bytes
Database mounted.
ORA-19821: an intentionally corrupt log file was found

Really ? I intentionally corrupted my log file ?  I dont think so !

:-)

SQL injection

Filed under: Uncategorized — connormcdonald @ 10:27 pm

Another big public username and password leak…

http://o.canada.com/technology/bell-canada-security-breach-391451/

Some good reading on how it was done, and thus ensuring your code isn’t prone to SQL injection here:

http://www.troyhunt.com/2014/02/heres-how-bell-was-hacked-sql-injection.html

Pluggable database and restricted sessions

Filed under: Uncategorized — connormcdonald @ 10:25 pm

Once you get into pluggable database territory, you might need to check your usage of "alter system enable restricted session", because unless you’ve patched, there’s a little bug which lets you enable restricted session, but wont let you get out of it ! :-)

For example:

SQL> alter session set container = pdb12;
 
Session altered.
 
SQL> alter system enable restricted session;
 
System altered.
 
SQL> select logins from v$instance;
 
LOGINS
----------
RESTRICTED
 
SQL> alter system disable restricted session;
alter system disable restricted session
*
ERROR at line 1:
ORA-65144: ALTER SYSTEM DISABLE RESTRICTED SESSION is not permitted
 

You can get out of the predicament, by force opening the pluggable database as shown below, but probably best to look at the latest 12c PSU, which contains a fix (unverified)

 
SQL> conn / as sysdba
Connected.
 
SQL> alter pluggable database pdb12 open force;
 
Pluggable database altered.
 
SQL> alter session set container = pdb12;
 
Session altered.
 
SQL> select logins from v$instance;
 
LOGINS
----------
ALLOWED
 

OUGN 2014

Filed under: Uncategorized — connormcdonald @ 10:16 pm

I had the pleasure of being a guest of the Norwegian User Group for the second year in a row on their famous cruise conference at the start of April. For a relatively ‘small’ conference (around 300-400 people), the array of quality speakers the group manage to get is always astounding.  Martin Nash, Cary Millsap, Tim Hall, Bryn Llewellyn, Martin Bach, Jeff Smith, Doug Burns to name just a few.  I gave a few talks which (seemed :-)) to be well received by the audience.

The conference runs like clockwork, and Oslo is a beautiful city to spend a day wandering around sampling the cuisine.  The only real challenge is the 45min timeslot for papers, whereas as most places I’ve spoken at allow 50-60 mins, so you’re presented with the tough choice of cramming your existing content into 45 mins, or deciding what must be pared out.

We rounded up the conference with a lovely meal in Oslo with several of the speakers.  It was great to meet new people, and catch up with colleagues of old.

March 28, 2014

Norway bound

Filed under: Uncategorized — connormcdonald @ 9:07 pm

I cant wait to get to Norway again for this year’s OUGN conference.

If you’re in Europe…this should be on your must-attend list every year.

It’s awesome fun.

I’ll be talking about Clone DB, Optimizer Stats and Analystics in SQL

http://ougnvarseminar2014.sched.org/

March 13, 2014

views in 12c

Filed under: Uncategorized — connormcdonald @ 7:50 pm

Observed an interesting idiosyncracy in the creation of views in 12c (this is in a pluggable database, but not confirmed whether this is related or not).  This database was upgraded from 11.2 without incident…until we came to replace one of the existing views.

SQL> create or replace
2 view EXISTING_VIEW_NAME
3 as select * from other_schema.account;
ERROR at line 3:
ORA-01720: grant option does not exist for 'OTHER_SCHEMA.ACCOUNT'
*

Now that struck us as odd, because this was a script from our source code control repository, which had no previous entries about grants for the OTHER_SCHEMA.ACCOUNT table.  So then I tried this:

SQL> create or replace
2 view NEW_VIEW_NAME
3 as select * from other_schema.account;

View created.

so there doesn’t appear to be the need for the grant option.  Similarly, dropping the original view also solves the problem.

SQL> drop view EXISTING_VIEW_NAME;

View dropped.

SQL> create or replace
2 view EXISTING_VIEW_NAME
3 as select * from other_schema.account;

View created.

So when you get errors regarding grants in 12c, perhaps just double check to make sure you really need it.

February 20, 2014

Oracle Developer Day Perth

Filed under: Uncategorized — connormcdonald @ 11:58 am

Well…it was a great day with over 100 people attending.

I had the standard fail of trying to show people 200 things that I think are important, in a time allowing only for 50 things, but better to be overfed than starving :-)

Links to the slides are below.  Thanks everyone for coming – hope you had a great day.

 
 
(Thanks Chris for setting it up, and for the pic)
 
Image

January 20, 2014

Free developer day in Perth

Filed under: Uncategorized — connormcdonald @ 7:54 pm

Got a massive day of goodies coming to anyone in Perth..for absolutely no cost – just your time and your enthusiasm.

There’s something for

  • database developers
  • Apex developers
  • ADF developers

See you all there …

http://bit.ly/oddperth20140218

January 18, 2014

ORA-65131 grrrr

Filed under: Uncategorized — connormcdonald @ 4:21 pm

So…the future is container databases ?

Cool ! I’ll create all my databases as container databases….I’m so happy….until

SQL> CREATE FLASHBACK ARCHIVE longterm TABLESPACE demo RETENTION 1 MONTH;
CREATE FLASHBACK ARCHIVE longterm TABLESPACE demo RETENTION 1 MONTH
*
ERROR at line 1:
ORA-65131: The feature Flashback Data Archive  is not supported in a pluggable database.

It is documented but seriously….that’s not so flash :-)

Man…I really really like this :-)

Filed under: Uncategorized — connormcdonald @ 2:36 pm

Yeah yeah, you can argue with me about backward compatibility, but I’m so glad someone snuck this into 12c…

11.2

SQL> grant resource, connect to demo identified by demo;

Grant succeeded.

SQL> select privilege
  2  from   dba_sys_privs
  3  where  grantee = 'DEMO';

PRIVILEGE
----------------------------------------
UNLIMITED TABLESPACE

12.1

SQL> grant resource, connect to demo identified by demo;

Grant succeeded.

SQL> select privilege
  2  from   dba_sys_privs
  3  where  grantee = 'DEMO';

no rows selected
Older Posts »

The WordPress Classic Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 71 other followers