Read the registry using T-SQL
This script uses the extended stored procedure xp_instance_regread to read a value from the registry
2004-02-20
1,485 reads
This script uses the extended stored procedure xp_instance_regread to read a value from the registry
2004-02-20
1,485 reads
Indexes and table Statistics play a big role in an OLTP database for better query performance. Maintaining statistics on a weekly basis is important but a heavily updated database tables need more emphasis on Statistics and frequent updates. Instead of trying to issue “sp_updatestats” for the entire database, you can choose tables which are heavily […]
2004-02-17
1,989 reads
This stored procedure is created from the need to copy rows from a table with new value. The script itself will create stored procedure proc_copyrows.The parameters are@TableName: the table name@FilterField: filter field, default is null, means no filter@SourceValue: the value of filter field from source data to be copied@DestinationValue: the new value of filter field@SourceDB: […]
2004-02-13
266 reads
Generate an html-excel file with any table. Does not need Excel to generate , because does not use Excel automation
2004-02-12
436 reads
Search all text fields in a database for a literal string.Outputs SQL statements to query analyser window, which can then be run in a new window.
2004-02-10
208 reads
Stored procedure to search every field in the database for a string literal. Run the stored procedure in Query analyser, which will output sql statements to do the search. The output of these searches will be the update sql, which again should be pasted into a query analyser window. As the stored procedures do not […]
2004-02-10
265 reads
This script outputs the data in chronological order from the current SQL Server log.Output columns are: Log Entry Time, Event Source, Log Entry Text. This data matches with the data that can be seen under the SQL Server logs view in Enterprise Manager.The script is stand alone, but could easily be parameterised to work as […]
2004-02-10
888 reads
Generate an html-excel file with any table. Does not need Excel to generate , because does not use Excel automation.
2004-02-08
531 reads
sp_XTAB (prototype) produces pivoted (crosstab) views/output with a minimum of fuss.No messing with code, just tell XTAB what you want to pivot.Tested to 764 pivoted columns, XTAB can generate up to 63000 characters of dynamic sql. Example (deliberately over-simplified)----------------------updated 27 January 2004Use NorthwindEXEC sp_XTAB 'Northwind','xtEMPL_COUNTRY','Orders','EmployeeID','ShipCountry', '', 'OrderID','COUNT','NULL', '', 'SELECT xtEMPL_COUNTRY.* FROM xtEMPL_COUNTRY' -- Include optional […]
2004-01-24
392 reads
Function to allow for checking if an IP address is a private IP address. Will convert the IP to a bigint equivalent if within the private range, otherwise it will return null if IP is a public address.Requires function IPStringToNumber which is included in the post
2004-01-23
1,309 reads
Forgive me for the title. Mentally I’m 12. When I started my current day...
By Steve Jones
One of the things a customer asked recently about Redgate Data Modeler was how...
By Steve Jones
For a number of years, we’ve produced the State of the Database Landscape report,...
The main purpose of the Rice Purity Test is entertainment and self reflection. Many...
Comments posted to this topic are about the item Expanding into Print
Comments posted to this topic are about the item Downtime Caused by the Postgres...
In SQL Server 2025, what is returned by this code:
SELECT EDIT_DISTANCE('Steve', 'Stan')
Assume preview features are enabled. See possible answers