Oracle : Use two different versions of EXP on the same machine? - oracle

i have a server (HP-UX) installed with Oracle 10g and several databases on it.
I've been asked to make dumps from these tables for a Oracle 8i database. In order to do this, i need to use the 8i version of the EXP (export) tool of Oracle.
It is still installed on my server but when i want to use it, i get the following error :
EXP-00056: ORACLE error 12705 encountered
ORA-12705: Cannot access NLS data files or invalid environment specified
I presume some files are missing or maybe one of the folder is not in the PATH but i can't find and i really don't want to break the 10g installation.
Someone knows how to do ?
Thanks

Install a 10G client on another system, without modifying the 8I database server,
and connect from the client to the 8I database. Use the export utilities on
the client to generate the export file.

Related

Connect to Oracle with TOAD

Is there any way to connect to Oracle using TOAD without installing an Oracle client?
If you check Installation Guide, Database requirements specify:
An Oracle client must be installed and configured on the system where you are running Toad (...)
Therefore, I'd say no is the answer to your question.

Difference Between Oracle lnstant Client and Oracle Client

What is the Difference Between Oracle lnstant Client and Oracle Client ? Could you explain me ? Thanks
Oracle client comes with an installer and a lot of executable like
sqlplus, tnsping, it's complete and huge.
Oracle Instant client is a basic lightweight client which can be
unzipped in a location without any installation, it contains only the
communication layer to be able to connect to oracle. It can be
extended by adding for example sqlplus which ships as a separate
executable. When using Instant Client, just unzip it to a location,
set your ORACLE_HOME environment variable to this location and you
are ready to go.

How do I export a 'database' from Oracle 11g XE and import it to Oracle 10.2?

Up to this point, I've never done anything serious with an Oracle database. I know that they are different than what I've handled, like MS SQL.
So, coming from an MS SQL perspective, I can backup a database, copy over the .bak file to another server, restore it, creating a complete copy of the database.
I'm not sure how to do the same for Oracle, much less different versions. I've seen it done mostly with command lines, so I tried this:
$exp owner/owner schemas=tkcsdb directory=dumpdir dumpfile=dBaseName logfile=dBaseLog
And then the SQL Plus returns:
Unknown Parameter Name 'Schemas'.
Failed to process parameters.
Export terminated unsuccessfully.
I've since replaced the 'schemas' with 'schema' (same error), and I wanted to try using 'tables', though I'm not sure how that would turn out. I'm not even 100% if 'tkcsdb' is the name of the database I'm looking for - I've been unable to list all the databases I have.
What I want to do (which I've done with MS SQL, MySQL, and even IBM DB2 of all things) is looking to be quite difficult to replicate in Oracle.
As with the title, how do I export a 'database' from Oracle 11g XE and import it to Oracle 10.2?
I'm using Windows 7, the target machine is a Linux Fedora of some sort.
EXP and IMP are ancient - do not use them unless you absolutely have to. They cannot handle some of the features of newer Oracle versions.
The tools of choice are EXPDP and IMPDP (short for EXP datapump and IMP datapump).
Unfortunately, using them is a little more complicated, because you can run them only on the database server (contrary to old-style EXP/IMP, which you could run from any client computer).
So, to get your schema from the 11g source DB to the 10g target DB, you'll have to:
open a terminal session on the 11g DB server
run expdp with version set to 10 (so you can import it on the 10g server)
copy the dump file fom the 11g server to the datapump directory of the 10g server (look for a directory called "dpump")
open a terminal session on the 10g DB server
run impdp with your dump file
Example:
expdp scott/tiger#db11g version=10.2 schemas=SCOTT dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
impdp scott/tiger#db10g schemas=SCOTT dumpfile=SCOTT.dmp logfile=impdpSCOTT.log

Bulk export in oracle 8i

How can I export data from Oracle 8i database using command which I can run through oracle cli?
My biggest problem is, the data should be exported based in the query I use...
For ex,
select * from emp where emp_id>4
should dump the records having emp_id>4.
I don't have permission to use functions.
Please help!!
Oracle provides a set of tools that are designed for exporting data (the exp tool, for instance). These don't run via the SQL*PLUS command line (which I assume is what you mean by CLI), although they do connect via NET*8. From Oracle 8i onwards, you can use the query parameter to limit the rows exported:
exp scott/tiger tables=emp query="where deptno=10"
But you have to have the Oracle client installed and be able to connect to the database via SQL*NET.
If all you have is the ability to run queries, you're out of luck unless you can write a query that generates a CSV (tricky if you don't have the ability to call/write functions). It sounds to me like all you have access to is a web interface.

SQL Plus and www.apex.oracle.com

Does the SQL syntax differ in any way for SQL Plus and apex.oracle.com
From this article I can assume that it doesn't, but I want to be sure. Is SQL Plus only an environment that is able to connect to an Oracle server ?
I'm asking this because I just started learning Oracle's SQL syntax and I don't have access to my faculty's server from home. The only solution I found so far is Apex since I'm not planning to install a server on my laptop.
Is SQL Plus only an environment that
is able to connect to an Oracle server?
Yes, SQL*Plus is not very useful unless you can connect to an Oracle database server.
I'm asking this because I just started
learning Oracle's SQL syntax and I
don't have access to my faculty's
server from home. The only solution I
found so far is Apex since I'm not
planning to install a server on my
laptop.
If you cannot connect to your faculty's database server from home, you have no choice but to install your own server somewhere. Apex only runs on an Oracle database server.
However, it's not too difficult nowadays, as long as you follow the installation instructions carefully.
Another option is to get a free account at apex.oracle.com. You'll be able to use Apex's SQL interface. I don't think you can connect to it using SQL Developer, though.
Alternatively, you can start up a simple pre-prepared Apex instance on Amazon's EC2. With this option, if you open the relevant port (1521) you'll be able to connect to it using SQL Developer.
The SQL commands are identical. They are all passed directly to the database engine for execution.
SQL*Plus has a bunch of extra commands (mostly for formatting output, but also stuff like dealing with variables and database startup/shutdown).
[Very old versions of SQL*Plus from the Oracle 7 era don't recognize the MERGE command as SQL and would refuse to do anything with it. But I'd hope those versions are all dead and buried by now.]
SQLPlus commands are to manage the SQLPLus environment and have really nothing to do with SQL. They are mostly for formatting output or taking in data that is used with SQL to send to the server.
SQLPlus is a proprietary Oracle product for connecting to Oracle server and issuiung commands. It is being replaced (officially) by SQL Developer.
I strongly suggest you download the free SQL Developer program from oracle:
http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
it's a great tool for working with sql, pretty easy to get started (install, create a new db connection and start typing sql_ plus does fill in for columns once it know the tablenames.
Also, it can run most sqlplus commands if you want to format output, etc.
A nice visual intro to the oracle schema and useful if you want to write plsql.

Resources