Double Slash Warning during SQL Application Aware Backup
I am receiving similar warnings on multiple of my clients's backups:
Activity 'Preparing for application backup' succeeded with the following warning: ' Database name: 'XXXXXXXXX' Database logical file name: 'XXXXX_log' Incorrect value: 'F:\Logs\\XXXXXXX.LDF' Error: A double slash in the path. To remove the double slash, run the T-SQL command: ALTER DATABASE MODIFY FILE '
When I access the database using SQL Management Studio I can confirm that there are no double slashes as stated in the warning.
They are all running Acronis Agent 12.5.10170.
Is this a known issue or am I missing something?
Also experiencing the same issue. Again no double slash showing up in SQL Studio
We're working on fixing this issue in the code, however, may I suggest couple of workarounds?
1. Open SQL Server Management Studio (make sure that SSMS version matches the version of SQL instance running on the machine)
2. Run the following query to get the list of database names and locations:
select * from sys.database_files
3. In the output, find the database that is mentioned in the warning
4. Run the following command to modify physical path to the file:
ALTER DATABASE <database name>
MODIFY FILE (NAME = '<logical name>', FILENAME='<path to file>');
<database name> is the name of the database that is mentioned in the error, no changes needed
<logical name> is the logical name of the file mentioned in the error, no changes needed
<path to file> is the full path to the file that is mentioned in the error, without double slashes or extra spaces at the end
1. Open SQL Management Studio
2. Detach the database and put it offline
3. Reattach the database
Please let me know if this imposes any difficulties or, otherwise, does lead you to successful backup!
Thank you for the feedback Fedor!
There are a lot of clients this is happening to and we do not want to access all of their databases for this issue.
We will rather wait until the issue has been resolved with an agent update.
One comment though...
Should the statement:
MODIFY FILE (NAME = '<logical name>', FILE='<path to file>');
MODIFY FILE (NAME = <logical name>, FILENAME='<path to file>'); ?
Cristiaan, you are right, my mistake, I found proof in https://docs.microsoft.com/en-us/sql/relational-databases/databases/move-user-databases?view=sql-server-2017
We also published an article about this issue.
p.s. I edited my original comment to reflect the proper cmdlet.
p.p.s. The agent-based fix is targeted ~autumn this year.