I found below in Control-M message guide under Control-M/Server messages:
AP- 10 Execute Script Module: 4 - Failed to open output tmp file
Explanation: A Control-M database utility fails to open a temporary file.
Corrective Aciton: Contact BMC Customer Support
Can you try with double quotes for backup directory path to check if it works.
after double quotes backup directory I have to insert Admin pwd and remove logs param manually.
After inserting params following error comes up:
AP-11 - Validation of Input Parameters Modue: 9 - Failed to check directory
I am suggesting the obvious here (I don't have the same config as you) but would it be an idea to replace the %Datetime% variable with a string to represent that? Just to take that out of the list of possible issues.
Also, how do you find the PostgreSQL with Windows? I am a big fan of using the BMC-supplied PostgreSQL DB but have no recent experience of using Windows to host the Control-M Server.
yes that was also my idea but no success with it same issue after removing %Datetime%.
I'm not the admin in our company but as far as I can see PostgeSQL with Windows is running fine(except HotBackup )
1 of 1 people found this helpful
Add the option "-trace_level info" to the command line and execute the command again. This will increase the level of details in the log file.
After the command has failed, go to the folder, "E:\Program Files\BMC Software\Control-M Server\ctm_server\exe\DBUtils\DBUdata\log and view the latest DBUHotBackup*.log file. Hopefully, it will show you the cause of the error. Please post the contents of the log file if you need further assistance.
C:\CTM_BACKUP\BackupScript>"C:\Program Files\BMC Software\Control-M Server\ctm_server\exe\DBUtils\DBUHotBackup.exe" -BACKUP_DIRECTORY C:\CTM_BACKUP\WeeklyBackup\ -ADMINISTRATOR_PASSWORD XXXXXX -REMOVE_UNNECESSARY_LOGS N -trace_level info
Backup in progress, please wait...
AP-10 - Execute Script Module: 4 - Failed to open output tmp file
After command failed no logfile was created in the mentioned directory, btw there is no DBUHotBackup*.log in this folder.
Which user account are you using to execute the hot backup? Could it be that this account does not have any rights to create files in the Control-M directory. Try using an administrator account to execute the command again to see whether it works.
Lee Mun Keong
Mobile: +65 97498081
1 Scotts Road #24-10
Check the registry value of "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation".
If the registry key NtfsDisable8dot3NameCreation in Windows is set to a value of 1 then this disables the creation of short names for files and directories that are created. it uses ~ sign and remove the spaces in the names of files and directories.
Control-M uses short names when creating and accessing files in Windows. So, set the registry key to 0, reboot the Windows machine and then try again.
Hi Lee Mun,
with admin account I got a .log with following error:
VB-1100 - VB-1100 could not copy pgsql to backup directory, check robocopy log: %TEMP%\dbu_hot_backup\_err_D_M_YYYY_TIME
For that I found some documenation which I'll follow
I'll let you know if it works.
Thx for your help so far.
after changing like mentioned in DOC-65997 I got the same erorr as before.
Error: VB-1100 - VB-1100 could not copy pgsql to backup directory, check robocopy log
Steps what I've done:
- Backup the dbu_hot_backup.vbs script
- Edit the dbu_hot_backup.vbs script by updating the 4 double quotes("""") to 2("") as below:
res=WshShell.Run("robocopy " & """" & archive_dir & ....
res=WshShell.Run("robocopy " & "" & archive_dir & .....
- Save the file and rerun the hot backup again
NOTE: When saving the file after above change, ensure the original encoding 'UTF-8' is not changed to other encoding. Otherwise the script will failed with compilation error when executed.
3 of 3 people found this helpful
Below is the delete_old_log_files_with_robocopy function from the vb script taken from V9.0.18 which supposedly solve this error. Try copying the relevant portion to your script. Hopefully it works.
'start error handling
on error resume next
'''first, let's create directory in %TEMP% (to contain old files, and to be deleted)
Wscript.Echo "creating logs_to_delete directory in %TEMP%..."
Set MyFile = fso.CreateFolder(OLD_LOGS_DIR)
''if (err.number <> 0 )then
'' report_on_error(" could not create logs_to_delete directory, error id: " & err.number & ", " & err.description)
'' WScript.Quit 1
Wscript.Echo "going to execute:"
Wscript.Echo "robocopy " & """" & archive_dir & """" & " " & """" & OLD_LOGS_DIR & """" & " /move /minage:7"
res=WshShell.Run("robocopy " & """" & archive_dir & """" & " " & """" & OLD_LOGS_DIR & """" & " /move /minage:7",1,true)
'' In some Windows, it worked for this (archive_dir came with extra comma). Here we do two copies for now, you can never be too careful...
res=WshShell.Run("robocopy " & "" & archive_dir & """" & " " & """" & OLD_LOGS_DIR & """" & " /move /minage:7",1,true)
Set MyFile = fso.GetFolder(OLD_LOGS_DIR)
'stop error handling
on error goto 0
sorry may I forgot to tell that we have V9.0.18 installed so that part is already in that script.
backup is now working. It seems the problem was the \ at the end of the directory.
Thx for you help.
Great. Good to know that you have managed to find the issue.