adminbd

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

Have a Question?

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

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

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');

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>