Viewing 15 posts - 1 through 15 (of 108 total)
Here's how I have set it up (with thanks to whoever provided the original code)
1. Create table for CheckDB results
2. Create store proc to apply CheckDB to...
February 1, 2017 at 5:50 pm
SELECT 'c:\Programmefiles\Dicument\file1.txt' AS txt INTO #temp
UNION ALL SELECT
'c:\Programmefiles\Dicument\Subdocument\file1.txt'
UNION ALL SELECT
'c:\Programmefiles\Dicument\Image\file1.txt'
UNION ALL SELECT
'c:\Programmefiles\Dicument\Text\file1.txt'
SELECT REVERSE(SUBSTRING((SUBSTRING(REVERSE(txt),CHARINDEX('\',REVERSE(txt))+1,LEN(REVERSE(txt)))),1,CHARINDEX('\',(SUBSTRING(REVERSE(txt),CHARINDEX('\',REVERSE(txt))+1,LEN(REVERSE(txt)))))-1))
FROM #temp
DROP TABLE #temp
June 16, 2016 at 8:35 pm
I use the following code (inside a scheduled job) to extract the data and email it in HTML table format:
(disclaimer - this is my version of similar code that was...
November 19, 2012 at 4:02 pm
re
grant select on [ServerN].DataBaseD.Table to userM
You need to include the schema as well:
grant select on [ServerN].DataBaseD.mySchema.Table to userM
May 16, 2012 at 6:14 pm
just to take the shrink / don't shrink discussion a little further, how about the following scenario:
You have a mirrored database that is reindexed say once per week, and the...
February 29, 2012 at 6:42 pm
Here's what i use to monitor scheduled jobs. The following code runs every morning in a scheduled job step and emails me the last run status of all scheduled jobs...
January 23, 2012 at 6:16 pm
just a suggestion....this is the type of syntax that i would use for a report query of this kind (i.e. when there are parameters that may or may not be...
October 4, 2011 at 8:23 pm
For some reason, when I ran this query in it's original form, it returned NULL rather than the name of the latest .bak file
I changed the last line of the...
August 18, 2011 at 3:46 pm
an old thread i know....but I had a similar problem trying to do a select into over a linked server. To solve the problem, I ran the following query from...
January 31, 2011 at 7:28 pm
I discovered the model log growth in a similar way - I had been tracking database (data and log) growth and created a report similar to the one above. That...
January 25, 2011 at 12:53 pm
I have the same issue - the model database log file grows occasionally. This happens on all our SQL servers. On one instance, the model data file has grown as...
January 24, 2011 at 6:59 pm
@AndrewJacksonZA - the Rick Astley pie chart made me laugh out loud....the 'glider' avatar indicates you are obviously a Conway's Game of Life fan too
September 19, 2010 at 3:20 pm
did you try the code in my previous post?
here is a slighly modified version - it seems to meet your requirements:
DECLARE @openDate DATETIME
DECLARE @closedDate DATETIME
SET @openDate = '4/19/2010'
SET @closedDate...
April 19, 2010 at 1:25 pm
This will return the number of days between two dates excluding weekends (i.e. Sat and Sun)
It doesn't take account of holidays / other non-working days though:
-- get number of days...
April 18, 2010 at 7:53 pm
Did you know that 600GB 3.5" 15k SAS drives are available? If the fixed drives are older, chances are you can buy a replacement that is both larger and faster....
April 13, 2010 at 2:20 pm
Viewing 15 posts - 1 through 15 (of 108 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy