correlation https://teguhth.blogspot.com/2023/08/create-script-backup-database-full.html
1. enable xp_cmdshell
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1;
RECONFIGURE;
2. create t-sql sp_backup_full_basic
IF DB_ID('dbatools') IS NULL
BEGIN
CREATE DATABASE [dbatools];
END
GO
USE [dbatools];
GO
CREATE PROCEDURE [dbo].[sp_backup_full_basic]
-- =============================================
-- Author: Teguh Triharto
-- Create date: 22 March 2000
-- Description: Script Backup Database
-- Website : https://www.linkedin.com/in/teguhth"
-- =============================================

