You are on page 1of 5

Migración de Storage Cluster SQL Server

_______________________________________

Bibliografía: https://www.sqlservercentral.com/forums/topic/migrate-cluster-to-
new-san
https://community.spiceworks.com/topic/231034-migrating-ms-
sql-cluster-to-new-shared-storage
http://www.tsmguru.com/data-migration/microsoft-sql-
cluster-data-migration-to-a-new-san.html
https://www.sqlgovernor.com/en/blog/en/detailed-
specification-sql-server-migration-planning-part-2
https://joeydantoni.com/2011/03/16/sql-server-cluster-san-
migration-part-i-the-easy-way/
https://sqlstarters.com/2014/05/27/san-migration-in-
windows-failover-cluster/
https://itworldjd.wordpress.com/2014/11/05/migrating-sql-
2008-cluster-to-a-new-san/
https://www.jpaul.me/2012/07/how-to-migrate-ms-sql-cluster-
to-a-new-san/
https://www.mlakartechtalk.com/how-to-move-sql-server-
database-files-to-new-location/
https://blog.netnerds.net/2019/09/using-robocopy-to-move-
sql-server-files/

Migrate MS SQL Cluster to a New SAN


migrate storage cluster sql server step by step
change storage cluster sql server step by step
configure failover cluster sql server windows vmware workstation
migration sql server robocopy online database

https://kb.vmware.com/s/article/2147661
https://www.youtube.com/watch?v=NhjUhPEMKoY
https://www.youtube.com/watch?v=Y-qWbk_uv9A
https://www.youtube.com/watch?v=euSiQFcyVPg
https://www.youtube.com/watch?v=aLBrrlj-SUc
https://learn.microsoft.com/en-us/sql/sql-server/failover-clusters/install/create-
a-new-sql-server-failover-cluster-setup?view=sql-server-ver16
https://www.sysprobs.com/setup-windows-2008-cluster-vmware-workstation

00:0C:29:93:7B:0F
00:0C:29:93:7B:0F

Windows Server 2019


W472N-49TRW-F3BYX-HHFTJ-GVMMV

robocopy C:\\oldmount\\Data C:\\Mount\\Data /MIR /COPYALL /DCOPY:DAT /Z /J /SL


/MT:"$(\[int\]$env:NUMBER\_OF\_PROCESSORS+1)" /R:1 /W:10 /LOG+:C:\\temp\\robocopy-
log.txt /TEE /XD "Recycler" "Recycled" '$Recycle.bin' "System Volume
Information" /XF "pagefile.sys" "swapfile.sys" "hiberfil.sys"

robocopy C:\\oldmount\\Logs C:\\Mount\\Logs /MIR /COPYALL /DCOPY:DAT /Z /J /SL


/MT:"$(\[int\]$env:NUMBER\_OF\_PROCESSORS+1)" /R:1 /W:10 /LOG+:C:\\temp\\robocopy-
log.txt /TEE /XD "Recycler" "Recycled" '$Recycle.bin' "System Volume
Information" /XF "pagefile.sys" "swapfile.sys" "hiberfil.sys"
Here are the descriptions for each of the parameters, as described by the
serverfault post.
DBCC CHECKDB

https://learn.microsoft.com/es-es/sql/t-sql/database-console-commands/dbcc-checkdb-
transact-sql?view=sql-server-ver16

Opciones para mover una gran base de datos SQL Server a una nueva unidad con un
tiempo de inactividad mínimo
___________________________________________________________________________________
_________________________

Bibliografía: https://www.mssqltips.com/sqlservertip/3212/options-to-move-a-
big-sql-server-database-to-a-new-drive-with-minimal-downtime/
https://www.sqlservercentral.com/forums/topic/migrate-4-tb-
database-to-new-environment

https://learn.microsoft.com/en-US/troubleshoot/sql/database-engine/security/
transfer-logins-passwords-between-instances
https://learn.microsoft.com/en-us/sql/relational-
databases/system-stored-procedures/sp-change-users-login-transact-sql?view=sql-
server-2017
https://www.sqlservercentral.com/forums/topic/migrate-4-tb-
database-to-new-environment
https://dba.stackexchange.com/questions/123714/moving-sql-
server-database-to-a-new-disk-while-online
https://blog.sqlauthority.com/2018/04/10/sql-server-steps-
to-migrate-cluster-storage-from-old-disks-to-newly-attached-disks/
https://www.mlakartechtalk.com/how-to-move-sql-server-
database-files-to-new-location/

Mover User Databases robocpy


____________________________

Bibliografía:
https://learn.microsoft.com/en-us/sql/relational-databases/databases/move-
user-databases?redirectedfrom=MSDN&view=sql-server-ver16
https://learn.microsoft.com/en-us/sql/relational-
databases/databases/move-system-databases?redirectedfrom=MSDN&view=sql-server-ver16

https://social.msdn.microsoft.com/Forums/office/en-US/d4b1fefb-561a-426e-
b954-94728a7ea5d7/solid-way-to-move-sql-mdfldf-files-to-new-drives?
forum=sqlgetstarted

https://learn.microsoft.com/en-US/previous-versions/windows/it-pro/windows-
server-2003/cc780121(v=ws.10)
https://learn.microsoft.com/en-us/sql/relational-
databases/databases/move-user-databases?redirectedfrom=MSDN&view=sql-server-ver16
https://www.mlakartechtalk.com/how-to-move-sql-server-
database-files-to-new-location/
http://sqlserverdb.blogspot.com/2012/06/robocopy-files-to-
another-drive.html
https://mostafaelmasry.com/2020/10/20/solve-sql-server-
resource-database-crash/
https://sqlserverdiaries.com/blog/index.php/2021/07/move-
system-databases-from-the-os-drive/
https://blog.sqlauthority.com/2017/08/31/sql-server-
migrate-master-database-new-location/

https://www.janbasktraining.com/community/salesforce/how-
do-i-move-sql-server-database-files
https://dba.stackexchange.com/questions/52007/how-do-i-
move-sql-server-database-files
https://sqljana.wordpress.com/2017/08/01/sql-server-move-
data-files-to-another-drive/
https://answers.sap.com/questions/13053698/how-to-move-a-
large-mdf-file-from-one-drive-to-ano.html
https://cogknowhow.tm1.dk/archives/3842
https://rajagogoi.wordpress.com/2015/05/20/robocopy-to-
sync-sql-server-database-from-one-server-to-another/
https://www.sqlservercentral.com/forums/topic/how-can-i-
copy-the-sql-server-database-data-file-mdf
https://www.mlakartechtalk.com/how-to-move-sql-server-
database-files-to-new-location/
https://www.c-sharpcorner.com/article/move-sql-server-
database-to-another-location-lesson-learned/
https://www.c-sharpcorner.com/article/move-sql-server-
database-to-another-location-lesson-learned/
https://sudeeptaganguly.wordpress.com/2015/03/07/checklist-
for-database-file-movement/
https://www.sqlteam.com/forums/topic.asp?TOPIC_ID=54338
https://sqlpowershell.wordpress.com/2013/08/19/sqlcmd-
database-backup-and-restore-automation-quickest-and-simplest-method/
https://sqlundercover.com/2020/04/15/move-all-your-sql-
database-and-log-files-in-bulk/
https://www.mssqltips.com/sqlservertip/3212/options-to-
move-a-big-sql-server-database-to-a-new-drive-with-minimal-downtime/
https://www.mlakartechtalk.com/how-to-move-sql-server-
database-files-to-new-location/
https://www.brentozar.com/archive/2017/11/move-tempdb-
another-drive-folder/
https://sqlserverdiaries.com/blog/index.php/2021/07/move-
system-databases-from-the-os-drive/
https://www.mssqltips.com/sqlservertip/3212/options-to-
move-a-big-sql-server-database-to-a-new-drive-with-minimal-downtime/
https://saurabhsinhainblogs.blogspot.com/2014/02/copy-all-
files-from-one-drive-to-other.html#more
https://www.infopackets.com/news/10482/how-fix-move-ms-sql-
databases-another-drive-partition
https://www.youtube.com/watch?v=ZuwzYLtuNHI
https://www.easeus.com/pc-transfer/copying-files-from-one-
server-to-another-server-in-windows-robocopy.html
https://www.sqlshack.com/move-sql-database-files-mdf-ldf-
another-location/
https://www.slideshare.net/lukaszgrala/expert-summit-sql-
server-2016
https://sqlrus.com/2019/05/dont-forget-robocopy/
https://blog.netnerds.net/2019/09/using-robocopy-to-move-
sql-server-files/
https://sqljana.wordpress.com/2017/08/01/sql-server-move-
data-files-to-another-drive/
https://sqljana.wordpress.com/2018/04/08/sql-server-detach-
attach-gotchas/

List of database with location

select name,physical_name from sys.master_files


1) make datbase offline

ALTER DATABASE DB SET OFFLINE;


GO

2) copy to new location

-- Physically move the file to a new location. C:\Program Files\Microsoft SQL


Server\MSSQL12.MSSQL2014\MSSQL\DATA
-- In the following statement, modify the path specified in FILENAME to
-- the new location of the file on your server.

3) change location

ALTER DATABASE db
MODIFY FILE ( NAME = db_log,
FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQL2014\MSSQL\Backup\
db_log.ldf');
GO
ALTER DATABASE DB
MODIFY FILE ( NAME = db,
FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQL2014\MSSQL\Backup\
db.mdf');
GO
4) make databse online

ALTER DATABASE DB SET online;


For system databases :-

https://msdn.microsoft.com/en-us/library/ms345408.aspx?f=255&MSPPError=-2147217396

Edite

Hello,

Try using robocopy or richcopy.

https://technet.microsoft.com/en-us/magazine/ee851678.aspx

https://technet.microsoft.com/en-us/magazine/2006.11.utilityspotlight.aspx

https://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx

D:\SQL_Server_Migracion\sqlmigra1.virtualcampe.com\Windows Server 2019-0.vmdk

USE [master]
GO
CREATE DATABASE [StackOverflow2010] ON
( FILENAME = N'L:\TEST_Robocopy\StackOverflow2010.mdf' ),
( FILENAME = N'L:\TEST_Robocopy\StackOverflow2010_log.ldf' )
FOR ATTACH
GO
https://blog.ragasys.es/migrar-directorios-ficheros-y-permisos-ntfs-de-recursos-
compartidos-entre-servidores-de-archivos-windows-metodo-iii-robocopy
https://blog.netnerds.net/2019/09/using-robocopy-to-move-sql-server-files/
https://www.datavail.com/blog/use-sys-master_files-sql-servers/
https://www.sqlshack.com/different-methods-to-attach-sql-server-mdf-files/
https://www.mlakartechtalk.com/how-to-move-sql-server-database-files-to-new-
location/
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/536950d8-3e38-4d44-a5bd-
e6dbfe1d9a05/sql-data-move?forum=sqlservermigration

migrate teras sql server storage online databases


migration sql server robocopy online databases
migrate storage SQL Server robocopy
https://blog.netnerds.net/2019/09/using-robocopy-to-move-sql-server-files/
https://www.dell.com/community/VNX/Migrating-data-databases-from-windows-server-
local-disk-to-VNXe/td-p/7009360
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b57013f4-91a1-4bc4-bb6c-
3271de8d74e4/can-we-move-the-mdf-and-ldf-files-without-detching-and-sql-server-
shut-downurgent-pls
https://learn.microsoft.com/en-us/sql/relational-databases/databases/move-user-
databases?redirectedfrom=MSDN&view=sql-server-ver16
https://www.mlakartechtalk.com/how-to-move-sql-server-database-files-to-new-
location/
https://www.janbasktraining.com/community/salesforce/how-do-i-move-sql-server-
database-files
https://www.janbasktraining.com/community/salesforce/how-do-i-move-sql-server-
database-files
Expert summit SQL Server 2016 pdf
fuser alternative windows sysinternals
https://superuser.com/questions/486668/how-to-unlock-files-using-handle-exe-and-
process-name
comando handle
https://www.mssqltips.com/sqlservertip/7531/add-new-disk-to-windows-failover-
cluster-for-sql-server-and-move-database/
https://www.sqlshack.com/different-methods-to-attach-sql-server-mdf-files/
https://www.mssqltips.com/sqlservertip/7531/add-new-disk-to-windows-failover-
cluster-for-sql-server-and-move-database/
https://norfipc.com/comandos/como-usar-comando-robocopy-ejemplos.html
https://hevodata.com/learn/sql-server-high-availability/
https://www.sqlservergeeks.com/detach-or-take-offline-in-sql-server/#:~:text=The
%20difference%20is%20that%20detach,in%20SQL%20server%20system%20views.
https://www.veritas.com/support/en_US/article.100023226
https://sqljana.wordpress.com/2018/04/08/sql-server-detach-attach-gotchas/
https://sqljana.wordpress.com/2017/08/01/sql-server-move-data-files-to-another-
drive/
https://www.mssqltips.com/sqlservertip/1786/auto-generate-sql-server-database-
attach-and-detach-scripts/
https://blog.sqlauthority.com/2018/05/16/sql-server-simple-script-to-create-a-
login-and-user-for-a-specific-database-with-system-admin-rights/
scripts create logins attach database sql server
https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/security/
transfer-logins-passwords-between-instances
https://solutioncenter.apexsql.com/how-to-script-sql-server-logins-and-permissions/
https://github.com/chrisdee/Scripts/blob/master/SQLServer/Working/
SQLGenerateAttachAndDetachCommands.sql
https://www.sqlshack.com/move-or-copy-sql-logins-with-assigning-roles-and-
permissions/

You might also like