August 18, 2022 at 10:44 pm
hello, I'm nee here and new to SQL DBA, so forgive how pedestrian I am about to sound. I am learning to create filegroups using GUI and TSQL, I sucessfully created multiple file groups using GUI however when it came to creating it using TSQL i am getting an error which I am posting below
Msg 5035, Level 16, State 1, Line 2
Filegroup 'SBSTSQLGroup1' already exists in this database. Specify a different name or remove the conflicting filegroup if it is empty.
Please what do I do?
August 19, 2022 at 11:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
August 21, 2022 at 2:05 am
hello, I'm nee here and new to SQL DBA, so forgive how pedestrian I am about to sound. I am learning to create filegroups using GUI and TSQL, I sucessfully created multiple file groups using GUI however when it came to creating it using TSQL i am getting an error which I am posting below
Msg 5035, Level 16, State 1, Line 2 Filegroup 'SBSTSQLGroup1' already exists in this database. Specify a different name or remove the conflicting filegroup if it is empty.
Please what do I do?
Heh... you're concerned about airs of a pedestrian and I'm concerned about being accused of sounding like Captain Obvious. 😀
Run the following in the database where you're trying to add that file group...
SELECT * FROM sys.FileGroups
WHERE name = 'SBSTSQLGroup1'
;
If it comes back with a row, then the filegroup already exists (and, from what the error message said, it will). The question is, what do you want to do if it does?
If you're just practicing and you made the filegroup from the GUI, it's still going to exist. If there's nothing that you need from it, just drop it (it won't let you if it contains a file) and then you can practice making it with code.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 5, 2022 at 8:44 am
This was removed by the editor as SPAM
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply