adminbd

Записи по mssql,oracle,windows и linux

Have a Question?

If you have any question you can ask below or enter what you are looking for!

All posts tagged перенос

Перенос файлов базы данных на другой диск или директорию.

ALTER DATABASE ZUP_MOLL SET OFFLINE;
go
ALTER DATABASE ZUP_MOLL MODIFY FILE ( NAME = ZUP_MOLNIYA, FILENAME = 'F:\MSSQL\DATA\ZUP_MOLL.mdf' )
go
ALTER DATABASE ZUP_MOLL MODIFY FILE ( NAME = ZUP_MOLNIYA_log, FILENAME = 'F:\MSSQL\DATA\ZUP_MOLL_1.LDF' )
go
ALTER DATABASE ZUP_MOLL SET ONLINE;
go

SELECT name, physical_name AS CurrentLocation, state_desc
FROM sys.master_files
WHERE database_id = DB_ID(N'ZUP_MOLL');