Posted on: 1/17/2012 1:20:27 AM | Views : 249

Hi,
I have a .bat file(to create a database and tables under it) to run a set of .sql scripts.
while creating a database, i am using @@servername to read the server instance and concatenating it with the 'filename'  (sciprt as below) and getting the error as ---A file activation error occurred. The physical file name 'N'C:\Program Files\Microsoft SQL Server\MSSQL10.'+ '@serverInstance' +'\MSSQL\DATA\Test12.mdf'' may be incorrect. Diagnose and correct additional errors, and retry the operation---
script: 
declare
@serverInstance Go to the complete details ...