The script runs using vbscript code. It requires the user to enter parameters and run the script. The script uses both trusted and standard connection. The script also generate a log file each time it runs. Copy the code below and save it with .vbs extension.
2005-02-21 (first published: 2005-01-31)
289 reads
You can return the date as a string (varchar) in whatever date format you like by adding a 'style' to the CONVERT statement. Exmaples of style values are (two left hand columns):1 101 USA mm/dd/yy 2 102 ANSI yy.mm.dd 3 103 British/French dd/mm/yy 4 104 German dd.mm.yy 5 105 Italian dd-mm-yy 6 106 - dd […]
2005-02-18 (first published: 2005-01-31)
195 reads
This script will help DBA's who wants to BCP out required tables form any database. This script can be run through as a job. Before running you have to create a table in any given database and store the table names in it, which you want to Bulk copy. Query in this procedure will check […]
2005-02-17 (first published: 2005-01-27)
286 reads
There are mainly two components. One job that is managing the full database backup - restore and a second job that manage the transaction log backup - restore. At this two a new one similar with the full database backup - restore can be added for the differential backups if is the case. I will […]
2005-02-15 (first published: 2004-04-01)
1,028 reads
This Stored Procedure Will Get: - The Data and Log File Names - The Data and Log File Sizes (MB) - The Data and Log Percent Utilization (%) for ALL Databases on a SQL Instance. Numbers Should (More Or Less) Reflect What You See on The SQL Enterprise Manager Taskpad. LIMITATIONS: For Databases With Multiple […]
2005-02-14 (first published: 2005-01-13)
1,146 reads
Imports data from MySQL Server; works best with mysql driver 3.51.06! You'll have to create a dsn and then a linked server to that dsn. The script checks if the table exists in the mysql catalog (defined in the dsn properties). Too bad it needs administrative privileges to run (dbcc statement) - my advice: don't […]
2005-02-11 (first published: 2005-01-17)
118 reads
Kmlakov's script, t-sql function to parse string data, posted on 1/19/2005, required the passing in text ends with the delimiter. But it is usually not the case. I rewrote the script (added one IF statement). The new script can treat the text with or without ending delimiter. The third parameter will be the number of […]
2005-02-07 (first published: 2005-01-19)
375 reads
select dateadd(dd, datediff(dd,0,Getdate()),0)
2005-02-01 (first published: 2005-01-06)
144 reads
This script will get you the current date minus the time. It will display all zeros instead.DATETIME is stored as a number in SQL and less internal conversions are will be used then other methods. Microsoft generally uses this method.
2005-01-31 (first published: 2005-01-06)
231 reads
Shows database, table names which are locked, the user who locks them, the command which is executed
2005-01-28 (first published: 2005-01-06)
1,130 reads