/x:C:\HRMTemp /qs /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="SQLSERVEREXPRESS/HRM\sa" /SQLSVCPASSWORD="minh123" /SQLSYSADMINACCOUNTS="SQLSERVEREXPRESS/HRM\sa" /AGTSVCACCOUNT="NT AUTHORITY\Network Service" /SQLSVCINSTANTFILEINIT="True" /IACCEPTSQLSERVERLICENSETERMS
-- Resrore đatabase SQL script
IF NOT EXTSTS
(SELECT [name] AS DatabaseName
FROM sys.Databases
WHERE [name] = 'HRMApp')
BEGIN
RESTORE DATABASE [HRMApp]
FROM DISK = N'MY_DATABASE_PATH"
WITH FILE = 1
NOUNLOAD,
REPLACE,
MOVE 'HRMApp_Data' TO '<restore_path>\HRMApp_Data.mdf',
MOVE HRMApp_Log' TO '<resrore path>\HRMApp_Log.mdf',
STATS = 10;
END;
GO