Know all Database sizes in a server.

We can know how much space a database is occupied in hard disk by using sp_spaceused function. If we want to find all database sizes at a time, we have to provide use  and sp_spaceused for all databases. It takes some time to write all those T-sql statments. My script will find each and every […]

3 (2)

2003-09-16

1,650 reads

Get BCP out for all tables in a DB

           The script mentioned below will export data in all tables into textfiles to a physical path on your system using BCP utility from a Database. The sql commands used in this stored procedure are BCP utility,Identity function and temporary tables.    Here you required to give 4 input parameters, they […]

2002-03-15

1,698 reads

Rows count for each and every table in a DB 

       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

Blogs

Are You a Diverse User Group or Event?

By

One of the things that I’ve seen crop up at various points in my...

Daily Coping 18 Jun 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

When Read Committed Snapshot Goes Bad – Version Store Filling TempDB

By

We all had those calls, it’s the middle of the night and we get...

Read the latest Blogs

Forums

UniqueIdentifier as Primary Key, non-clustered index, fragmentation issue

By oRBIT

I've been working a little bit with a few tables here, they've got "CreatedDate"...

Multiple deadlocks occuring on simultaneous deletions from temporal table

By zoggling

We have a stored procedure which is attempting to delete 1-2 rows at a...

Foreign key for Xml Datatype

By IT researcher

Is foreign key constraint possible in xml data type? OR Is it possible to...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers