February 1, 2017 at 7:10 am
I am getting following Error
Msg 5105, Level 16, State 2, Server ServerName, Line 1
A file activation error occurred. The physical file name '"D:\\Data\\EAMTEST_index.ndf"' may be incorrect. Diagnose and correct additional errors, and retry the operation.
Msg 1802, Level 16, State 1, Server ServerName, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
February 1, 2017 at 7:14 am
Try to change this part - D:\\Data\\EAMTEST_index.ndf to D:\\Data\EAMTEST_index.ndf (you have one extra \).
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 1, 2017 at 7:17 am
Hi
I tryed that but still it is not working.
Thanks,
Padmakumar
February 1, 2017 at 7:21 am
In that case, make sure that the specified path (D:\data) exists. If it does exist check that there isn't another file there with the name EAMTEST_index.ndf. Another thing that you can check is that the user that is used to run SQL Server's service has permissions to use that directory.
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 1, 2017 at 7:28 am
Adi Cohn-120898 - Wednesday, February 1, 2017 7:14 AMTry to change this part - D:\\Data\\EAMTEST_index.ndf to D:\\Data\EAMTEST_index.ndf (you have one extra \).Adi
There are two extra backslashes in the original, not just one. Try this:
D:\Data\EAMTEST_index.ndf
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 1, 2017 at 7:30 am
Post your CREATE DATABASE statement, please. If you're doing it through the GUI (which I don't advise), click on the Script button in the New Database window.
John
February 1, 2017 at 7:36 am
Follwing is my script
CREATE database $(hmsDbName)
ON PRIMARY (NAME= $(hmsDataName),
FILENAME= [$(hmsDataFQFileName)],
SIZE = $(hmsDataSize),
MAXSIZE = $(hmsDataMaxSize),
FILEGROWTH = $(hmsDataGrowth)),
FILEGROUP [$(eamFileGroupName)]
( NAME = [$(eamFileGroupName)],
FILENAME =[$(eamFileGroupFQFileName)] ,
SIZE = $(eamFileGroupSize),
MAXSIZE = $(eamFileGroupMaxSize),
FILEGROWTH = $(eamFileGroupGrowth)),
FILEGROUP [$(hmsFileGroupName)]
( NAME = [$(hmsFileGroupName)],
FILENAME = [$(hmsFileGroupFQFileName)],
SIZE = $(hmsFileGroupSize),
MAXSIZE = $(hmsFileGroupMaxSize),
FILEGROWTH = $(hmsFileGroupGrowth))
LOG ON (NAME = [$(hmsLogName)],
FILENAME=[$(hmsLogFQFileName)],
SIZE = $(hmsLogSize),
MAXSIZE = $(hmsLogMaxSize),
FILEGROWTH = $(hmsLogGrowth))
GO
following is the vaiable from parm file which is creating problem
eamFileGroupFQFileName="D:\\Data\\EAMTEST_index.ndf"
February 1, 2017 at 7:40 am
Mmmm... not much good without the actual parameter values, I'm afraid! But as Adi and Phil have suggested, try unduplicating those backslashes in your file path(s).
John
February 1, 2017 at 7:43 am
For variable passed through the property file we need two slashes.
February 1, 2017 at 7:51 am
padmakumark26 - Wednesday, February 1, 2017 7:43 AMFor variable passed through the property file we need two slashes.
Presumably that's because one of them is an escape character? Unfortunately, if you look at the error message, you see it's not being escaped. How are you passing the command to SQL Server, and how did you generate that script that you posted?
John
February 1, 2017 at 7:53 am
padmakumark26 - Wednesday, February 1, 2017 7:43 AMFor variable passed through the property file we need two slashes.
Then maybe you need to remove them in your script, before issuing the CREATE command.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 1, 2017 at 7:55 am
Script is created by me. As you see in the Script I have 3 Data files and one Log file .If i remove this particular file (NDF) all works fine.
February 1, 2017 at 8:00 am
That can't be the whole script. I need to see everything, please, including where you're assigning values to those variables. And you still haven't answered how you're actually doing this. Don't forget we can't see your screen.
John
February 1, 2017 at 10:46 pm
Make sure that you can access the full path
Confirm if Data folder exists and has permissions
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply