List Of All Tables And Size

Oct 1, 2001

Does anybody know how to make a query that presents ALL
tables and their sizes (in Kb or Mb) from a database?

Is there a Stored Procedure for this purpose?

Thanks

View 2 Replies


ADVERTISEMENT

List All Tables Sizes, Sorted By Size

Jan 13, 1999

How do I get a list of table names and their sizes, sorted by sizes? The command sp_spaceused only lists one table at a time.
Thanks for your help.

Lan.

View 2 Replies View Related

List Table Name And Size

Jul 29, 2002

Anybody know any method/script I can use to see a list of table name
and table size (in bytes, not rows) within a database?
I know I can see the size of any particular table in "Table info" tab or using "sp_spaceused" procedure. But I can't generate a report with a list of table name and table size using these methods.
Any idea? Thanks.

John

View 2 Replies View Related

List Databases With Their Size

Feb 12, 2007

I want to list my databases, and physical related files, and their size but the following commands do not provide the size. Any idea?

SELECT * FROM sysdatabases
SELECT * FROM sys.sysfiles


I know it's silly question

Canada DBA

View 6 Replies View Related

Transact SQL :: Query To Get DB List And Size

Nov 19, 2015

I need to retrieve list of all databases and the size occupied by them in sql server. As of now am pulling data for each database using sys.dqatabase_files which is hard for me as there are around 40-50 db on SQL Server.

View 4 Replies View Related

Create List Of Table Names And Size For A Database

May 5, 2004

Hi there,

I am trying to create a list of all the tables in one database and then list the size of each table. So for example I want to create a table with the table name and table size for one DB

E.g

Table1 1111KB
Table2 123300MB
Table3 120448KB

etc for all the tables in a particukar DB

I know there is a stored procedure to list the sizes: 'sp_spaceused' but not sure how to script all this together.

can anyone help please!!

From

NewToSQL

View 12 Replies View Related

(URgert)Is There A Way I Can Increase The Size Of The Drop Down List In My Report Viewer

Jan 18, 2008



Hi,

I have a report on my report server... and it has set for multivalue parameter... but since the particular client has only one plan so they wont have the select all function... but the size of the ddl is so squished that we cannot see the Plan name at all...

So can someone pls help me as to how can i increase it..

Regards
Karen

View 5 Replies View Related

Passing A List Of Numbers To A Stored Procudure, Having A Size More Than 8000 Characters

Aug 1, 2007

Hi..

I m working on MS SQL Server 2000.
I am trying to pass a list of numbers to a stored procedure to be used with 'IN()' statement.

I was doing something like..

Create Procedure proc

(

@Items varchar(100) --- List of numbers
)
AS Begin

Declare @SQL varchar(8000)
Set @SQL =
'
Select Query......
Where products IN (' + @items + ') '
'
Exec (@SQL)


This stored procedure is working fine, but when i m adding more required stuff to that, the size exceeds 8000, & it gives the error "Invalid operator for data type. Operator equals add, type equals text."

Can any1 please help me out with this ASAP??






View 4 Replies View Related

How Do I Get A List Of Tables In T-SQL

Mar 11, 2005

Hi,
Is there anything equivalent to Oracle's Select * from tab in MS SQL.

View 2 Replies View Related

How I Can Get List Of Tables?

Dec 24, 2005

Hi friends,
How I can get list of tables and list of fields within those tables in SQL server.
Thnak a lot.
 

View 4 Replies View Related

List Of Tables

Jun 6, 2001

How to obtain the list of the tables of a base by un script

View 1 Replies View Related

How To Get A List Of Tables Currently In A DB

Mar 21, 2001

Hi all,

Does any one know what command(s) I can use from a SQL prompt to tell me what tables are cruuently residing in a particular database. I'm looking for something along the lines of "select list_of_all_tables from tempdb", which can be applied to any valid db on the system.

Thanks in advance for any guidance.

Rgds,
Kevin

View 3 Replies View Related

List From Three Tables

Oct 5, 2006

HI I have three tables as here:

inventory
isbn, status, status_date, quantity

authors
id, first_name, family_name

books
isbn, category, title, num_pages, price, copyright, author1, author2, author3


How can I list title and author name of the book that is most in stock?

My another problem to

Listing names of authors who have not written ay books

Thanks folks!!!

View 4 Replies View Related

List All Tables Ans SP

May 25, 2008

Hi

can I through a script retrieve a list af all tables and stored procedure in a database?

View 6 Replies View Related

List Tables Which Are Used By A SP

Sep 17, 2007

Hi,
I got a request from a devloper asking, how can he find out what tables his stored procedure his using, so he can remove unwanted SP which are using old tables in the database.

Bharath JrDBA

View 3 Replies View Related

List Of Tables In A Db

Jul 20, 2005

Hi Allcan some one please tell me the transact sql code that can list all tablesin a db.thanksTodd

View 1 Replies View Related

Size Of Tables

Jan 21, 2000

I am finding that the size of my SQL Server 7 tables are approx 75% LARGER than the same Visual FoxPro table. I am not considering indexes in either one. The only difference is that the SQL Server table has a timestamp that the Visual FoxPro table does not.

Is this normal? or did I do something wacko?

I upsized the data from Visual Fox to SQL by appending the info in the Visual Fox table into a remote view and then doing a TABLEUPDATE to send it to SQL Server.

Any help would be appreciated.

Rick

View 2 Replies View Related

Size Of Tables

Nov 16, 2001

I'm having to do some estimation on the size of the db that I will eventually create.

I have a 6.7 million row table that holds 5 integers and a varchar(8).
Therefore my crude maths are that an integer is 4 bytes and a varchar is max 8 and therefore each line is 28 maxmimum bytes long. Multiply by 6.7 million and you get 1876000000 bytes or 183203KB or 179MB's.
With me playing with this table the db has balooned from 23mb to 1,325mb. This doesnt work out. One possible explanation is if SQL Server does the same as Access and you need to compress to gain the space back. I wasn't aware of this though. I have filled and emptied the table several times over to test the import routine.

I therefore have a few questions.
1. Why has the db ballooned to this size?
2. How do I accurately work out future db/table sizes?
3. Is there a way to work out the size of a table?
4. Do SQL db's have to be compacted like Access's?

Help appreciated.

View 2 Replies View Related

Size Of Tables

Jun 5, 2008

Hi,

I know I can check individual table's properties for the size and row count of each, but is there a way of doing it for all tables within a database in SQL server 2005 ? I have about 69 tables in one..

Thanks,
Raddy

View 2 Replies View Related

Size Of Tables

Nov 8, 2006

Hi,

I have a database which is 25 GB in size. The database has few tables.

Can I individually find out which table is occupying more space?

Thanks
Santhosh

View 3 Replies View Related

Retrieving A List Ot Tables

Mar 7, 2007

Hello Everyone and thanks for your help in advance.  I am working on an application that connects to SQL Server.  I need to find out if there is any way (I know there is, not sure how) to retrieve a list of tables within a database and also, a way to retrieve a list of databases within a server.  I am using VB.Net in a web application.  Any help on this owuld be greatly appreciated.

View 2 Replies View Related

How To Get List Of Tables In A Database

Jan 22, 2004

Hello

How I get the list of tables in a database. I'm using sql server 2000.

Thanks

View 3 Replies View Related

List User Tables

Apr 14, 2001

I'm brain-dead today, sadly. If it weren't for IE remembering previous entries, I don't know if my name and email would have made it into the header correct :-)

I want the SQL command that lists the names of all user tables.

Alternatively, I have the following problematic Access 2000 code:

Public Sub ListAllTables()
Dim cat As New ADOX.Catalog
Dim tbl As New ADOX.Table
Dim cnn As New ADODB.Connection
Dim i As Integer, j As Integer
Dim vgRet As Variant
Dim intPrefixLen As Integer
Dim strAppend As String

DoCmd.Hourglass True
cnn.Open CurrentProject.Connection
cat.ActiveConnection = CurrentProject.Connection
intPrefixLen = Len(CON_pkgPrefix)

Debug.Print cat.Tables.Count

For j = (cat.Tables.Count - 1) To 0 Step -1
Set tbl = cat.Tables(j)
With tbl
Debug.Print tbl.Name
vgRet = SysCmd(acSysCmdSetStatus, tbl.Name)
End With
Next

Set tbl = Nothing
Set cnn = Nothing
Set cat = Nothing
DoCmd.Hourglass False
vgRet = SysCmd(acSysCmdSetStatus, " ")
End Sub

This code runs fine against an MDB but against SQL it includes all the views, rather than just the tables. If you have a fix for this, that will do just fine!

Arthur

View 1 Replies View Related

Cannot List Tables Or Other Objects

Nov 16, 2004

Sometimes, when a try to list tables or view (or access Management, etc) Enterprise Manager hungs up.
Using SELECT * FROM SYSOBECTS also freezes the process. But the SQLServer is operational for data updates and retrieves.

Anyone?

thanx!

View 2 Replies View Related

List Tables In A View??

Jan 5, 2005

Is there a way to easily list the tables/views that a view is using to get its data?

Thanks in advance,
Shawn

View 1 Replies View Related

How Can I List The Tables If I Have SA Access?

Apr 3, 2008

Hi,

I'm very new in SQL Server. Please help me to combine the connection string to the server.
62.33.197.7
login: sa
pwd: S#15trLdatabase
What would be the connection string then? And can I get the tables names if I have the connection string?

View 5 Replies View Related

Get Value From Columns Using List Of Tables

Feb 5, 2014

how do I get value from column using list of tables?

For example, I have list:

schema_name, table_name, column_name

How do I get:

schema_name, table_name, column_name, column_value

View 7 Replies View Related

How To Get Distinct List From Two Tables

Feb 28, 2014

// C - Categories, P - Parameters, CP_Link - linkage table between C and P

// Basically, it is a list of features belonging to a particular category.

DROP TABLE [C];
CREATE TABLE [C] (
ID_CAutoinc,
Name varchar(32),
PRIMARY KEY( ID_C )

[code]....

OK, this works fine, but I want to get a list of parameters (from P table) which holds only those items that linked to all categories requested. In other words, I want only 'leg' and 'hand', but not the 'beard', because 'girls' not linked to 'beard'.Only common features for all of categories listed "IN (,,,)" wanted.

View 3 Replies View Related

List All Tables In Master

Jan 23, 2007

Hi,I need to list all the tables in northwind database.I'm using sql server 2000.In query analyser i'm in master database.I don't want to change the database to northwind.How to list all the tables in northwind database when the databasecombobox has master in query analyser.I want to run this query with database name.I won't want to run forcurrent database.Kindly help me to solve the problem.Thanks & Regards,Mani

View 1 Replies View Related

How Do I List Columns Within Tables?

Mar 4, 2008

Hi All.
I'm an Oracle DBA who's currently being asked to look at a SqlServer Database. I need a list of columns per table, but am having trouble.
I'll admit I might be being lazy here, but I'm in a hurry and using the valueable resources available to me!! Would really appreciate the sql i need to copy into the query window. Much obliged!!
I need........
Table A
Column1 Datatype
Column2 Datatype
Table B
Column1 Datatype
Column2 Datatype
etc....
Many thanks.

View 7 Replies View Related

How To List All The Tables In AdventureWorks With T-SQL

May 29, 2008



I guess it's possible to do that, because in SQL Server Management Studio, all things(such as Tables,Triggers, Indexes, Constraints, Keys) are displayed in the TreeView.

But I am quite don't understand how to do that with T-SQL.

thanks

View 4 Replies View Related

List Of System Tables

Mar 31, 2008

In which folder under the system tables (syscolumn, sysobjects, etc.) of a database are listed?

View 4 Replies View Related

How To Get The List Of Tables In A Database?

May 29, 2008

Is there a query to get the list of tables in a database in sqlserver2000 and 2005?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved