Welkom, Gast. Alsjeblieft inloggen of registreren.


Login met gebruikersnaam, wachtwoord en sessielengte

Zoek


Geavanceerd zoeken

6.786 aantal berichten in 2.016 topics- door 3.708 geregistreerde leden - Nieuwste lid: morphin1112
WindowsOnline, Het Windows en Hardware forum!WindowsWindows Server 2003 en NTTopic: Error when executing cmd script on Windows server 2003
Pagina's: [1]   Omlaag
Print
Auteur Topic: Error when executing cmd script on Windows server 2003  (gelezen 5839 keer)
oraclechick
Newbie
*
Offline Offline

Berichten: 1


Bekijk profiel
« Gepost op: 02 Oktober , 2010, 14:37:56 »

Hi,

I'm new at scripting and am trying to write en simple cmd script but keep getting the following error when i execute it:

'■F' is not recognized as an internal or external command,
operable program or batch file.


This is the script below - I'm trying to do an export of an Oracle database.

Code:
FOR /F “TOKENS=1* DELIMS= ” %%A IN (’DATE/T’) DO SET CDATE=%%B
FOR /F “TOKENS=1,2 eol=/ DELIMS=/ ” %%A IN (’DATE/T’) DO SET mm=%%B
FOR /F “TOKENS=1,2 DELIMS=/ eol=/” %%A IN (’echo %CDATE%’) DO SET dd=%%B
FOR /F “TOKENS=2,3 DELIMS=/ ” %%A IN (’echo %CDATE%’) DO SET yyyy=%%B
SET date=%dd%%mm%%yyyy%
SET filename=exp%date%

expdp system/**** FULL=y DIRECTORY=dmpdir DUMPFILE=%filename%.dmp LOGFILE=%filename%.log

When I execute each statement manually, then I get the following error:

Export: Release 10.2.0.1.0 - Production on Zaterdag, 02 Oktober, 2010 14:06:11
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39157: error appending extension to file "fullXEexp%dd%%mm%%yyyy%.log"
ORA-09314: sltln: error translating logical name
OSD-04503: text contains no translatable elements


When I execute only the expdp statement manually, without trying to append the date to the filename, it works fine!

In my cmd script, if I remove everything except the expdp statement (therefore no date attached to filenames), I get this error when executing the script (eventhough it works fine when executed manually):

'■e' is not recognized as an internal or external command,
operable program or batch file.


Does anyone know why I'm getting this error and how to solve it?
Gelogd
juliantje15
Jr. Member
**
Offline Offline

Geslacht: Man
Berichten: 65



Bekijk profiel WWW
« Antwoord #1 Gepost op: 20 April , 2011, 21:47:55 »

'■F' is not recognized as an internal or external command,
operable program or batch file.


'■e' is not recognized as an internal or external command,
operable program or batch file.



It means that you used an wrong syntax. try an other;)
Gelogd

The Experience of Windows
renevanh
Global Moderator
Hero Member
*****
Offline Offline

Berichten: 1.247



Bekijk profiel WWW
« Antwoord #2 Gepost op: 21 April , 2011, 10:52:39 »

You are probably running the script not from within the folder where the Oracle tools are or the Oracle folder is not set as part of the system environment.
Therefor, the script can not find the expdp executable.
Gelogd

Keyboard not found, press F1 to continue...
Pagina's: [1]   Omhoog
Print
WindowsOnline, Het Windows en Hardware forum!WindowsWindows Server 2003 en NTTopic: Error when executing cmd script on Windows server 2003
Ga naar: