Answer the question
In order to leave comments, you need to log in
How to transfer the database with the project?
I created a database at (localdb)\mssqllocaldb and a project that uses it, but when transferring the project to another computer, the database is not transferred, how can I make it transfer?
Answer the question
In order to leave comments, you need to log in
@echo off
echo -- Архивирование базы данных
osql -S SDATA -E -i Move.backup.sql -n
echo -- Перенос данных
copy \\SDATA\Data\MSSQL\BACKUP\QBill.move.bak \\SWEB\D$\MSSQL\QBill.move.bak
echo -- Восстановление базы данных
osql -S SWEB -E -i Move.restore.sql -n
BACKUP LOG [General] WITH NO_LOG
GO
--
DBCC SHRINKDATABASE ([General])
GO
--
BACKUP DATABASE [General]
TO DISK = 'D:\MSSQL\BACKUP\QBill.move.bak'
WITH INIT, NOUNLOAD, NAME = 'General home backup', NOSKIP, STATS = 5, NOFORMAT
GO
RESTORE DATABASE [General]
FROM DISK = 'D:\MSSQL\QBill.move.bak' WITH FILE = 1, NOUNLOAD, STATS = 5, REPLACE,
MOVE 'General_Log' TO 'D:\MSSQL\General.log',
MOVE 'General_Data' TO 'D:\MSSQL\General.mdf',
MOVE 'General_Event' TO 'D:\MSSQL\General.ndf'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question