USE [master] GO CREATE DATABASE [TEST1] ON ( FILENAME = N'E:\testdb\TEST1.mdf' ), ( FILENAME = N'E:\testdb\TEST1_log.ldf' ) FOR ATTACH GO
USE [TEST1] GO ALTER DATABASE [TEST1] MODIFY FILE (NAME=N'test', NEWNAME=N'TEST1') GO ALTER DATABASE [TEST1] MODIFY FILE (NAME=N'test_log', NEWNAME=N'TEST1_log') GO