Script to drop all indexes on a table
Given a table name as the parameter, all the indexes on the table can be dropped. This script can be useful if you want to drop indexes on a table inside another procedure
2002-03-12
13,851 reads
Given a table name as the parameter, all the indexes on the table can be dropped. This script can be useful if you want to drop indexes on a table inside another procedure
2002-03-12
13,851 reads
This procedure when executed with the correct parameters, exports all stored procedures from a database into different .SQL files in the path specified.Usage :exec USP_PRINT_PROCS username, password, servername, databasename, directory path
2002-03-12
560 reads
Returns the Owner, Table Name, Row count for all user tables in the current database.
2002-03-11
611 reads
When rebuilding a server or setting up a backup or DR server the logins need to be added into master and synchronised with the user databases.Inevitably there are orphaned users is sysusers or the sid's do not match with syslogins.I use this stored procedure to check for a particular user when the user experiences a […]
2002-03-07
819 reads
--Delete all restrictions from those tables included in the input parameters Procedure HP_BORRA_CONSTRAINTS -- Include CHECK, FOREIGN KEY, PRIMARY KEY, UNIQUE, and DEFAULT constraints.
2002-03-07
466 reads
I was posed a question a few months back on another site about being about to create a Pivot Table (Horizontal version of vertical data) and I saw the question again today. This will allow you to do that, just make changes to the query where the title is the replacement need. It will build […]
2002-03-07
1,326 reads
By using this script one can find number of rows for each and every table in a database. Just cut and past this script in your DB and excute. A stored procedure will be created as 'Get_rowcounts_for_eachtable'. If U excuted this stored procedure, U can get all tablenames and rowcounts for respected […]
2002-03-07
584 reads
This will report all backup activity for all databases, sorted by date, so you see the last backup activity first. You can filter this one by a db name as well, and only see the backup info for said database.
2002-03-07
808 reads
This will get the last date a database was backuped. It allows you to report this date on all databases on a server, or pass in a db name, and it'll report the date that db was last backed up
2002-03-07
448 reads
I use this SP to return full directory information into a table. FilePath, FileName, Filedate and FileSize are parsed from a 'dir /n/on/-c ' command. FilesInDir is the table created. usage: exec LoadFileDetailsIntoTable 'c:\winnt'select * from FilesInDir where filesize > 100000select min(fileDate) from FilesInDirThe Return Code will equal the number of files found.
2002-03-05
474 reads
By Steve Jones
Leave a gate behind you the way you first found it. – from Excellent...
By SQLPals
Fix Slow, Bloated MSDB: Purge Old History And Add Missing Indexes ...
By James Serra
Organizations increasingly want Snowflake and Microsoft Fabric to coexist without duplicating data or fragmenting...
Comments posted to this topic are about the item You Have Homework
Hello all, I am having one heck of a time installing Microsoft Connector for...
hi, a peer of mine would like to be self sufficient in bringing small...
If I have a fillfactor set to 70%, this reduces my page density to roughly 70%. Does this affect the query plans that the optimizer chooses?
See possible answers