Thor Logo dbatools

Directory

New-DbaDirectory

Stuart Moore

New-DbaDirectory View Source Stuart Moore Windows, Linux, macOS Synopsis Creates directories on SQL Server machines using the SQL Server service account Description Creates directories on local or remote SQL Server machines by executing the xp_create_subdir extended stored procedure. This is particularly useful when you need to create backup directories, log shipping paths, or database file locations where the SQL Server service account needs to have access. The function checks if the path already exists before attempting creation and returns the success status for each operation.

Read more

Test-DbaPath

Chrissy LeMaire (@cl), netnerds.net

Test-DbaPath View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Tests if files or directories are accessible to the SQL Server service account. Description Verifies file and directory accessibility from SQL Server’s perspective using the master.dbo.xp_fileexist extended stored procedure. This is essential before backup operations, restore tasks, or any SQL Server process that requires file system access. The function tests from the SQL Server service account’s security context, which may differ from your user account’s permissions.

Read more