USE master
EXEC sp_attach_db @dbname = N'EskulapWin_2003',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2003_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2003_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2004',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2004_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2004_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2005',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2005_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2005_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2006',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2006_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2006_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2007',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2007_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2007_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2008',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2008_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2008_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2009',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2009_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2009_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2010',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2010_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2010_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2011',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2011_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2011_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2012',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2012_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2012_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2013',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2013_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2013_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2014',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2014_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2014_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2015',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2015_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2015_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2016',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2016_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2016_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2017',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2017_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2017_Log.ldf'
EXEC sp_attach_db @dbname = N'EskulapWin_2018',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2018_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2018_Log.ldf'
--PROVJERITI DA LI JE RAZDVOJENA GODINA------------------------------------------------------------------------------------------------------------
EXEC sp_attach_db @dbname = N'EskulapWin_2019',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2019_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2019_Log.ldf'
--PROVJERITI DA LI JE RAZDVOJENA GODINA------------------------------------------------------------------------------------------------------------
EXEC sp_attach_db @dbname = N'EskulapWin',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2020_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL15.EDBOREL\MSSQL\DATA\EskulapWin_2020_Log.ldf'