Limit number of versions in sharepoint
This script can be used as a trigger to limit the number of versions for a particular document
2004-05-07
109 reads
This script can be used as a trigger to limit the number of versions for a particular document
2004-05-07
109 reads
This procedure, sp_who3, is based on the system-supplied sp_who2, but is modified to return the actual text of the commands executed by each spid. Very helpful for troubleshooting! In addition, I have added a @hostname parameter to allow the user the option of viewing activity originating from only one computer, if desired.
2004-05-06
647 reads
While the other methods for calculating holidays ect use a table to store the holidays, this inline UDF goes the opposite route, by returning 1 if the given date is a weekday that also does not fall on a number of holidays. Examples shown allow for easy extension to other holidays as deemed necessary.
2004-05-02
200 reads
For greater information of this tool can obtain it inhttp://www.dimac.net/Mail in format HTML or TEXT can be sent can be sent attached archives. It is a tool to send and to receive electronic mail from any PC or SERVER without the use of a program of mail or a mail server as Eudora, Exchange or […]
2004-04-20
1,390 reads
This script backs up all databases or a specified database to a disk location. Databases can be explicitly excluded from backup as well. Can be used for Full, Differential or Transaction Log Backups. Can also dynamically create sub directories for each database, as well as perform DBCC and restore verify operations. Includes LiteSpeed support for […]
2004-04-15
1,487 reads
This script will get the name of each database from master..sysdatabases, then use each database's Information Schemata to get the tables and columns in each of the databases. Several recent requests for assistance have used this to answer their needs. I ran it across 245 databases and pulled back 1.4 million results in about 30 […]
2004-04-15
1,331 reads
Script via OLE Automation and Export via BCP. Check for existance of object, checks count of table with count of exported file (reads BCP output). Will do DBCC UPDATEUSAGE if at first the SQL record count does not match BCP count. Full options for scripting (with w/o indexes, Referential integrity, etc). REQUIRES ADMIN ACCESS - […]
2004-04-15
2,501 reads
Well this is an addendum to my earlier post for searching a specific string in all the Stored Procedures defined in a database and returning the name of the stored procedure in which it is contained. This is optimized based on suggestion of Greg and I thank him for his advise.
2004-04-09
501 reads
This function returns a list of all procedures and functions that contain the given text value. It has an additional parameter to exclude procedures that contain a second text value.
2004-04-08
215 reads
Adapted from Rodrigo Acosta's script which exports to a text file the text of SPs. Parameters are the table/view name (may include a WHERE clause) , the output file path/name, and an optional list of fields (may include user-defined functions,cast/convert,etc..., the default is '*').
2004-04-06
606 reads
The slidedeck and the SQL scripts for the session Indexing for Dummies can be...
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...
Comments posted to this topic are about the item Don't Forget About Financial Skills
Comments posted to this topic are about the item Building a Simple SQL/AI Environment
Comments posted to this topic are about the item Checking Identities
The DBCC CHECKIDENT command is used when working with identity values. I have a table with 10 rows in it that looks like this:
TravelLogID CityID StartDate EndDate 1 1 2025-01-11 2025-01-16 2 2 2025-01-11 2025-01-16 3 3 2025-01-11 2025-01-16 4 4 2025-01-11 2025-01-16 5 5 2025-01-11 2025-01-16 6 6 2025-01-11 2025-01-16 7 7 2025-01-11 2025-01-16 8 8 2025-01-11 2025-01-16 9 9 2025-01-11 2025-01-16 10 10 2025-01-11 2025-01-16The docs for DBCC CHECKIDENT say this if I run with only the table parameter: "If the current identity value for a table is less than the maximum identity value stored in the identity column, it is reset using the maximum value in the identity column. " I run this code:
DELETE dbo.TravelLog WHERE TravelLogID >= 9 GO DBCC CHECKIDENT(TravelLog, RESEED) GO INSERT dbo.TravelLog ( CityID, StartDate, EndDate ) VALUES (4, '2025-09-14', '2025-09-17') GOWhat is the identity value for the new row inserted by the insert statement above? See possible answers