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.