Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Dynamic Index Drop and Create
I am working on a data warehouse that is SQL Server 2000 based and what
I need to do is create two stored procs that do the following psuedo
code.  I can write it myself but if someone has already written it then
why write it again or if you know of solutions that are close to what I
want that would be a good start.  The reason that these need to be in
two seperate procs is that I want to seperate out the Drop and Creates
from the stored procedure that is loading the table.  Instead of
hardcoding the drops and creates I want this procedure to be more
dynamic so that as we add indexes for tunning we don't have to maintain
our stored procedures.

proc_DropIndexes @DatabaseName, @TableName
- Write all necessary current index information to a work table for
@DatabaseName and @TableName to allow for recreation
- Drop all current indexes for @DatabaseName and @TableName

proc_CreateIndexes @DatabaseName, @TableName
- Read all necessary current index information from a work table for
@DatabaseName and @TableName to allow for recreation
- Create all indexes for @DatabaseName and @TableName

Thanks,
Spencer


Report this thread to moderator Post Follow-up to this message
Old Post
stabbert
04-07-06 04:23 PM


Re: Dynamic Index Drop and Create
The following appear to be good starts...
http://www.code-magazine.com/articl...526e19
13


Report this thread to moderator Post Follow-up to this message
Old Post
stabbert
04-07-06 04:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 08:48 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006