Find database size
Partition Automatic Handling
Automatic Partition SET ANSI_NULLS, QUOTED_IDENTIFIER ON; GO use <Database> Declare @nextRange date, @sql nvarchar(3000), @maxBoundary date, @tableList varchar(1000) =’Table1,Table2,Table3′, @tableName varchar(100), @partitionFunction varchar(100), @partitionScheme varchar(100), @PartitionedTables as cursor , @debug bit =0, @monthsPartitionFuture smallint =7,@filegroup = ‘Primary’ ; set @PartitionedTables…
Find the column of a LOB (even in dropped objects)
Generic Export to csv script
A generic way to export a table to csv.
Find a table size including dependent objects
Use the following query to find the size of a table including its indexes and LOBs.
How to see table growth in Oracle
Find all indexes on a table
It is useful to be able to see all indexes on a table. There is the shipped stored procedure sp_helpindex but the following query can reveal some more inforamtion such as the Included and Filter columns.
All the log info you need in MS SQL Server
The batch below will reveal all the information you want for the log files of the databases in current instance. Recovery model, location, size, used log, disk available on log file disk, last log backup, log size since last log…
Databases size
The following statement returns the size of all databases in current SQL Server instance in Megabytes. Information is separated in data and log information.