Thursday, January 22, 2009

SQL Server 2008 Error: SetParent Falied for DataFile

When creating a SQL 2008 database through SSMS, I wanted to add a File for the new FileStream type. I kept getting an error dialog box stating:
TITLE: Microsoft SQL Server Management Studio

SetParent failed for DataFile 'test'.  (Microsoft.SqlServer.Smo)

For help, click: 


Value cannot be null.
Parameter name: newParent (Microsoft.SqlServer.Smo)
The Microsoft help link came up empty and so did a Google search. I had been previously using a SQL script to create the database, but this time I was determined to make it work through the GUI. I found the problem was that I didn't go to the FileGroup tab first and add a FileStream FileGroup.


Anonymous said...

Thanks ,
It helped me a lot .

pyroguy said...

first google hit, exactly what I needed. Thanks.

Anonymous said...

Very helpful. and still use able in SQL 2012

Anonymous said...

Thanks. It helped me too. Very helpful and still useable in SQL Server 2014.

Anonymous said...

That was it. Thank you.

Anonymous said...

Awesome Dude. thanks!

S Johnson said...

Good info. Why every doc leaves out these small details that cause seemingly major problems is beyond me. SQL2014