Script to Retrieve SQL Server Port Number
Retrieve SQL Server port number from registry. Useful for SQL Servers running named instances or non-standard TCP port numbers.
2003-06-04
644 reads
Retrieve SQL Server port number from registry. Useful for SQL Servers running named instances or non-standard TCP port numbers.
2003-06-04
644 reads
In your tenure as a DBA/developer, you've probably been asked to write dozens of stored procedures similar to this:CREATE PROCEDURE ContactInfo@ContactID intASSELECT c.Name, a.Address, p.PhoneFROM Contact cLEFT JOIN ContactAddress aON c.ContactID = a.ContactIDLEFT JOIN ContactPhone pON c.ContactID = p.ContactIDWHERE c.ContactID = @ContactIDBut there is a more efficient way to write such a query.....particularly if you […]
2003-06-03
1,417 reads
This procedure shows you the MAC number of your Enthernet card in a format exactly the same as when running: ipconfig /all from command shell. Updated thx to Larry A.
2003-05-31
144 reads
Customers, employees, etc. come and go. They get entered multiple times in inconsistent formats in databases.This simple script finds the duplicates across multiple formats and is easily modified as needed. It's so easy, my grandmother could do it. Oops! No offense Grandma.For very large databases, create and join two temp tables indexed on the namedatetring […]
2003-05-30
207 reads
This procedure displays all user-defined datatypes in all databases on a server. Another example of the power of dynamic T-SQL, this procedure dynamically generates SELECT statements for the systypes tables in each database and UNIONs them together so that they display in one recordset.
2003-05-30
160 reads
This script will send a mail whenever it detects a Blocking process. You need SQL Mail configured on this server in order to use or you can specify the pager number @company.comEx:- 1234567789@Skytel.com
2003-05-29
1,822 reads
This procedure reports on table schema changes, any new or deleted tables since the previous run of the stored procedure.It only reports on tables owned by 'dbo'
2003-05-29
431 reads
This script is a fix to the "Script to determine if all chars are same in field"posted by Harvard Kinkead (hneal_98) . That script doesn't handle strings with trailing spaces (e.g. set @repeat = 'bbbb ')It happens because of the nature of Len function. To bypass this limitation my script concatenates one character to tested […]
2003-05-29
76 reads
A lot of table pivoting scripts use cursors to reach the desired results, but SQL scripting was developed to be utilized in a data set environment rather than sequential step-thru scripting.Normally, there are 3 types of Table Pivoting - 1) column explicit 2) column implicit and 3)single column. COLUMN EXPLICIT will place the row value […]
2003-05-29
422 reads
The excellent script contributed by G.R. Preethiviraj Kulasingham (Preethi) Sri Lanka (contributed 2/20/03, modified 5/22/03) identifies duplicate indexes for the database on which the script is run. It requires User Defined Functions, a feature restricted to SQL Server 2000.This version achieves similar results without using UDFs or creating any other permanent objects. It therefore works […]
2003-05-28
770 reads
By Chris Yates
Change is not a disruption in technology; it is the rhythm. New frameworks appear,...
No Scooby-Doo story is complete without footprints leading to a hidden passage. In SQL...
By James Serra
A bunch of new features for Microsoft Fabric were announced at the Microsoft Fabric Community...
We’re running SQL Server 2019 with database compatibility level 150, and after recent tuning...
Comments posted to this topic are about the item Changing the Recovery Time
Comments posted to this topic are about the item Getting More Time from AI
I want to change the recovery time for a database running on SQL Server 2022. What are my options for setting the value in my ALTER DATABASE statement. If I run this code, what can I use in place of the xxx to define what 12 means?
ALTER DATABASE Finance SET TARGET_RECOVERY_TIME = 12 xxx;See possible answers