Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8345933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:50:49+00:00 2026-06-09T06:50:49+00:00

When I run this statement in SQL Server: USE [master] GO ALTER DATABASE <DBName>

  • 0

When I run this statement in SQL Server:

USE [master]
GO
ALTER DATABASE <DBName> ADD FILEGROUP <[FGName]>

Where is the corresponding .ndf file created on disk?

When I run that query, it’s successful and I am able to find the new file group being added to the sys.filegroups table.

But when I run

select * from sys.database_files 

I am not able to find the files created for the new file group. I couldn’t find it in the disk as well. What am I doing wrong?

Could somebody help with this..?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:50:56+00:00Added an answer on June 9, 2026 at 6:50 am

    Try this:

    In SQL Server you will have to explicitly add the .ndf files to the different filegroups. If you dont mention any filegroup then by default it will be added to primary filegroup.

    So whenever you add a filegroup it is just a logical name and it does not have any physical location.

    use yourDBname
    select * from sys.database_files 
    
    ALTER DATABASE yourDBname ADD FILE (NAME = name1, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\DB11.ndf', SIZE=100MB, MAXSIZE=500GB, FILEGROWTH=50);
    ALTER DATABASE yourDBname ADD FILEGROUP BusyTables
    
    select * from sys.database_files 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone help me with this SQL statement. I run it on the SQL
I have problems running this sql statement. It works fine if I run it
I'm trying to use the following code to run a PL/SQL statement on my
I use SAS proc sql execute statement to run sql and access tables on
select max(Key) from MyTable with(nolock) I have this T-SQL statement but need to use
I have a statement similar to this that I need to run in Linq.
I run this in localhost and it works. In the server the PHP script
When you use SQL Server Management Studio to generate a script for creating a
I'm using a MS SQL Server db and use plenty of views (for use
First a little introduction. We have an SQL Server Express 2008 database, which schema

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.