write command log to file in window - windows

I want to write log of following command to file in window:
C:\Users\The Linh>IMP system/Thelinh05#orcl FILE= D:\source\rabbit\db_dmp\billus
er.dmp FULL=Y IGNORE=Y;
(This command use to import data in to oracle).
I try to use this command:
C:\Users\The Linh>IMP system/Thelinh05#orcl FILE= D:\source\rabbit\db_dmp\billus
er.dmp FULL=Y IGNORE=Y;>log.txt
But it not write log to file. The output in command line is:
Import: Release 11.2.0.1.0 - Production on Thu Jan 14 16:32:47 2016
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
IMP-00058: ORACLE error 1017 encountered ORA-01017: invalid
username/password; logon deniedUsername:

I've found solution for this problem. use below command:
IMP system/Thelinh05#orcl FILE= D:\source\rabbit\db_dmp\billuser.dmp
FULL=Y IGNORE=Y logfile=log.txt

Related

Not able to use tkprof utility

Hi I have below trc file. When i am using tkprof it is giving error.
-bash-4.1$ ls -ltr ac1dv224_ora_7223_1509935.trc
-rw-r----- 1 oracle dba 4388454 Dec 4 03:14 ac1dv224_ora_7223_1509935.trc
-bash-4.1$
-bash-4.1$ tkprof ac1dv224_ora_7223_1509935.trc ac1dv224_ora_7223_1509935.out
TKPROF: Release 10.1.0.5.0 - Production on Fri Dec 4 03:14:49 2020
Copyright (c) 1982, 2005, Oracle. All rights reserved.
could not open output file ac1dv224_ora_7223_1509935.out
Could you please help me to do that. I am new in database.
I also tried below command, still getting same error.
-bash-4.1$ tkprof ac1dv224_ora_6811.trc translated.txt explain=apps/apps table=sys.plan_table sys=no waits=yes

I can not import oracle database from another user

I exported oracle database from user c##cuongnguyen. After i exported, i had dump file , So i want to import this file to another user: mbbank
So i run this syntax:
**
imp mbbank/xxxxxx FROMUSER=c##cuongnguyen TOUSER=mbbank
file=C:\oracle\export\cuongnguyen-user.DMP;
**
I recieved the response, it's about character.
Import: Release 12.2.0.1.0 - Production on Wed Apr 22 19:30:22 2020
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights
reserved.
Connected to: Oracle Database 12c Enterprise Edition Release
12.2.0.1.0 - 64bit Production
Export file created by EXPORT:V12.02.00 via conventional path
Warning: the objects were exported by C##CUONGNGUYEN, not by you
import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR
character set import server uses AL32UTF8 character set (possible
charset conversion) IMP-00085: multiple input files specified for
unbounded export file IMP-00000: Import terminated unsuccessfully
If you have any ideas, please tell me know, Many thanks
Have you tried to run the command inside the directory where the dmp file is located? Or even put the directory path between ''?
cd C:\oracle\export
imp mbbank/xxxxxx FROMUSER=c##cuongnguyen TOUSER=mbbank file=cuongnguyen-user.DMP
or
imp mbbank/xxxxxx FROMUSER=c##cuongnguyen TOUSER=mbbank file='C:\oracle\export\cuongnguyen-user.DMP'
Just for your knowledge, oracle has a more improved database export and import tool: expdp and impdp. And you can do it in your own way:
Creating a directory of export inside database:
$ORACLE_HOME/bin/sqlplus '/ as sysdba'
SQL> create or replace directory export as 'C:\oracle\export';
Exporting the schema:
expdp mbbank/xxxxxx dumpfile=cuongnguyen-user.DMP directory=export schemas=c##cuongnguyen
Finally importing as a new user:
impdp mbbank/xxxxxx dumpfile=cuongnguyen-user.DMP directory=export schemas=c##cuongnguyen remap_schema=c##cuongnguyen:mbbank

ORA-39002, ORA-39070, ORA-29283, ORA-06512 and ORA-29283 when executing a .sh

I'm trying to import a backup onto another database.
Here's my "imp_schema.sh" file:
impdp userid=system/admin2018#NODO1 content=data_only full=n schemas=prueba directory=BACKUPS dumpfile=full_import.dmp logfile=prueba.log
So, I log in (On the source server) as oracle/oracle and do the following:
$ bash
bash-3.00$ cd /oradata2/backups/
bash-3.00$ ./imp_schema.sh
Import: Release 11.2.0.1.0 - Production on Tue Feb 6 11:10:36 2018
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
bash-3.00$
The .dmp and .sh file are both inside "/oradata2/backups/"
Doing a
SELECT DIRECTORY_NAME, DIRECTORY_PATH FROM DBA_DIRECTORIES;
on the Source Directory through SQL shows the directory as:
DIRECTORY_NAME DIRECTORY_PATH
BACKUPS /oradata2/backups
Why am I having this error?

SQL*Loader error ORA-00604 and ORA-02248

I've a Problem with Oracle's SQL*Loader.
SQL*Loader: Release 11.2.0.3.0 - Production on Tue Feb 11 14:32:00 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
SQL*Loader-128: unable to begin a session
ORA-00604: Fehler auf rekursiver SQL-Ebene 1
ORA-02248: Ungültige Option für ALTER SESSION
This Errormessage occurs in the Errorlog after execute sqlldr with the following control and data file:
sqlldr statement:
sqlldr userid=%PW%/%Name%#%DBname% control=ABGRENZUNG_control.dat log=loader.log
ABGRENZUG control file
load data
INFILE 'ABGRENZUNG.dat'
INTO TABLE ABGRENZUNG
APPEND
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(AVG_RESTSCHULD,DATUM,DISAGIO,GEBUEHR,NOMZINS,REF_KEY,RESTSCHULD,STEUER_TYP,TYP,ZINSBETRAG,ZINSTAGE)
ABGRENZUNG.dat:
,20040630,0,0,,7514,3091209.0914799999,"S","T",11147.31048,
,20040731,0,0,,7514,3105526.7633799999,"S","T",17645.6519,
,20040831,0,0,,7514,3119926.1653200001,"S","T",17727.38194,
,20040930,0,0,,7514,3134407.7638500002,"S","T",17809.57853,
,20041031,0,0,,7514,3148972.0281699998,"S","T",17892.24432,
,20041130,0,0,,7514,3163619.43016,"S","T",17975.38199,
,20041231,0,0,,7514,3178350.44441,"S","T",18058.99425,
,20050131,0,0,,7514,3193165.5482000001,"S","T",18143.08379,
,20050228,0,0,,7514,3208065.2215300002,"S","T",18227.65334,
,20050331,0,0,,7514,3223049.9471700001,"S","T",18312.70564,
,20050430,0,0,,7514,3238120.21062,"S","T",18398.24345,
,20050531,0,0,,7514,3253276.5001599998,"S","T",18484.26954,
,20050630,0,0,,7514,3268519.3068400002,"S","T",18570.78669,
,20050731,0,0,,7514,3283849.1245499998,"S","T",18657.79771,
,20050831,0,0,,7514,3299266.44997,"S","T",18745.30542,
,20050930,0,0,,7514,3314771.7826299998,"S","T",18833.31265,
,20051031,0,0,,7514,3330365.6248900001,"S","T",18921.82226,
,20051130,0,0,,7514,3346048.4819899998,"S","T",19010.83711,
,20051231,0,0,,7514,3361820.8620799999,"S","T",19100.36008,
,20060131,0,0,,7514,3377683.27617,"S","T",19190.39409,
,20060228,0,0,,7514,3393636.2382,"S","T",19280.94203,
,20060331,0,0,,7514,3409680.2650600001,"S","T",19372.00686,
,20060430,0,0,,7514,3425815.8765699998,"S","T",19463.59151,
,20060531,0,0,,7514,3442043.5955400001,"S","T",19555.69896,
,20060630,0,0,,7514,3458363.9477300001,"S","T",19648.33219,
before executing the sqlldr statement I set these options.
set nls_lang=AMERICAN_AMERICA.WE8MSWIN1252
set nls_date_format='YYYYMMDD'
It seems that the problem occurs because of the NLS parameters. There must be a conflict with the nls_session(or database)_parameters.

INTERNAL ERROR :Failed assertion [PGE code :90105]

While trying to compile sample code with the Pro*C compiler I am getting:
c:\oracle\product\11.2.0\dbhome_1\BIN>proc iname=C:\Users\Selvaganapathy\Desktop
\pro-c\code\sample.pc
Pro*C/C++: Release 11.2.0.1.0 - Production on Mon Aug 6 01:00:59 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
System default option values taken from: C:\oracle\product\11.2.0\dbhome_1\preco
mp\admin\pcscfg.cfg
INTERNAL ERROR: Failed assertion [PGE Code=90105]
Please help to set up the compiler.
Check if you have the temporary file
C:\Users\Selvaganapathy\Desktop\pro-c\code\sample.c
If it exists, retry after deleting this file or provide write permission to it.

Resources