Oracle SQL Developer - Data Miner Repo - Task failed - oracle

I've been fighting against oracle sql developer for about two days and I just can't get the thing to work.
I would like to learn more about data mining and take a look at their examples and work threw their tutorials, but I cant even get the thing setup.
What I did:
Installed Oracle 12_1 database + oracle_examples.
I then created an administrator account via the oracle sql developer.
connection name: admin
username: sys
password: password
Role: sysdba
SID: orcl
Everything else was left as it is.
I then had to install all the example .sql files manually.
I followed the guide from here: Oracle Install Example Schemas
I did everything exactly the same as the guide told me to do, except I had to do this "hack" command which allowed me to create users. Else I would always get the
ORA-65096: invalid common user or role name
alter session set "_oracle_script"=true;
The new users now show up in every connection that I create in my SQL Developer under "other users". (HR, OE, etc..)
Now I created a new user "dmuser" like the guide told me to do here: (yes - with sql plus)
Oracle create a datamining user
Now I wanted to install the data miner repo. Which should be very easy:
Tools, data miner, make visible. And the data miner window showed up. I then added my dmuser connection, double click dmuser to install the data miner repository. I then press start to install the repo and then it says "Task Failed" with the MOST useless error message I have ever seen:
anonymous block completed
anonymous block completed
Drop public synonyms created by ODMRSYS.
anonymous block completed
anonymous block completed Total Number of Objects: 0
Total Number of Objects Dropped: 0
Total Number of Objects Failed to Drop: 0
Can anyone help me resolve this issue? My guess would be that the "hack" command which I used to create all the users messed something up, but I'm not sure. I'm very new to Oracle, so I have no idea what I'm actually doing here, so please have some mercy on me.
Thanks in advance.
Hope someone can fix this mess.

Aight, be prepared for a complicated answer...
Sql developer exectues a .sql file to install the data miner repo.
The sql is named "installodmr.sql". Found the info here:
Install repo by script
I had a look at the script and what it does. It opens more scripts which insert tables, and users and grant privileges etc...
The problem why the script would not execute correctly was due to a couple of reasons.
1) As mentioned in my question, I can't just create a user, I have to type the command:
alter session set "_oracle_script"=true
The script calls other scripts that then want to create user, which in my case was not allowed and caused the ORA-65096 error.
So I had to insert the alter ... command before the script called another .sql file.
2) The path to the .sql files was not correctly set and it could not find the files which caused problems. They where referenced like this:
##file.sql
I changed it to the direct path:
#C:\Oracle\product\12.1.0\home\sqldeveloper\dataminer\scripts\file.sql
I let the script run and it worked.
Now data miner repo is installed.
Wuhey! :)

Related

How to create olap user in oracle?

I am trying to build Olap. While building an error has been occurred. First of all, I downloaded olaptrain schema, then I opened a command prompt on the olaptrain folder, then I logged on sqlplus with sysdba. After that, when I Write "#Install_olaptrain", I got an error "ORA-01919 role Olap_User Not Exist". What is the source of error? How can we create that role? Error
Well, creating a role is a simple task:
create role olap_user;
but I'm not sure it is the way to go. I'd expect the script to contain all info it needs to complete successfully (which includes the abovementioned create role). Anyway: create it, it won't do any harm, but might help.

Using Oracle "Create User" command does not automatically create an associated schema

I'm just getting started with Oracle data export and import and things worked perfectly fine the first time around. But then I came back next day repeated the exact same steps on the same systems, but get ORA-01435: user does not exist error.
System Specs for all machines:
-OS: Windows 2012 R2 x64
-Oracle Server: Oracle 11G Express x64
Objective:
I'm exporting data from Oracle server 1 and importing to Oracle server 2.
Procedure:
Export data dump is successful from Oracle server 1.
but when importing the data dump on Oracle server 2, I follow this procedure:
-Stop IIS service
net stop WAS
Create Schema/user account and Grant privileges before import
net stop WAS
sqlplus / as sysdba;
CREATE user PIE1 identified by PASS1;
GRANT ALL PRIVILEGES TO PIE1;
GRANT IMP_FULL_DATABASE TO PIE1;
According to oracle, all goes well, but look at the first image bellow. In DBeaver, I can see that only the User account PIE1 has been created, but NO schema.
Oracle issue 1. User account created, but not the Schema
Question 1: According to Oracle, the command "Create User" IS supposed to also create an associated Schema. Anyone have an idea why this is no longer working for me? It worked once the night before.
I then continue the import procedure as follows:
imp PIE1/PASS1#xe file=c:\Backups\AVUSER2_6_7.dmp log=c:\Backups\import.log fromuser=AVUSER2_6_7 touser=PIE1;
But get the following error:
Oracle claims the User doesn't exist even though it does
Oracle claims the User doesn't exist even though it does. I repeated the entire procedure and even created an identical import/export user account and credentials, and this error still comes up.
Question 2: Any idea why Oracle "Can't find" a user account that's clearly in the database?
Additional Info:
Checked that my windows account is in admin group
Checked that my windows account is in ORA_DBA group
Opened all CMD prompt as Admin
As you implied, users and schemas as the same in Oracle, you can't have a user without a schema. No idea about DBeaver, but as there are other users that aren't listed under 'schemas' (according to your second image - ANONYMOUS, DIP, ...) that seems to be unrelated.
(Purely a guess, but perhaps the user you're connect as in DBeaver just doesn't have visibility of any objects owned by those users - maybe it only lists users it can see in all_objects, say. Pure speculation, but you could investigate that by looking at the data dictionary while connect through SQL*Plus as the same user. According to this old forum post, there is an option to hide empty schemas...)
The import is connecting successfully as PIE1 - you'd get a different error, ORA-01017, if it wasn't and you wouldn't see the 'Connected to...' banner or anything after that.
Your import command has a trailing semicolon that should not be there. The "importing ... objects into" message shows that it's trying to import into the PIE1; user and not the one you actually created, PIE1. Remove that semicolon and try again.
Incidentally, you can probably also remove the #xe TNS alias and stick to a local connection, assuming the environment is configured as it was whenyou ran SQL*Plus. You should also consider using datapump expdp/impdp rather than the legacy exp/imp.

Oracle XE 11g (windows 8) I can't connect to the Database (idle instance)

Hi I have problem with idle instance
When I trying:
sqlplus / as sysdba
I get result: Connected to an idle instance.
And when I try startup I get:
ORA-01078: failure in processing system parameters
ORA-01565 error in identifying file 'C:\oraclexe\app\oracle\product\11.2.0\server\dbs/spfileXE.ora
ORA-27041: unable to open file
ORA-04002: unable to open file
O/S-Error: (OS 2) File not found;
My system is Windows 8. Do you any idea how to solve it?
SOLUTION:
I have to startup using command:
startup pfile='<path to file>/init.ora'
and change all paths in init.ora where was
<ORACLE_BASE>
Thx for help
I've got that pain too.
To install Oracle XE you should login as local admin - NOT domain account.
This https://community.oracle.com/thread/2361291 made me happy :)
I just had the same problem.
You just have to start the setup to install the database as administrator.
After this and a reboot everything works fine.
I highly recommend reading the Oracle® Database 2 Day DBA manual, or hire a dba.
You are missing the init{ORACLE_SID}.ora, the parameter file which contains things like database name, controlfile locations. the init{ORACLE_SID}.ora is a text file that is edited with a regular text editor. This file can be converted to a spfile{ORACLE_SID}.ora that can be edited using a database instance. This is also a dynamic parameter file meaning that when you change parameters in an instance, the parameters can also be recorded in the spfile for later reuse.
For now add the db_name and control_files. Make sure that the contol_files parameter points to an existing controlfile[s]. If there are no existing control_file[s], just trash the initXE.ora, spfileXE.ora and start dbca, the Database Configuration Assistant and using that create a new database.

Pre-Installation Check Mantis: can't install

I am trying to install Mantis on my server. Problem is that I can't seem to get pass the Pre-Installation Check step. I click on "Install/Upgrade Database", and displays all "GOOD". Then it says:
Database Creation Suppressed, SQL Queries follow
<< here it prints a lot of sql queries, mainly create and alter tables >>. When I say this the first time, I went to MySQL Workbench, (the database bugtracker was already created), and ran the script given. Thereby, creating all the needed tables.
Then it says:
Your database has not been created yet. Please create the database, then install the tables and data using the information above before proceeding.
It checks a few more things (all with result "GOOD") and finally it displays this message:
Install was successful.
Continue to log into Mantis
The previous word "Continue" appears as a hyperlink leading to login_page.php. When I click it, it leads right back to this pre installation check page.
The thing is, the database is created! And the first time I encountered the sql queries I ran them, so the tables are indeed created.
Attempting to connect to database as admin GOOD
Attempting to connect to database as user GOOD
Checking Database Server Version
Running mysql version 5.5.25
My PHP version is 5.3.14.
The Mantis version i'm trying to install is 1.2.11.
Any ideas as in what it is I am doing wrong? Or any other piece of information I could provide?
I realize now that this is not the best place for this question. Nonetheless, in case someone else happens tu stumble across this, I wanted to let know the only workaround I could find was installing another Mantis version: 1.1.1. Very old, but it worked!

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