Project

General

Profile

Перенос каталога ROOT и RENAME базы данных » rename_file.sql

Sergey Kolyshkin, 10/03/2020 16:16

 
-- ####################################################################
-- Script for rename number of files at once.
-- For beg file count (>1000) use rename_storage.sql
-- ####################################################################

declare @old_path varchar(250)
declare @new_path varchar(250)

-- Change '\\server\old_path' with real path, that should be replaced
-- Do not type ending \
set @old_path='\\SAM-DCSRV-01'

-- Change '\\server\new_path' with real path, that should be used instead old path
set @new_path='\\SAM-RMA-01'

update ph set filename= REPLACE ( filename , @old_path , @new_path )
where filename like @old_path+'\%'
(1-1/3)
Add picture from clipboard (Maximum size: 742 MB)