Alphanumeric and Special Character Validation=========================================/*Function name: fn_ValidateStringDescription : This function is used to validate whether the given string contains Alphanumeric character and some special character’s ‘@’ ,’(‘, ‘ )’, ‘_’, ‘-‘Parameters: 1) @InputString varchar(25) Accepts the string, which we need to validate 2) @Type int = 0 validate the string for only alphanumeric characters i.e […]
2006-07-26 (first published: 2004-09-15)
1,638 reads
This function will calcuate the number hours between two dates excluding weekends. This allows for cycle time metrics and anything else requiring only the hours of weekdays.
2006-07-20 (first published: 2004-12-16)
363 reads
This script gathers stats_date and index information for all of the current database. Please feel free to modify it as it is made up of components that are available on this site here- http://www.sqlservercentral.com/scripts/contributions/97.aspand a BOL entry for stats_date.I needed this information and thought I would share it.
2006-07-17 (first published: 2005-04-29)
550 reads
This stored procedure gives you metadata information from the reportserver database about published reports, datasources, directories,authorized users/groups,(shared)schedules and subscriptions.I integrated this stored procedure in a report in our MS report services environment for auditing purposes
2006-07-14 (first published: 2005-06-01)
440 reads
This script generate spool with create index for all foreign key.
2006-07-12 (first published: 2004-02-26)
376 reads
The Query will enable you to retrieve all the Tables in the Database .The Output of the Query will list all the User Tables along with the Column Names and the Sort order of the Columns .The Query will also return as to whether the Columns in the table are with allow null option or […]
2006-07-06 (first published: 2004-11-18)
423 reads
2006-07-04 (first published: 2006-06-28)
168 reads
This is an example to overcome short comings when using BCP to create a 'proper' CSV file. The view vw_Customers_RAW is used in order to provide a method of creating the column heading row and to enclose columns with embedded comma with double quotes, which are not options in BCP. There are more generic methods […]
2006-07-03 (first published: 2006-06-29)
3,021 reads
Use this Perl script to produce an audit report of both share permissions and NTFS permissions of the shared folders. To report share permissions:Use shareperms.pl -p -SMyServer1 to report on a single server.Or use shareperms.pl -p -SMyServer1,MyServer2 for multiple servers.You can also use a text file as input: shareperms.pl -p -CServers.txtTo report NTFS permissions use […]
2006-06-27 (first published: 2006-06-11)
315 reads
Backs up the SQL Server EM registration from the registry. Assumes that EM is configured to save common, not by user/independently. I recommend changing EM to Store locally for all users, (not independently) and create a weekly scheduled job to backup the HKLM..\..\Registered Servers X branch.Configure EM to store settings for the local machine, all […]
2006-06-26 (first published: 2006-06-12)
320 reads