How to Enable the SQL Server Agent XPs using T-SQL

If you’re creating a SQL Server Agent job for the first time, you might find that you need to enable the SQL Server Agent extended stored procedures (SQL Server Agent XPs) first.

When you use the SQL Server Management Studio (SSMS) tool to start the SQL Server Agent service, these extended stored procedures are enabled automatically.

When you use T-SQL, you can enable the SQL Server Agent XPs with the sp_configure stored procedure.

Continue reading

How to Map Multiple Partitions to a Single Filegroup in SQL Server (T-SQL)

If you’re familiar with creating partitioned tables in SQL Server, you might be used to creating a separate filegroup for each partition. This has its benefits, and may very well be the method you would choose in most scenarios.

However, you also have the option of mapping multiple partitions to a single filegroup.

In this article I share two examples of mapping multiple partitions to a single filegroup.

  • Example 1 maps all partitions to a single filegroup.
  • Example 2 maps some partitions to one filegroup, and some to another.
Continue reading