Securing Oracle External table data file - oracle

I've just learned one of Oracle features: External table. But when I use this external table in my application, I get a problem and wonder how to solve it.
The problem is: the security of the data file of external table (It's in text format).
How can I secure this data file effectively?
The target environment is: Red hat Linux enterprise 5.4; Oracle 10g.
Because of that environment, I cannot use Oracle DBFS to secure this file. Should I save the external data file in LOB data type in an independent database? Would you suggest me any other solution for my problem?

Make sure only the operating system user that starts the Oracle service/database (typically "oracle") can read the input files for the external services.
Then no other user will be able to mess around with them.

Related

Oracle application - migration to Exadata server

We have an upcoming migration of our Oracle database to an Exadata server. I want to clarify some issues I have thought of:
Will there be any issues with the code - performance issues? Exadata has another type of optimizer, it doesn’t uses indexes, has a columnar optimizer, if I’m not misleading,
Currently there are some import or export files generated on the database server (accessed via Filezilla). I understand that at Exadata the database server is inaccessible, and I suspect that either:
• we will have to move those files to another server - Oracle knows only FTP (which has ports closed at our client) -> how do we write / read from another server? (as far as I understand, they would like to put all the files on the WAS server)
• or we will need to import the files into the table using the java application and process them from there (and the same with the exported files).
Files that come automatically from other applications can be written to the database server? Or we have the same problems as for the manual part.
We have plenty of database jobs that run KSH scripts on the database server - is there a problem with them? I understand they should also be moved to the WAS server, but I do not know how Oracle will call them from there.
Will there be any problems with Jenkins deployments? Anything changed? Here we save the SQL/PLSQL sources in some XML files, from which the whole application is restored (packages, configuration tables, nomenclatures ...) (with the exception of the working data) (the XML files are read through a procedure from an oracle directory).
If you can think of any other issues concerning this migration, any problems you have encountered during or after the migration to Exadata, please share!
Thank you,
Step by step:
On exadata you are going to have the same optimizer behaviour with some improvements because the exadata may improve full table scan performance thanks to smart full scans. Indeed the exadata is able to avoid retrieving data blocks in fts because it knows in advance they do not contain neeeded data.
In the exadata you can export to external servers DBFS file systems, that might be useful for external tables, imports/exports and so on.
You can write your files on the DBFS you can configure.
You could use your DBFS, if you want the ksh files are accessed from outside your exadata.
Let your oracle directory point to a directory in the DBFS file system where you put your xml files and you are done.

Difference between sql * plus and sql loader

I am Oracle Data base Bigginner. I am Confusing with this two words sql * plus and sql loader,Any one Tell me the difference between SQL loader and SQL * PLUS?
From the documentation:
SQLPlus is an interactive and batch query tool that is installed with every Oracle Database Server or Client installation. It has a command-line user interface, a Windows Graphical User Interface (GUI) and the iSQLPlus web-based user interface.
SQLPlus has its own commands and environment, and it provides access to the Oracle Database. It enables you to enter and execute SQL, PL/SQL, SQLPlus and operating system commands to perform the following:
Format, perform calculations on, store, and print from query results
Examine table and object definitions
Develop and run batch scripts
Perform database administration
You can use SQLPlus to generate reports interactively, to generate reports as batch processes, and to output the results to text file, to screen, or to HTML file for browsing on the Internet. You can generate reports dynamically using the HTML output facility of SQLPlus, or using the dynamic reporting capability of iSQLPlus to run a script from a web page.
SQLLoader loads data from external files into tables of an Oracle database. It has a powerful data parsing engine that puts little limitation on the format of the data in the datafile. You can use SQL*Loader to do the following:
Load data across a network if your data files are on a different system than the database.
Load data from multiple datafiles during the same load session.
Load data into multiple tables during the same load session.
Specify the character set of the data.
Selectively load data (you can load records based on the records' values).
Manipulate the data before loading it, using SQL functions.
Generate unique sequential key values in specified columns.
Use the operating system's file system to access the datafiles.
Load data from disk, tape, or named pipe.
Generate sophisticated error reports, which greatly aid troubleshooting.
Load arbitrarily complex object-relational data.
Use secondary datafiles for loading LOBs and collections.
Use either conventional or direct path loading. While conventional path loading is very flexible, direct path loading provides superior loading performance.
SQL* Plus is installed with every Oracle Database Server or Client installation. It has a command-line user interface, a Windows Graphical User Interface (GUI) and the iSQLPlus web-based user interface.
SQL Loader loads data from external files into tables of an Oracle database.It can also be Load data across a network.
SQL*plus is something that provides an access to the Oracle Database.
SQL Loader is you are loading the external data or files from your disk to Oracle database.

Is there a possible way to load a Oracle .dmp file to an SQL Server 2012?

This throws me the below error:
the media family on device is incorrectly formed 3241.
I tried loading the .dmp file as .bak file and restored the db. It did not work.
Only way I know to extract from dmp is to use the "INDEXFILE" parameter for IMP, this will generate a readable SQL script with the DDL and DML.
However often times this script is not 100% usable as it (usually) wraps the statements, so some pre-processing may be required, for example parse the file by each discrete statement (INSERT, CREATE), join each statement into a single line then squirt into the target database. Having said that, you would probably need to pre-process anyway to translate Oracle to SQL server dialogue anyway.
Also, might not be so good for BLOB/binary type data.
The other indirect way to do this would be to create a bridge Oracle database, import the file into there, then use the normal extract and load tools to push the data into SQL server.
A *.dmp file in Oracle is nothing but a backup file. You meant to say restoring a Oracle DB backup file in SQL Server.
AFAIK, the answer is NO. You can't do that. Probably you can check, if there is any third party utility present using which you can perform a DB migration.
The dmp file comes in an Oracle specific format that cannot be parsed/interpreted by anything other than Oracle's imp tool. So, that means you cannot import the dmp file into SQL Server.
Of course there are ways to transfer data from Oracle to SQL Server but which one is optimal depends on your needs, amount of data, number of tables, number of Oracle schemas, datatypes etc etc.

Is there any easy way to save BLOB into client-side file system in Oracle?

Is there any easy way to save BLOB as a binary file into client-side file system with using of only standard Oracle utilities (such as sqlplus or sqlldr for example)?
I've already looked onto UTL_FILE package, but actually I have two problems with it:
I have doubts that it can work with client-side file system.
I have no privilege to CREATE DIRECTORY in schema where BLOBs are saved and so that I can't work with UTL_FILE at all.
Also, I know that I can just write some homebred utility in any language (Java for example); connect to Oracle, select my BLOB and save it in binary format. But I'd look for some easier way before doing this.
Would you really want a database writing a BLOB, for example winword.exe, to your local PC ? This is the sort of thing that is intentionally quite protected.
It is very client driven, so the best place to start is with whatever is running on your local machine. I'd go with a Java routine, or if you've got APEX running, a simple procedure that will push the BLOB out through the browser and let the browser prompt you for what to save it.

What is Oracle SQL Loader?

What is Oracle SQL Loader and what is it used for?
SQL Loader is utility provided by Oracle which enables us to load data from flat files into database tables. It is well covered in the documentation (check the Utilities Guide). The key thing is that SQL Loader is an external OS program.
External tables were introduced in Oracle 9i, allowing us to define tables whose data is supplied from flat files. These provide most of the functionality of SQL Loader with a lot more convenience. For instance we can manipulate and re-format the data using SQL functions which is simpler than using SQL Loader's syntax. It also means that we can pull the data from inside the database rather than pushing it from the OS.
However, for loading huge volumes of data in ultra-quick time a well-tuned SQL Loader control file will beat external tables for performance. Also, if there is a complicated OS process associated with the data files - e.g. ftp, gunzip, pre-processing with sed or awk - it can be more convenient to call SQL Loader from inside the shell script rather than attempting to hook up with a database job. So SQL Loader is still useful in certain scenarios but it is not necessarily the automatic first choice.
It is one of Oracle's bulk data loading tools.
You use it to load data from flat files (such as CSV) into the database.
For details, please check their documentation (or this FAQ)
To transfer data from one Oracle database to another oracle database, we use oracle data pump. And in oracle versions previous to 10g we use oracle export/import. But if you want to transfer data from a non oracle database to an oracle database, you create a flat file of the data in the non oracle database and using SQL Loader load the data into oracle database.
Following is procedure to load the data from Third Party Database into Oracle using SQL Loader.
1.Convert the Data into Flat file using third party database command.
2.Create the Table Structure in Oracle Database using appropriate datatypes
3.Write a Control File, describing how to interpret the flat file and options to load the data.
4.Execute SQL Loader utility specifying the control file in the command line argument

Resources