sqlldr on oracle 10g - oracle

I have an assignment in a class which requires the transfering of data from tables in one schema to another using the sqlldr tool. I have set up my control files, and text files(.csv files if you prefer) in order to transfer the data using sqlldr. Now I am using ORACLE 10g Enterprise Edition Release 10.2.0.1.0. I am all ready to go but when I type in the sqlldr command, or event just "sqlldr" I get the unknown command message. Am i just completely off or does this mean this utility isnt available on this version? I have the ingredients needed to make it happen but I cant figure out why I cant get sqlldr to run. Perhaps someone can point me in the right direction. Below is the specific syntax we were given in class.
sqlldr username/password control=loadsals.ctl

The user you are logged in under does not have access to SQLLDR. You will need to elevate your access via sudo or use another login that does have access.

Related

Is Oracle Database Supported in Joomla?

I would like to use Oracle database instead of MySQL in Joomla. Is this possible with Joomla, is there a workaround or a solution on how to implement Oracle database with Joomla? Any information will be greatly appreciated.
It is said that it can be done, but it is not a job for beginners and took those guys 3 working days to do it.
Here's why that combination doesn't work by default:
The database and table creation script does not work without modification.
The connection and the database class are written to connect to MySQL and not to Oracle (so they all use MySQL functions).
Some of the extensions use native MySQL functions directly, instead of connecting using the Joomla Database interface (class).
This is what they did to make it work:
We fix the SQL installation script to accommodate the Oracle database in case of a new installation. In case of an existing installation, we export all the database, as well as its data to a SQL file, and then we modify the SQL file (using find and replace) to make it work with an Oracle database.
We load the modified installation file or the modified exported SQL file into the Oracle database.
We then create a copy of the Joomla database class, and then we modify all the functions to work with Oracle instead of MySQL.
We ensure that the Oracle drivers are properly installed and loaded by the php.ini file.
We rename the original MySQL database (you will know in the next step why) to something like database_name_old.
We switch to the new database class and fully test the website to see if some extensions are not working. If an extension ceases to work then it is a sign that this extensions is calling the original MySQL database (which no longer exists because it was renamed) directly.
Hopefully, you aren't a beginner and those guidelines will help you do it. Otherwise, check how much it might cost by visiting the page.

Change Oracle Apex apps to another Database on same system

Good Day. I have a situation which I am unsure of how to solve. I have searched numerous places and found nothing concrete.
The scenario:
I have 3 Oracle Apex 5 applications running on a single server using Oracle Express locally in order to run the app. I however had to go to Oracle 12c which is installed as a separate instance on the same server and it's listener is now listening on 1522 where XE is still listening on 1521.
I am needing to find a way to export the schema, tables, apps etc. into 12C from XE, then simply configure the apps to connect to the 12C instance and no longer on XE. I can then remove XE completely.
I know I am supposed to post what I have tried, but simply have no code, I have tried to do a export DDL but the script does not seem to carry the Schema data at all.
Question: How can I migrate everything on the XE instance to the 12C instance without breaking either instances.
Any direction would be appreciated.
Two steps: data(base) migration & (Apex) application migration.
The simplest way to move data is to perform export and import. Although you can use the original EXP and IMP utilities, consider using modern Data Pump Export and Import.
EXP and IMP are somewhat simpler; export (DMP) file is created on your disk
Data Pump requires you to create an Oracle directory (object) which points to a directory on the disk. As it is XE installed on your computer, no problem if it is, for example, C:\Temp
syntax is very similar in both cases, especially if there's nothing fancy in your data
The second step is application migration; you should first install Apex in the new Oracle 12c. Make sure it is up and running (create a workspace, assign a schema (you've just imported) to it, create a developer).
Then export the Apex application(s) - if there are only a few of them, a simple way is to do export from the application itself (you'll see the "Export/Import" button in the "main" application page within the App. Builder). Follow the wizard. The result will be a plain textual (.SQL) file.
In Apex on 12c, revert the process - do the Import by navigating to previously exported .SQL file, follow the wizard once again. Once the import is finished, you should be able to run the application.
Good luck!

How can I make local connection in Oracle SQL Developer?

I have downloaded the SQL Developer. Currently, I am using my school database but it is for temporary use. I want to use it after finishing my college. I do not know how can I make local connection in SQL Developer. Can you please help me in this.
Oracle SQL Developer is a tool you use to access an Oracle database.
So, if you want to use Oracle on your own computer, regardless there is (or is not) a connection to your school network, you'll have to install the database as well. I'd suggest Oracle 11g Express Edition. The installation process is simple; more or less, clicking NEXT a few times does the job. I'd, though, recommend you to follow the Installation Guide and pay attention to what the Installer asks (for example, write down passwords you choose).
Furthermore, in order to "copy" the database (actually, I believe you mean "schema" in this case) to your database, the right way to do that is to use Data Pump. You'd use Export in school to export the database, and Import on your computer to import it.
However, as Data Pump requires access to a directory (it is an Oracle object which points to a file system directory, usually on the database server; it is created by SYS and other users are granted read and/or write privileges on it). If you can't get access to it, you can use the original EXP and IMP utilities. EXP creates the DMP file locally; you'd put it onto a memory stick (or, if you're on the network, copy it directly to your PC) and import it.
If you're unsure of whether you can (or can not) do that, ask your teacher.
Once the schema is imported into your database, use SQL Developer to access it. Should be no problem to do that.

Oracle pl/sql Read the contents of a file from Physical Directory

My questions is as follows:
I am trying to create a script which will execute in sqlplus and what this script will do is that i will have a file in which you can write inside 1 name on every line. So i wanted to use an Associative Array in which i will read the contents of the file line by line (1 name on every line) and store every name in the array.
My problem is that i cannot use the UTL_FILE package which has a ready GET_LINE procedure to get the name of every line because it has to take as argument a "Logical Directory" of Oracle.
My issue is that i cannot make changes to the database like to create a new directory or use one of the default directories for the in file. I have to come to a solution in which i will read the contents of the file from a physical location.
I am kindly asking for some assistance in 2 fields. If you can please help me if you know any other package which can work on a physical location or if know any other way in which maybe i can call sqlplus (sqlplus username/pass #myscript) and give there as an argument the input file or like initialize the array from there.
Thank you in advance.
Any help would be highly appreciated
George
Clearly the best solution is to use UTL_FILE or external tables. So not being able to change the database is a major problem. If you don't have the permission to create a directory object and you cannot persuade a privileged user to do so on your behalf, then your question basically becomes
"How can I circumvent the security restrictions imposed on the database?"
Well, there are two possibilities.
If the DBAs have been careless enough to enable the UTL_FILE_DIR parameter in the init.ora file you may still be able to use UTL_FILE, by passing an absolute file path to FOPEN().
Alternatively, you can write a Java Stored Procedure to interact with files on the OS. This requires privileges to be granted through the Java security model. Find out more. Again, you will only have this without asking if you have lax DBAs.
Let me make it clear, both these "solutions" are grey hat. You really should try to get the necessary privileges through the proper channels. If the DBA team won't create a directory are you can use you need to escalate it to your boss.
If you cannot make any change to the database and the existing database does not provide you the privileges you need, you're out of luck.
UTL_FILE either requires the presence of an Oracle directory object that points to a physical directory on the database server that you have privileges on or that you are using a physical directory that you have been given access to via the deprecated UTL_FILE_DIR parameter. It appears that you are stating that neither of these is a viable option. If that is the case, you cannot use UTL_FILE.
You could also create an external table that would read data from a file. That would require that you could create the Oracle directory object and the external table. Again, it sounds like you are saying that is not an option so external tables are out.
You could write a Java (or .Net if you're on Windows) stored procedure that would read from the file. That would require that you create the procedure and that you grant the owner the necessary file system privileges. It sounds like you're saying this is also not an option so Java stored procedures are out.
If you move the file to the client machine, you could use SQL*Loader on the client machine to load the data into a table in the database. That would require that you create a physical table in the database, though, which it sounds like you are saying is not possible. So SQL*Loader is out.
If you can move the file to the client, you could obviously write a program in whatever language you would like to read the file and build whatever PL/SQL block you'd like. But that won't work for files stored on the database server barring some sort of very odd permissions grants where your client machine can somehow mount a directory on the server.
So we're back to where we started. Reading a file from the server's operating system requires privileges to be able to read that file. You seem to be saying that you do not have and cannot get those privileges. Therefore, you're saying that you can't do what you want. Whoever in your organization is asking you to implement this change needs to talk with whoever is preventing you from getting the privileges you need to do your job. One of them needs to give ground.

In Access 2002, how can I transfer databases from multiple oracles sources?

I have some simple VBA to import tables from multiple Oracle databases. I have one ODBC entry, and I connect to different databases using different credentials.
My transfer database code is simple:
DoCmd.TransferDatabase acImport, "ODBC", "ODBC;DNS=source;UID=user;PWD=pass;", acTable, "SomeRemoteTable", "MyLocalTable", True
That code works, but when I run the same command with a different user/pass immediatley after this command I get this error:
Run-time error '3011': The Microsoft Jet database engine could not find the object 'SomeRemoteTable'. Make sure the object exists and that you spell its name and the path name correctly.
Here's the catch:
The DNS, user credentials, and table names are correct. If I open access and comment either line out, then either transfer will run successfully. However, once one command runs, the other will not run until Access has been closed and reopened.
I'm guessing that there must be a way to close the first connection before proceeding to the next. Does anyone have any ideas on what I can try?
If the databases are owned by you how about setting up a dblink on one of them to the other ?
You will then only need 1 connection.

Resources