wdbates
asked on
Modifying SQL 2008/2012 PARTITIONS
Dear Experts;
My client has asked me to extend a project past it's expected end date of 2016. The database has PARTITIONS through 2017 and I need to extend or create new PARTITIONS through 2020. The problem I'm having is with the ALTER SCHEMA and FUNCTION - I just don't know what to do. I have the ALTER DATABASE to create the FILEGROUPs example below, but cannot figure out the syntax for the SCHEMA and FUNCTION.
Experts, I need your help. The original script that created the PARTITIONS AND SCHEMA is attached.
Thank you!
IF NOT EXISTS(SELECT * FROM HARBOR.sys.filegroups WHERE name = 'HARBOR20181001')
BEGIN
ALTER DATABASE HARBOR
ADD FILEGROUP HARBOR20181001
ALTER DATABASE HARBOR
ADD FILE ( NAME = N'HARBOR20181001',
FILENAME = N'C:\Data\HARBOR20181001.n df',
SIZE = 2048KB,
MAXSIZE = UNLIMITED,
FILEGROWTH = 1024KB )
TO FILEGROUP HARBOR20181001
END
Harbor.sql
My client has asked me to extend a project past it's expected end date of 2016. The database has PARTITIONS through 2017 and I need to extend or create new PARTITIONS through 2020. The problem I'm having is with the ALTER SCHEMA and FUNCTION - I just don't know what to do. I have the ALTER DATABASE to create the FILEGROUPs example below, but cannot figure out the syntax for the SCHEMA and FUNCTION.
Experts, I need your help. The original script that created the PARTITIONS AND SCHEMA is attached.
Thank you!
IF NOT EXISTS(SELECT * FROM HARBOR.sys.filegroups WHERE name = 'HARBOR20181001')
BEGIN
ALTER DATABASE HARBOR
ADD FILEGROUP HARBOR20181001
ALTER DATABASE HARBOR
ADD FILE ( NAME = N'HARBOR20181001',
FILENAME = N'C:\Data\HARBOR20181001.n
SIZE = 2048KB,
MAXSIZE = UNLIMITED,
FILEGROWTH = 1024KB )
TO FILEGROUP HARBOR20181001
END
Harbor.sql
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
My pleasure. Glad things worked out for you.
ASKER