Scripts

Technical Article

SQL Server Error Log Manager

Provides a method to regularly recycle the sql server error logs based on a given file size.  If the current log file is larger than that size, then the current log is closed and a new log created.This proc takes one parameter, @MaxFileSize, which is the target file size.  This parameter defaults to 10 MB. […]

You rated this post out of 5. Change rating

2003-10-27

916 reads

Technical Article

User tables documentation - HTML format

It creates documentation for all user tables in a specific database. A server name/ database name was added on the top of the HTML file also a column datatype field was added to the HTML file. Now the @strHTML can have 8000 chars, before only 4000 - still for tables with a lot of columns […]

You rated this post out of 5. Change rating

2003-10-27

646 reads

Technical Article

compare table counts in two databases

Sound like old hat ... but this procedure accepts the two database names as input parameters; therefore, it must dynamically generate the SQL and use Exec(@command) to execute it.   It also reports on tables that exist in one database but not the other ...  Finally, it uses count(*) to provide more accuracy than using sysindex […]

You rated this post out of 5. Change rating

2003-10-24

279 reads

Technical Article

sp_toptables

Are you managing big databases with a lot of tables like SAP as I'm?Do you use sp_spaceused, as I'm?Do you want to know your n biggest tables as I'm?Then don't search any longer.I'm using this script every day for may maintenance jobs.I generates, like sp_spaceused, out of sysindexes the n biggest tables without any cursor, […]

You rated this post out of 5. Change rating

2003-10-20

301 reads

Technical Article

XML Encode UDF

I routinely need to retrieve and package query result sets in an XML package.  The built in functions supported by SQL Server 2000 are effective, but are often more of a pain than a help.  This routine can be used in a simple select statement to XML encode the contents of a column during the […]

You rated this post out of 5. Change rating

2003-10-14

236 reads

Blogs

A New Word: Ochisia

By

ochisia – n. the fear that the role you once occupied in someone’s life...

Create a Numbers Table in Power Query

By

This is a quick blog post, mainly so I have the code available if...

Microsoft finally adds Tenant Switcher for Fabric / Power BI

By

Praise whatever deity you believe in, because it’s finally here, a tenant switcher for...

Read the latest Blogs

Forums

It's The People

By Grant Fritchey

Comments posted to this topic are about the item It's The People

To View or not to View, that is the question...

By pietlinden

I've read lots of the horror stories about nested views in databases where they're...

Grant user read-write permission to a single database

By PJ_SQL

Hello! How do I grant a user to read-write to a single database and...

Visit the forum

Question of the Day

The Density Vector

When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?

See possible answers