0

I've been tasked to move on-prem SQL Server database to AWS RDS SQL Server and from there migrate the data to postgresql.

I'm preparing for those and in the DB creation script found the term "FILEGROUP" and each file group has been mentioned a path in the local server like below.

CREATE DATABASE [PROD_MIGTN]
 CONTAINMENT = NONE
 ON  PRIMARY 
( NAME = N'SDL_DEV', FILENAME = N'D:\SQL_DB\MSSQL12.SDL_PRODDB\MSSQL\DATA\PROD_MIGTN.mdf' , SIZE = 503269504KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ), 
 FILEGROUP [FG_EDU_GROUP] 
( NAME = N'INV_EDU_GROUP', FILENAME = N'D:\SQL_DB\MSSQL12.SDL_PRODDB\MSSQL\DATA\INV_EDU_GROUP.ndf' , SIZE = 13393920KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ), 

 FILEGROUP [FG_PAYMNT_HISTORY] 
( NAME = N'EXT_PAYMNT_HISTORY', FILENAME = N'D:\SQL_DB\MSSQL12.SDL_PRODDB\MSSQL\DATA\INV_PAYMNT_HISTORY.ndf' , SIZE = 16516736KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'PROD_MIGTN_DEV_log', FILENAME = N'D:\SQL_DB\MSSQL12.SDL_PRODDB\MSSQL\DATA\PROD_MIGTN_1.LDF' , SIZE = 133711872KB , MAXSIZE = 2048GB , FILEGROWTH = 51200KB )

Also noticed that the filegroups were tied to a partition scheme like below

CREATE PARTITION SCHEME [PS_SALE] AS PARTITION [PF_WHOLE_SALE] TO ([FG_EDU_GROUP])
GO

and the above in turn to a table

CREATE TABLE [dbo].[T_SALE](
    [SALE_ID] [varchar](50) NOT NULL,
    [REF_NO] [varchar](50) NOT NULL,
    [COMPY_ID] [varchar](50) NOT NULL,
    [STATUS_CODE] [nvarchar](128) NOT NULL  
CONSTRAINT [PK_T_SALE_SALE_ID] PRIMARY KEY CLUSTERED 
(
    [SALE_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PS_SALE]([SALE_ID])
) ON [PS_SALE](SALE_ID)
GO

Want to know,

  1. What is the significance of the filegroup given the scenario that i'm only going to migrate the data to postgresql and move it to archive?
  2. Will there be any impact to data that removing the filegroup and its connected partition scheme result in mess up ?
  3. In the event that avoiding them both will create issues, then how to define the filegroup in the cloud database i.e. how to give a file path ? If so, should i need to allocate a S3 bucket or some other kind of storage separately ?

Thanks

luckyluke
  • 642
  • 2
  • 7
  • 22

0 Answers0