fnStripChars
This function strips a list of characters from the value passed in. Useful for cleaning up input data and removing unwanted characters for streamlined data storage.
2002-09-06
332 reads
This function strips a list of characters from the value passed in. Useful for cleaning up input data and removing unwanted characters for streamlined data storage.
2002-09-06
332 reads
Database backup made simple. You dont even have to pass any parameters if desired. It will all be handled for you.Capable of Net Send status notifications and writes status message to Windows event log.Side Effects:When not passing any @database params the the backup is done of the database where the proc resides. That means if […]
2002-09-06
569 reads
When altering the structure of tables it is good practice to run SP_RECOMPILE against the table to force triggers and stored procedures to recompile. However this does not incude Udf's which also rely on the table, and this means the Udf's may fail when they are called. Run this script and supply the table name […]
2002-09-05
352 reads
This sp (sp_sysindexes) captures important columns from the table sysindexes and translates the numeric values into text. It shows the owner.object, the filegroup which it belongs to, the type of index, the total number of pages for tables/clustered indexes and non clustered indexes. It also shows the status, the indid and the type of object.You […]
2002-09-01
3,702 reads
I keep seeing people using CONVERT to convert a date to a varchar in order to do comparison or search queries. I haven't seen a situation yet where DATEDIFF can't be used.
2002-08-29
1,221 reads
Big transactions cause the Tlog to grow.When you do a clean of a large table, the delete statement can cause a very long transactionSometimes it's necessary to prevent this.So we divide one big delete into several little ones.A table with call centre data gets +/- 1-mlj records a day. Every day we run a script […]
2002-08-27
821 reads
Assuming we have the following table (that stores hierarchical data) :CREATE TABLE [staff] ( [employee] [int] NOT NULL , [employee_name] [varchar] (10) NULL , [supervisor] [int] NULL , PRIMARY KEY CLUSTERED ( [employee] ) ON [PRIMARY] , FOREIGN KEY ( [supervisor] ) REFERENCES [staff] ( [employee] ))I ‘ll built a […]
2002-08-23
831 reads
This is a simple Script that checks the W2K event log of choice and emails the results to the DBA. This script also uses the find command so you can search for strings in your event logs. It creats two scripts, the first script sp_EventlogSys runs xp_sendmail which executes the second procedure sp_EventlogSysquery and attaches […]
2002-08-22
824 reads
For lazy folks who want to use 'sp_force_shrink_log' in all dbs. This script depends on 'sp_force_shrink_log' already existing.
2002-08-20
966 reads
This SP will give a listing of users blocking and being blocked in a tree formation (similar to explorer tree list). It uses a User defined function that recurses through the locking information gathered from sysprocesses. The listing only shows the Hostname (username) and the SPID.First create the User Defined Function (Part One) then create […]
2002-08-19
2,129 reads
By Steve Jones
lilo– n. a friendship that can lie dormant for years only to pick right...
I spend my days working on and managing SQL Server instances—working days at least,...
Want to learn SQL and get some real practice this December? Check out the...
Bonjour à tous, je vais bientôt démarrer un projet d'archivage de données pour alléger...
Hello, I’ve been trying to install Ms SQL Server 2005 for over two weeks...
Comments posted to this topic are about the item How to Repair Corrupt MySQL...
What happens when I run this code:
EXEC sp_executesql N'PRINT 1; GO';See possible answers