For backing the SQL database to share you should make sure that below points are correct.
1. The service account should have access to share where you are going keep the backup file.
2. The account which you are using should have permission to backup the DB.
If above conditions are met then below query can be used,
USE VaultStore01
GO
BACKUP DATABASE VaultStore01
To Disk = '\\Server01\\SQLBackup\VaultStore01.bak' WITH FORMAT, INIT;
GO
Note;- in above example ‘VaultStore01’ is the name of Database and ‘\\Server01\\SQLBackup\’ is the share where backup file is kept. You should use WITH FORMAT, INIT otherwise the file will append and that create free space issues.
No comments:
Post a Comment