I can attach in SQL Server, but can I in Oracle?

From: Norman Dunbar <Norman.Dunbar_at_lfs.co.uk>
Date: Mon, 11 Aug 2003 12:39:24 +0100
Message-ID: <E2F6A70FE45242488C865C3BC1245DA7040EA29B_at_lnewton.leeds.lfs.co.uk>


Morning Ron,

Having read the thread I too have a couple of comments :

Sybrand : he is a fine DBA and very knowlegable. He can be a bit (!) unhelpful at times and definately calls a 'spade' a 'spade'. Some people don't like his attitude. I am not one of them, but in this case he has been a bit over the top.

Daniel : Teaches Oracle at a university somewhere, he is very quick to 'punish' when the wrong terminology is used (been on the wrong end myself once !) but is also knowlegable.

Both the above sometimes get too embroiled in the intracacies of the problem perhaps and end up not offering any help.

From what I have read, you have a database already set up in an Oracle schema (aka user with objects in it) which you wish to put on a CD and distribute with your code. Fine, here's what you need to bear in mind :

Oracle sites usually have DBAs and most of these are probably good at what they do :o)
They therefore know how to create a tablespace and a user account, so

on your database run this command :

exp USERNAME/PASSWORD file=DUMPFILE_NAME.dmp log=LOGFILE_NAME.log compress=no consistent=y buffer=2048000 statistics=none owner=USERNAME

That will export USERNAME's data into a file called DUMPFILE_NAME.dmp. You now have all you need (almost) to let the DBA on site set up a receiving schema.

If you tell the DBAs how much space is required in the tablespace to import the dump file, then they can set it up accordingly, allow for growth etc - but from what you say, this won't be much. The DBA can no import your setup data easily from your dump file - all they need to knwo is the USERNAME that you exported so that they can specify it on the 'imp' command line. (imp lets you import data from user_a into another user's schema - if you want !)

As others have pointed out, Oracle isn't SQL Server (or DBASE or DB2 or Firebird etc) so the setup and import of data is a lot different. On SQL Server is might be a case of supplying the database file and that's it (I have no idea - I have never used that software) but on Oracle, it isn't.

Remember, the KISS principle. and supplying the customer with an export is the simplest way to do it.

Having said all that, use the LOWEST version of exp to export the data. So in this case you would use the 8i exp software and your 8i or 9i (or 10g) customers will happily import it into their own databases. Contrary to previous advice from a poster, you cannot import 9i export files using 8i - it's not a case of 'can have' problems, it's a case or 'will have' problems.

If you try to export from a 9i database using 8i software and have problems, just supply two copies of the file, one from 8i and one from 9i - exp files compress really well !

HTH Regards,
Norm.



Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
mailto:Norman.Dunbar_at_LFS.co.uk
Tel: 0113 289 6265
Fax: 0113 289 3146
URL: http://www.Lynx-FS.com
-------------------------------------


-----Original Message-----
From: Ron Fluegge [mailto:rmflugge_at_swbell.net] Posted At: Saturday, August 09, 2003 12:34 AM Posted To: tools
Conversation: I can attach in SQL Server, but can I in Oracle? Subject: Re: I can attach in SQL Server, but can I in Oracle?

Thanks for the response.

I've been looking at that and trying it on my 8i and 9i as well, but I must
be missing something. Having some problems with "preferred credentials" at
the moment.

I'll keep reading, but thanks for pointing me in that direction.

It is very much appreciated.

Ron

"shay" <gevatron_at_yahoo.com> wrote in message news:92653779.0308081527.5729fc4b_at_posting.google.com...
> What you are looking for is called import and export in Oracle.
> you need to do export of the full database.
> Check out the utilities guide of Oracle on http://otn.oracle.com look
for
imp Received on Mon Aug 11 2003 - 13:39:24 CEST

Original text of this message