Showing posts with label MSSQL. Show all posts
Showing posts with label MSSQL. Show all posts

Friday, July 8, 2022

SQL Server List Partitioned Tables with Row Count and Page Size

SQL Server script to list database tables that are partitioned with the partitions schema, partition function, row count, page size, and partition range.

Monday, October 19, 2015

SQL Server Create Database Script

 SQL Server script to create a database with multiple File Groups


SQL Server Create Schema Script

 SQL Server script to create a schema and grant a user or security group SELECT access




SQL Server Create Table Script

 Sample SQL Script to create a table with the following requirements:

  1. Auto Incrementing numeric Primary Key
  2. Columns with default values (InsertDate and UpdateDate)
  3. Calculated column (Age)
  4. Unique constraint to prevent duplicate records
  5. Check constraint to limit data
  6. Foreign Key constraint to create data relationship
  7. Specify File Group for data storage