-- 备份产生模板库 BACKUP DATABASE userdb_template TO DISK = '/var/opt/mssql/backup/userdb_template_20200901.bak'; GO -- 从模板库新建数据库 RESTORE DATABASE userdb_001 FROM DISK = '/var/opt/mssql/backup/userdb_template_20200901.bak' WITH MOVE 'userdb_template' TO '/var/opt/mssql/data/userdb_001.mdf', MOVE 'userdb_template_log' TO '/var/opt/mssql/data/userdb_001_log.ldf'; GO