on 11-03-2016 3:02 PM
We are getting the following error message when running a backup: SQL Anywhere Backup Utility Version 12.0.1.3726 Error writing backup file "Invalid argument"
Database backup failedAny assistance would be appreciated.Hi Jonathan,
It could be helpfull to extend the batch script to echo the issued commands and parameters to the log file.
Example:
ECHO dbbackup -r -y -c "dsn=%CONNECTIONIFO%" -o %ERRORLOGDIR%\%ERRORFILE% %BACKUPDIR% >>%ERRORLOGDIR%\%ERRORFILE%
dbbackup -r -y -c "dsn=%CONNECTIONIFO%" -o %ERRORLOGDIR%\%ERRORFILE% %BACKUPDIR%
While testing the example I noticed one missing argument for DBBACKUP: the target directory is not specified. Without that it won't backup anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the target directory is not specified.
Hm, in my understanding, the last parameter of the command
dbbackup -r -y -c "dsn=%CONNECTIONIFO%" -o %ERRORLOGDIR%\%ERRORFILE% %BACKUPDIR%
namely %BACKUPDIR% should specify the target directory, so it should work unless that parameter is not filled as expected.
However, I would
Note the double quotes around the command name because of possibly spaces in the SQL Anywhere 12 install dir.
Hi Jonathan,
> They upgraded their server a month ago and since then,
What did they upgrade?
Can you execute this batch file in other environment? At first, I doubt environment.
Secondly, the SQL Anywhere 12 fixed some problems after this version.
For example,
================(Build #4211 - Engineering Case #777043)================
If the Backup utility (dbbackup) was used to back up a database that had
no transaction log, and the -n and -r switches were used, dbbackup would
crash. This has been fixed.
The latest edition of version 12 is 4436 now.
Please confirm the following.
2374897 - SQLAnywhere 12.0.1 SP109 Build 4436 Release Notes Information
https://launchpad.support.sap.com/#/notes/0002374897
I recommend upgrading to the latest build.
Thanks,
Atsushi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, it's been created. Here is a piece of it. Let mw know if you need anything else. Thanks!
SQL Anywhere Information Utility Version 12.0.1.3726
Database : d:\database\rps.db
Log file : d:\database\rps.log
Log mirror: none
Page size : 4096
Encrypted : No
Strings padded with blanks for comparisons: No
CHAR collation sequence: 1252LATIN1(CaseSensitivity=Ignore)
CHAR character set encoding: windows-1252
NCHAR collation sequence: UCA(CaseSensitivity=Ignore;AccentSensitivity=Ignore;PunctuationSensitivity=Primary)
NCHAR character set encoding: UTF-8
Database checksums enabled: Yes
Encrypted tables supported: No
SQL Anywhere Backup Utility Version 12.0.1.3726
Error writing backup file "Invalid argument"
Database backup failed
12:12 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The script creates a file to log errors. Has it been created and does it contain any infos?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Atsushi. They run the batch file below to run a nightly backup of the .db and .log file. They upgraded their server a month ago and since then, the backup has been failing occasionally with the message previously provided (Error writing backup file "Invalid argument". Database backup failed). Thanks for your help!
REM OBDC Connection Name
SET DSN=RPS
SET BACKUPDIRROOT=D:\DBBACKUP
REM Create backup directory if it does not exist.
IF NOT EXIST %BACKUPDIRROOT% mkdir %BACKUPDIRROOT%
REM Create backup directory if it does not exist.
SET BACKUPDIR=%BACKUPDIRROOT%
REM ===================================================================================
REM Directory used to store to log information of the backup
SET ERRORLOGDIR=D:\DBBACKUP\LOG
REM Log file name
SET ERRORFILE=ERRORLOG.TXT
IF NOT EXIST %ERRORLOGDIR%\%ERRORFILE% mkdir %ERRORLOGDIR%
del %backupdirroot%/*.db
REM ===================================================================================
Rem Start logging information on backup
rem ECHO DATE : >> %ERRORLOGDIR%\%ERRORFILE%
DATE /T >> %ERRORLOGDIR%\%ERRORFILE%
rem ECHO TIME : >> %ERRORLOGDIR%\%ERRORFILE%
TIME /T >> %ERRORLOGDIR%\%ERRORFILE%
:1_SKIP_TIME_INFO
REM ===================================================================================
REM RPS
SET CONNECTIONIFO=%DSN%
ECHO DATABASE CONNECTION : %DSN% >> %ERRORLOGDIR%\%ERRORFILE%
dbvalid -c "DSN=%CONNECTIONIFO%" -o %ERRORLOGDIR%\%ERRORFILE%
dbinfo -c "DSN=%CONNECTIONIFO%" -o %ERRORLOGDIR%\%ERRORFILE%
dbbackup -r -y -c "dsn=%CONNECTIONIFO%" -o %ERRORLOGDIR%\%ERRORFILE% %BACKUPDIR%
rem ECHO Backup completed >> %ERRORLOGDIR%\%ERRORFILE%
rem ECHO TIME : >> %ERRORLOGDIR%\%ERRORFILE%
TIME /T >> %ERRORLOGDIR%\%ERRORFILE%
:2_SKIP_TIME_INFO
GOTO ENDPROC
:ERROR_ROT
:ENDPROC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jonathan,
Can you explain the reproduction procedure of this phenomenon?
Thanks,
Atsushi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.