Run same command on all SQL Server databases without cursors
undefined
undefined
Query File Information From All Databases On A SQL Instance
declare @Temp table(Fileid varchar(1000),Groupid varchar(100),Size varchar(100),maxsize varchar(100),
Growth varchar(100),Status varchar(100),Perf varchar(100), Name varchar(100),[Filename] varchar(100))
insert into @Temp
EXEC sp_MSforeachdb 'use ? select * from sysfiles '
select * from @Temp
where Name in('master','mastlog','ReportServer','ReportServer_log','MSDBData','MSDBLog')

declare @Temp table(Fileid varchar(1000),Groupid varchar(100),Size varchar(100),maxsize varchar(100),
Growth varchar(100),Status varchar(100),Perf varchar(100), Name varchar(100),[Filename] varchar(100))
insert into @Temp
EXEC sp_MSforeachdb 'use ? select * from sysfiles '
select * from @Temp
where Name in('master','mastlog','ReportServer','ReportServer_log','MSDBData','MSDBLog')
Subscribe to:
Post Comments (Atom)
- SSIS Logging Table Customizing
- Getting column description and Update descriptions in SQL Server
- SQL SERVER Start and Stop services Using SSIS
- SQL Server log shrinking Issue
- Dynamic Pivot on Single Column in a Table Sql Server 2008
- Run same command on all SQL Server databases without cursors
- SQL SERVER – ReIndexing Database Tables and Update Statistics on Tables
- Delete Original Data and maintain history with single SQl statement......(Magic tables)
- SQL Server Recursive CTE
- SQL Server Advanced Queries
- Which index will SQL Server use to count all rows
- SQL Server Performance Tips
- Sql Server Temporary Tables vs Table Variables
- Differences between sqlserver 2000, 2005 and 2008 versions
- SSIS Interview Quesions and Answers
0 comments:
Post a Comment