Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
I have a data dmp file exported from one schema user1 using the exp commandline utility.
I want to import this dump onto another newly created (empty) schema user 2 using the imp commandline utility.
I tried a few things like:
imp system/password#tesdb fromuser=user1 touser=user2 file=E:\Data\user1.dmp log=E:\Data\user1.log
I get an error
IMP-00002: failed to open user1.dmp for read
Import file: EXPDAT.DMP >
Any help appreciated.
After you correct the possible dmp file problem, this is a way to ensure that the schema is remapped and imported appropriately. This will also ensure that the tablespace will change also, if needed:
impdp system/<password> SCHEMAS=user1 remap_schema=user1:user2 \
remap_tablespace=user1:user2 directory=EXPORTDIR \
dumpfile=user1.dmp logfile=E:\Data\user1.log
EXPORTDIR must be defined in oracle as a directory as the system user
create or replace directory EXPORTDIR as 'E:\Data';
grant read, write on directory EXPORTDIR to user2;
The issue was with the dmp file itself. I had to re-export the file and the command works fine. Thank you #Justin Cave
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
First of all, I am almost totally ignorant when it comes to Oracle. I've dealt with SQL Server for many years, so I am familiar with SQL in general.
I have a Schema (which I think is the equivalent of a database in SQL Server?) and it has tables under it. I know the tables exist. I have a linked server connection to them from SQL Server and I see the tables and the data. I was able to get to these tables before in SQLPlus and SQL Developer using the ALTER SESSION SET CURRENT_SCHEMA MySchema command.
Now when I try to query those tables I get
ORA-00942: table or view does not exist
00942. 00000 - "table or view does not exist".
I'm logged in with the System account, which is the same account my Linked Server is using, and my understanding was that System should have access to all schemas and tables.
My fear is that I somehow messed up permissions to System and it can't see the schema anymore. Is that possible?
You need to consider name resolution as well as access privileges.
You are connected to an account with godlike powers (generally inadvisable, by the way, rather like logging in as root in Linux), but that on its own doesn't help to resolve a reference to EMPLOYEES when it's a table in the HR schema (for example). For that you would need to either
Refer to HR.EMPLOYEES, or
Create a private synonym belonging to the account you'll be using, defining EMPLOYEES (or whatever you want) as a reference to HR.EMPLOYEES, or
Create a public synonym, or
alter session set current_schema = HR.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 3 years ago.
Improve this question
I learning to use Oracle database, and I just installed Oracle Database 12c Release 2 on my Ubuntu 18.04.
I login as sysdba with this following command:
sqlplus / as sysdba
So far all thing working and I got this message:
Connected to an idle instance.
Now, I want to start my server with this following command:
SQL> STARTUP
But, the thing that make me confuse are I got this error message:
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/12/dbhome_1/dbs/initSID.ora'
I checking it out on that directory, and the initSID.ora was missing.
So, where I can find the missing file..?, how to fix it..?
You need to create an SPFILE in /u01/app/oracle/product/12/dbhome_1/dbs directory to be able to start the database by only using STARTUP command.
If there's no SPFILE then a PFILE should explicitly be specified with the STARTUP command as
SQL> STARTUP PFILE=/u01/app/oracle/product/12/dbhome_1/dbs/initSID.ora
assuming you have a PFILE named initSID.ora in that directory.
Finally I figure out this by following #Tejash----ORA-00980 instructions to create a database.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I used Database Configuration Assistant to create new database but afterwards notice all exsiting database user disappeared. Please help!
how you are checking the users?
run > cmd
set ORACLE_sid=<database_name_here>
sqlplus / as sysdba
select username from dba_users;
I bet you've created the new database and are logged into it instead of the existing instance (maybe?)
Check which database you are in 1 of two ways:
echo $ORACLE_SID or select name from v$database;
If you find you are logged into the new instance find your old one and switch to it:
Find all SID's installed in your environment: cat /etc/oratab
Switch to it: . oraenv then enter in the appropriate SID you found in the oratab.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Can the migration file be reused?
In my project,I use the migration to make the database table.
And then I sent to my friend.
But he can't use the migration command to get these tables;
Always 'Nothing to migrate',So,May I ask how you do that?
Nothing to migrate appears only if Laravel detected that migration done already. Now question is, how Laravel detect migration already done?
if you go to your database (using PhpMyadmin or Sequel pro), you will see there is a table called migrations. Laravel store all migration information to the migrations table. Do not share this table with your friend. . If you share the table already, ask your friend to empty the table.
Than run the migration again.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm studying Oracle database and have to do some exercises with default "HR" schema. But I think that data in my tables is changed from default values (many students have access to DB and may be someone changed data). Where can I get SQL to construct default "HR" schema?
check here the schema is in a zip file
http://code.google.com/p/adf-samples-demos/downloads/detail?name=demoscripts.zip&can=2&q=
Just wanted to update this post that the above link won't work:
Try this instead:
http://www.oracle.com/technetwork/developer-tools/datamodeler/sample-models-scripts-224531.html
And refer this also:
http://st-curriculum.oracle.com/obe/jdev/obe11jdev/11/common/connection11g.htm#t1
Hope this helps!!
If practicing using HR Schema is your requirement, you can use the Oracle Live SQL. It has the HR Schema for you to play around with.
https://livesql.oracle.com
Old question but high Google page rank, so here goes:
They are hosted by Oracle on Github now (as of 2018):
https://github.com/oracle/db-sample-schemas
See this link: http://download.oracle.com/docs/cd/B19306_01/server.102/b14198/installation.htm#sthref33
It's under $ORACLE_HOME/demo/schema/human_resources
I was working on a database connected via SQL developer and could not find HR schema. I wanted to create the HR schema using SQL queries. I used below scripts one by one and create the schema with the SYS user:
Check here: https://support.dbagenesis.com/knowledge-base/script-to-create-hr-schema/