Viewing 15 posts - 1 through 15 (of 35 total)
Rebuild or reorganize just for the cause of it is not something you should do.
Indexes has to monitored over time to see how and when they become a problem.
There...
October 1, 2016 at 3:58 am
There are two queries. The firt creates the function and the other runs it.
September 30, 2016 at 8:54 am
If for any reason a rebuild indexes must take place (Heaven knows why) I suggest an alteration so that indexes containing weird characters also will be shown.
Also specifying that this...
September 28, 2016 at 1:36 am
I have some powershell scripts running which is used in a stored procedure.
This one is giving me all system configurations for the SQL Server
DECLARE @sql nvarchar(400)
set @sql = 'powershell.exe -c...
February 17, 2016 at 7:56 am
Or you can do like this.
CREATE TABLE #test (ID int, some_date datetime);
INSERT INTO #test (ID,some_date) VALUES
(1,'20150607'),
(2,'20140609'),
(3,'20160203');
declare
@start_date datetime
,@end_date datetime
set @start_date = convert(nvarchar(4),dateadd(year,-1,getdate()),121) + '-01-01'
set @end_date = convert(nvarchar(4),dateadd(year,-1,getdate()),121) +...
February 17, 2016 at 7:05 am
Why do one want to shrink logfiles on a schedule, only to find that it probably is growing back to the same size the day after?
The only thing you end...
August 11, 2014 at 4:53 am
What I found out is that the file actually is written if I lokk in the folder. So what is causing the error...?
June 10, 2014 at 7:44 am
THis is also useful. Shows not only sprocs
SELECT DISTINCT
name
,type
,type_desc
,create_date
,modify_date
FROM
sys.objects
WHERE
type IN ('P','PK','F','D','FN','TR','UQ','X')
ORDER BY
type
,modify_date...
January 21, 2014 at 4:30 am
Found this by searching. Do not know if it helps you. But it helped me
Check to see whether there is any anti-virus or anti-spyware tool running on the SQL Server,...
October 29, 2013 at 8:17 am
Have the same problems.
Is there any one who knows what this depends on, except for a bug in SQL Server?
October 29, 2013 at 8:14 am
I think this is a good way to start to find out bottlenecks like for instance "Table scans" in queries.
As allways it is the hint to something that thes fantastic...
June 11, 2013 at 12:52 am
You might not want to see all sprocs in system databases, so I added this....
USE master
GO
CREATE TABLE #sp_procedures_checked (dbid int,db_name nvarchar(4000),ROUTINE_NAME nvarchar(4000))
GO
EXEC sp_MSForEachDB
'USE [?];
INSERT INTO #sp_procedures_checked (dbid,db_name,ROUTINE_NAME)
SELECTDB_ID()...
May 30, 2013 at 7:25 am
This will not show if a static database only gets backuped up weekly or monthly.
Those databases will not show up in the list.
April 18, 2013 at 5:20 am
Hi,
I thought of that but I run this as a separate task as this goes thru all databases. I'll end up with a table of indexes and where the are...
February 19, 2013 at 7:02 am
Hi,
I found this sometime ago. I apologize to the author that I do not remember him or where I got it from.
I have made som changes to it to get...
February 19, 2013 at 2:52 am
Viewing 15 posts - 1 through 15 (of 35 total)