Skip to main content


Showing posts from November, 2009

T-SQL month name from month index

How to display a month name from an input of a month index (i.e. 1-12). The script below will return the month name for a given month index. DECLARE @MonthID int SET @MonthID = 5 SELECT DateName(month, convert(datetime, '2009-' + cast(@MonthID as varchar) + '-01', 120)) @MonthID could be any integer I have only declared a new variable here for completeness.

SQL Server Set Identity Seed

DBCC CHECKIDENT (table_name, RESEED, new_reseed_value) E.g. DBCC CHECKIDENT (Customers, RESEED, 2000) From Microsoft: Checks the current identity value for the specified table and, if it is needed, changes the identity value. You can also use DBCC CHECKIDENT to manually set a new current identity value for the identity column. Full article:

IIS Change the key length for an SSL renewal

*** IIS 6 *** When applying for an SSL certificate renewal and the old certificate uses a 512 bit key length you may receive the following error: "The CSR you submitted has a 512 bit key size. We do not allow SSL Web Server certificate issued with a CSR less than 1024 bits." There is no way within IIS to change the key length but the workaround is as follows: 1. Create a new website under IIS. Make sure the website is stopped. 2. Edit the new site. 3. Select the "Directory Security" tab. 4. Click "Server Certificate" 5. Click "Next" 6. Select "Create a new certificate" 7. Click "Next" 8. Select "Prepare the request now, but send it later". 9. Click "Next" 10. Enter a name for the new request and select a bit length of 1024. 11. Click "Next". 12. Enter the organisation name and organisational unit for the website you are attempting to renew. 13. Click "Next". 14. Enter the exact domain na

Serving FLV video files from an MS server

When serving .flv files off of a Windows Server 2003 (or any other Windows server I would imagine) requires setting up the MIME type on the server first (it isn't one of the native MIME types on MS servers). 1) Select the site to configure in IIS, right click and select "Properties" 2) Under the "HTTP Headers" Tab, click "MIME Types" under the MIME types section 3) Click "New." 4) Type ".flv" as the associated extension and "video/x-flv" as the content type. 5) Click "OK" 6) Click "OK"