Archive for June, 2010

How difficult is the market out there?

Thursday, June 17th, 2010 by

Greetings all,

this might be talking about the obvious but how difficult is the market out there and what are the ‘Do and Don’t’ that await us Contractors in the market.

I have been idling now for a few months and when I actually have a gig it turns out that the client has no intention of paying me which results in more money to the solicitors to chase up payment in a number of courts.

I have been running my own company now for a couple of years and as a full time Contractor, in the past I was always ’shelled’ by an agency or an employer, I have enjoyed a good run until mid last year.

The market has been good until mid last year and then the ‘crisis’ caused by the Banks and by Human Nature has hit all of us very hard. I heard form other Contractors that ‘Oracle is leaving many professional home’ and that ‘SAP seems to have the upper hand’ but in actual facts we are all in the same boat.

I guess we all look forward to the Oracle market picking up and indeed I am having more contacts with new projects however twice now this year this has happened and twice it went quiet again.

What do we think and how can we help the clients in a ‘win-win’ situation rather than having a client driven market that squeezes out the profit from us? How can we maintain a reasonable rate rather then having to slash prices to a level where it is questionable whether it is actually more lucrative to be a contractor? 

I look forward to your comments.

Marco.

 

Copying Tablespaces between Databases - Part 3

Tuesday, June 15th, 2010 by

This is the third of four blogs which discuss some of the methods that can be used to copy tablespaces between databases.  Part 1 worked through an example using export/import transportable tablespace procedures and part 2 used Datapump transportable tablespaces.

In part 3 we’ll use RMAN (Recovery Manager) to transport the tablespaces.

For all of this work, our local database is called ORCL and our remote database is ORCL2. 

If you have carried out the procedures in parts 1 or 2, then run the commands below on the local and remote database, otherwise skip these drop commands.

Drop tablespace TTS_TEST including contents and datafiles;
Drop tablespace TTS_TEST_IDX including contents and datafiles;
Drop user tts_user cascade;

Create Example Tablespaces in the local database

We’ll begin by creating some tablespaces in our local database.  Run the commands below as SYSTEM.

CREATE TABLESPACE TTS_TEST DATAFILE
‘/u01/oradata/ORCL/TTS_TEST01.dbf’ size 10M autoextend on maxsize 100M;

CREATE TABLESPACE TTS_TEST_IDX DATAFILE
‘/u01/oradata/ORCL/TTS_TEST_IDX01.dbf’ size 10M autoextend on maxsize 100M;
  
Creating an Example user in the local and remote databases

Now we’ll create an example user in our local and remote databases.

CREATE USER TTS_USER IDENTIFIED BY tester1 DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP;

GRANT CREATE SESSION, CREATE TABLE TO TTS_USER;

Next - just on the local database – we’ll run the commands:

ALTER USER TTS_USER DEFAULT TABLESPACE TTS_TEST;
ALTER USER TTS_USER QUOTA UNLIMITED ON TTS_TEST;
ALTER USER TTS_USER QUOTA UNLIMITED ON TTS_TEST_IDX;

Create an Example Table in the local database

We can then create a very basic table with an associated index.  The table and index will be in separate tablespaces and will use the default storage options for the tablespace.  
 
CREATE TABLE TTS_USER.T1  (C1 NUMBER(10) ,  C2 VARCHAR2(10) )
TABLESPACE TTS_TEST ;

ALTER TABLE TTS_USER.T1 ADD (CONSTRAINT t1_pk PRIMARY KEY(C1) USING INDEX TABLESPACE TTS_TEST_IDX);

INSERT INTO TTS_USER.T1 VALUES (1,’TESTROW1′);
INSERT INTO TTS_USER.T1 VALUES (2,’TESTROW2′);
COMMIT;

Using RMAN transportable tablespaces to create a copy of a table

The main advantage of this method over using export/import or the datapump utilities is that we do not need to make our source tablespace read-only when we are creating a copy of the tablespace.

RMAN works around this limitation by creating a temporary auxiliary instance and then making a copy of the original tablespace in this instance read-only.   This read-only copy is then transported by a call to Datapump export.  

Firstly, check that a full online RMAN backup of the local database - including the TTS_TEST and TTS_TEST_IDX tablespaces has been taken.  The backup should have been taken using an RMAN recovery catalog.  The tablespaces should be in read write mode before taking any backups and throughout this work.

Once we have taken the backup, we can then carry out the following:   

(i) Create a directory to temporarily store the datafiles for the auxiliary instance. 
e.g.   mkdir /u01/oradata/ORCL/aux_files

(ii) Also create a directory to store the copy of the original tablespace datafile. 
e.g. mkdir /u01/oradata/ORCL/copy_files 

(iii) Switch a logfile on the source database. RMAN will use the last archived redo log file to determine the SCN for this work automatically.

ALTER SYSTEM ARCHIVE LOG CURRENT;

(iv)  Run RMAN commands to transport the tablespace.  (In this scenario, RMANCAT is the name of the RMAN catalog database).  
rman catalog rman/rmanpass@RMANCAT target /

RUN
{
TRANSPORT TABLESPACE ‘TTS_TEST’,'TTS_TEST_IDX’
AUXILIARY DESTINATION ‘/u01/oradata/ORCL/aux_files’
DATAPUMP DIRECTORY DATA_PUMP_DIR
DUMP FILE ‘T1_tbs.dmp’
EXPORT LOG ‘T1_tbs.log’
IMPORT SCRIPT ‘T1_tbs_imp.sql’
TABLESPACE DESTINATION ‘/u01/oradata/ORCL/copy_files’;
}

Notes: AUXILIARY DESTINATION should match the temporary directory we created previously for the auxiliary instance files.  TABLESPACE DESTINATION should match the location we created previously to hold the copy of our original tablespace datafile.

(v) Transfer the copy of our original datafile and the dynamically created script T1_tbs_imp.sql from the TABLESPACE DESTINATION to the new location on the local or remote server.   Copy the DATA_PUMP_DIR dumpfile (T1_tbs.dmp) to the DATA_PUMP_DIR location for the other local or remote database.   (Refer to part 2 to check the location of DATA_PUMP_DIR for your database).

(vi) The automatically created import sql script then provides two options for adding the tablespace to the remote copy of the database.

Option 1:  Commands to run a standard datapump tablespace import are listed first in the file, but are commented out. 
Option 2: Commands to run a PL/SQL script which calls DBMS_STREAMS_TABLESPACE_ADM.ATTACH_TABLESPACES are also provided.   This is the default option.  (DBMS_STREAMS_TABLESPACE_ADM is discussed in the next part of this blog).   We could pick whichever one of the two options we preferred to load the data, after appropriate editing.

(vii) On the remote database we would then need to place the tablespace into read write mode.

ALTER TABLESPACE TTS_TEST READ WRITE;
ALTER TABLESPACE TTS_TEST_IDX READ WRITE;

(Note: If we wanted to try both options for comparison, we would need to: 

(a) Drop tablespace TTS_TEST INCLUDING CONTENTS AND DATAFILES;
(b) Drop tablespace TTS_TEST_IDX INCLUDING CONTENTS AND DATAFILES;
(c) Re-copy the original datafiles from the local server to our remote server.
(d) Re-run the import with the second option.

In the final part of this blog we’ll use DBMS_STREAMS_TABLESPACE_ADM to clone a tablespace.  

References

(i)  Oracle documentation at:
http://www.oracle.com/technology/documentation/database.html

(ii) Oracle Support Note 455593.1 Creating a transportable tablespace set from RMAN backupsets

Kick-starts and kick-offs

Friday, June 4th, 2010 by

As a contractor  in the UK public sector I am not surprised to find that there is a bit of a limbo in IT projects at the moment whilst the new coalition government is sorting out its emergency budget, due later this month. The scrapping of the ID card project, the National Identity Register and probably the ContactPoint database has required government departments across the country to suspend activities on these projects awaiting the inevitable instruction to turn off the systems.
 

This sounds easy but requires a lot of resource in winding down and decommissioning the various systems and databases  in a safe manner, permanently destroying millions of records of sensitive data that is no longer required and sorting out broken contractual issues with the application providers.
 

No doubt, when all this is sorted out there will eventually be an emergence of some new government IT projects to kick-start the economy and to  redeploy some of the public sector permanent staff, supplemented with contractors. Meanwhile, the sky is blue, the sun is shining and the World Cup is about to commence, so any drop in workload is quite welcome.
 


Buy Phentermine Cialis Clonazepam Buy Prozac Bupropion Buy Celexa Buy Clonazepam Soma Diazepam Buy Phentermine Online Buy Norvasc Valium Prozac Buy Acyclovir Buy Ambien Buy Propecia Zyrtec Acyclovir Buy Lorazepam Buy Adderall Buy Glucophage Buy Lipitor Buy Diflucan Buy Tenuate Generic Viagra Bupropion Buy Adipex Buy Prozac Buy Ultram Generic Viagra Buy Ultram Ativan Buy Zyrtec Carisoprodol Didrex Norvasc Buy Percocet Percocet Lortab Buy Percocet Buy Xanax Online Zyprexa Zithromax Buy Biaxin Buy Levitra Tramadol Online Prozac Ativan Buy Codeine Paxil Buy Zocor Paxil Buy Ambien Phentermine Online Zithromax Diflucan Buy Ativan Buy Bupropion Zyrtec Buy Darvocet Alprazolam Buy Norvasc Buy Glucophage Buy Tenuate Adderall Buy Zyban Butalbital Buy Seroquel Valium Online Cheap Phentermine Seroquel Zyban Valium Online Propecia Zyban Buy Fioricet Buy Paxil Ephedrine Online Xanax Buy Norco Buy Vicodin