tsql help
DECLARE @sql VARCHAR(MAX) WITH cte AS ( SELECT *,'RESTORE DATABASE ['+ dbname+'] FROM DISK=''J:\backup\cmx_FullBKP.bak'' WITH REPLACE , ' col, ROW_NUMBER() OVER (ORDER BY (SELECT 0)) rn FROM...
View Articletsql help
Uri, How can I store this restore cmd into a variable ? I need to execute the stmt using EXEC().
View Articletsql help
You are welcome.Best Regards,Uri Dimant SQL Server MVP,http://sqlblog.com/blogs/uri_dimant/ MS SQL optimization: MS SQL Development and Optimization MS SQL Consulting: Large scale of database and data...
View Articletsql help
;WITH cte AS ( SELECT *,'RESTORE DATABASE ['+ dbname+'] FROM DISK=''J:\backup\cmx_FullBKP.bak'' WITH REPLACE , ' col, ROW_NUMBER() OVER (ORDER BY (SELECT 0)) rn FROM FilelocationsTBL WHERE dbname =...
View Articletsql help
Hi All, Need some help in preparing a restore cmd dynamically using metadata which is stored inside a table. We need to read the file locations from the metadata table and form the RESTORE commands. --...
View Article
More Pages to Explore .....