List Of All Tables And Size
Oct 1, 2001Does 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
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
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.
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
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
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 RelatedHi 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
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
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??
Hi,
Is there anything equivalent to Oracle's Select * from tab in MS SQL.
Hi friends,
How I can get list of tables and list of fields within those tables in SQL server.
Thnak a lot.
How to obtain the list of the tables of a base by un script
View 1 Replies View RelatedHi 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
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!!!
Hi
can I through a script retrieve a list af all tables and stored procedure in a database?
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
Hi Allcan some one please tell me the transact sql code that can list all tablesin a db.thanksTodd
View 1 Replies View RelatedI 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
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.
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
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
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 RelatedHello
How I get the list of tables in a database. I'm using sql server 2000.
Thanks
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
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!
Is there a way to easily list the tables/views that a view is using to get its data?
Thanks in advance,
Shawn
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?
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
// 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.
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 RelatedHi 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.
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
In which folder under the system tables (syscolumn, sysobjects, etc.) of a database are listed?
View 4 Replies View RelatedIs there a query to get the list of tables in a database in sqlserver2000 and 2005?
View 1 Replies View Related