Calculating Row Sizes

Feb 20, 2008

I'm putting together a manual system that tracks data growth in a certain database. I was going to use sp_spaceused as a part of it, but then realized the datatypes for size are CHAR, not INT or BIGINT. I was going to do counts, averages, etc. on those columns but that wouldn't work against a CHAR field obviously. I could easily write a little something to strip out the KB, but was hoping there was another way to get those figures.

Secondly...has anynoe seen a stored procedure/code/etc. that just calculates the largest/smallest/average row size for a table? I haven't been able to find anything anywhere...

Any insight would be greatly appreciated...

Thanks!

View 2 Replies


ADVERTISEMENT

DBs, Sizes Etc

Jul 23, 2004

Anyone here with a ready to go sqlscript that lists all db's, files, sizes, owner etc? I guess it's a combination of sp_databases, sp_helpdb and sp_helpdb [db].

View 2 Replies View Related

DB Sizes

Sep 18, 2007



hi,
i'm planning to create a DB of about 1TB of text.
can SQL EXPRESS handle this sizes of data? what about SQL 2005?

does it matter if i put all the data in 1 table?

Thanks.

View 1 Replies View Related

Data Vs. Log Sizes

Mar 23, 2000

Hello,

I was told a while ago that your Log should be 2 times the size as your data. Is this a good rule of thumb?


Lee

View 2 Replies View Related

Index Sizes

Jul 29, 2002

Does anyone know of a quick way to find out what the largest indexes on a database are? I have a number of tables and was wondering if there's a stored proc or query that I can execute that will list the indexes and their size in order by size? Thanks

View 1 Replies View Related

Index Sizes

Jul 30, 2002

Does anyone know of a quick way to find out what the largest indexes on a database are? I have a number of tables and was wondering if there's a stored proc or query that I can execute that will list the indexes and their size in order by size? Thanks

View 1 Replies View Related

How To Check DB Sizes?

Jan 18, 2006

Hi there

I hope this isn't a totally stupid question, but I was wondering how to check the physical size the DBs take up on disks...

Does MSSQL save DBs as a specific file-extension? Is there an SQL command I can run that will give extensive info on DB sizes?

Any help welcome :)


Thanks!

View 1 Replies View Related

Log File Sizes

Apr 28, 2008

When you have the autogrowth turned on for log files. What happens when you put a max file size on it? Will just overwrite the old logs to keep the file at the max size or will it just create a new file every time it hits the max size?

Thanks!

View 1 Replies View Related

Nvarchar And Varchar Sizes....

Jun 19, 2004

Hello again everyone....

I have another question for everyone....

I am currently cleaning up my database to get its total size down and am not sure how nvarchar and varchar work exactly.

When defining the length of a varchar or nvarchar in enterprise manager, will that effect the size of the entry (as far as data size) no matter what the length of the entry? In other words, will there be a difference in Data Size for an entry with the length of 4 characters with a definition of varchar(4) versus an entry with the length of 4 characters with a definition of varchar(50).

****If there is no difference, is there any reason in trying to best guess the size to give nvarchar or varchar columns? It would seem easier to just define the lengths of columns which need variable lengths to 200 or 400 just to save time in not trying to best guess what the size might be...*****

Thanks ahead for any help...

-Alec

View 3 Replies View Related

Query Table Sizes

May 17, 2002

Hi,
I am looking to runa query to get the sizes of the tables in my SQL 7 DB.
I know I can access the info in Enterprise Manager, under "Tables & Indexes".
But I need to get this info via a query.
I need rows and size.
I figured out how to get rows through the sys tables:
select sysobjects.name, sysindexes.rows
from sysobjects,sysindexes
where sysobjects.name = sysindexes.name
and xtype = 'U'

Is the size of each table stored in a sys table as well? I can't find it.

View 2 Replies View Related

Matching Tables Are Different Sizes

Apr 17, 2001

Hey all,
Got a little problem. have 2 matching tables on different servers with the EXACT same column layout and data (the tables are being replicated with MSSQL7) and one table is 200MB while the other is 2000MB. I'm running MSSQL7 SP2. Any ideas???

-Marc

View 1 Replies View Related

Log File Sizes Are Growing Like Anything.

Nov 8, 2000

Hi,
my log files are growing like anything. One of my log file size is 20GB.
How i have to reduce the log file size.
If i run DBCC command is it come backs...
Pls tell me the way how i have to find the free space and reduce logsizes.
After taking backups also my log file sizes are not reducing.

Thanks!
Kavira

View 2 Replies View Related

Reducing Database And Log Sizes

Dec 16, 1999

I have inherited a number of databases which were substantially over sized when they were set up. I'd like to reduce both the log and database files to be smaller than their original sizes, what's the easiest way to do this? If anyone has any experience of doing this please reply.

View 1 Replies View Related

Oracle Packet Sizes

Aug 5, 2003

We are looking at installing a new Oracle server for a client but have been told that they have used Oracle in the past but had a lot of problems with slow response even though the bandwidth on the WAN was barely being used. He says that this was due to the fact that Oracle sends out very small packets across the network meaning that there are hundreds of packets being sent out. This caused a problem on the routers being used as it was killing the processors. Is this still the case and have you had other reports of slow response of this nature?

View 1 Replies View Related

Device Sizes Are Negative

Mar 30, 1999

Ok, I have a new one. Several of my devices are showing with negative sizes when viewed in edit in enterprise manager. I cannot edit them as the change now button is grayed-out. Oddly enough they are all located on the same drive. The master (on C drive), and the tempdb (on D drive) both show as the default device. I am very confused. User access to the information is fine. What gives?

View 2 Replies View Related

Log File Sizes For All Databases

Jul 21, 2006

Hi All,

I ran the following query to get the log file sizes for all databases:

select (size*8.00)/1024,filename from master..sysaltfiles

When I compared the results from this query with the transaction log properties in EM, not all of the sizes match.
For example, EM shows the transaction log size for tempdb to be 2 MB but the results of the query shows that transaction log size for tempdb is .5 MB. Which query can I run to get the numbers that would match between two? Thanks.

View 3 Replies View Related

Schedule Mail Of DB Sizes

Jan 22, 2004

Wonder if anyone can help me out here.

I'm trying to set up a job to run overnight that mails me the size of all the databases on SQL Server.

The way I'm getting the size of the db's is by running the following in SQL Query Analyzer...

EXEC sp_MSforeachdb @command1="print '?' select cast(name as varchar(32)), round(size * 8 / 1.024,3) from ?..sysfiles"

Can anyone suggest a way that I can export the results of this to a text file that can then be mailed to me as part of a scheduled job.

Or can anyone suggest a better/easier way of doing this??

Thanks in advance. :)

View 6 Replies View Related

Large File (MDF & LDF) Sizes

Oct 1, 2007

Admin is kind of new to me. Could someone recommend how to reduce these file sizes?

In Dev, my MDF is 16 MB, LDF .5 MB.

I run a script to recreate the schema and insert rows on the Host.

When downloading a db backup from the Host and restoring it to Dev, my MDF is 24 MB, LDF 25 MB.

The same dataset grew by ~35 MB!!!

Any advice is welcome. Thank you. Rick

View 11 Replies View Related

Best Practices For Field Sizes

Jul 23, 2005

Can any one direct me to sources for best practices of field types and sizesto use for commonly used information such as address, names, city, businessnames ....Thanks, Brian

View 3 Replies View Related

Print Image Different Sizes

Feb 25, 2008

I have reporting services installed on a windows 2003 server. If i open a report directly on the server using Internet Explorer 7 and reportviewer and click the print button on the report viewer control. The print document lines up perfectly on the output page and prints beautifully. I have a winforms app that calls the same report as an IMAGE and then prints it. The size of the output on the print page is way off and the font is almost triple. I have it working in another clients environment with similar serve setup and same versions. I have tried different print drivers and different workstations but I think it has something to do with reporting services config. Can someone please help. I have set all margins in the .rdl file to 0 and when i create the PrinterSettings object I set all margins to zero again.

Thanks in advance.

Mike

View 3 Replies View Related

Tables ,sizes, Quanity

May 31, 2007

Got a question,

still new to sql server express, been playing with it for a while, kinda enjoying it.



But



If you were designing a database that had many tables with the possibility of a large amount of data, would you keep them all in one database or would you disperse them into multiple databases. There will be some relations used in some of the tables, but not all.



I believe I will end up with about 21 different tables, 9 of them have the potential for 1,000's of records.



I do appreciate anyone's thoughts or concerns

Davids Learning

View 4 Replies View Related

Table Sizes In SQL Server 2000

Nov 14, 2001

How can I get the table sizes for data and transaction logs just like we had in SQL Server 7.0 on the first screen of the Entreprise Manager?

I remember having a bar showing used space in blue and unused in magenta. I bet there are a couple of functions that can be added in a script that will retreive this info.

View 2 Replies View Related

Table Sizes In SQL Server 2000

Nov 14, 2001

How can I get the table sizes for data and transaction logs just like we had in SQL Server 7.0 on the first screen of the Entreprise Manager?

I remember having a bar showing used space in blue and unused in magenta. I bet there are a couple of functions that can be added in a script that will retreive this info.

View 2 Replies View Related

List Of All Table Sizes In A Databases

Mar 6, 2000

Hi,

Is there a query I can run to retrieve a list of all tables and their sizes in a database? I want something that is like the feature in Enterprise Manager when you click on a database and then the 'Tables & Index' link. It lists the tables and their respective size. I want to push this into a spread sheet.

The reason why I am doing this is the compare data between 2 different databases. Since I cannot find a tool that will compare the data, the closest I can get (without bcp-ing out all data and comparing) is to look at the sizes of each table.

Thanks!
Joyce

View 2 Replies View Related

SQL 2012 :: Trace File Sizes

Jul 30, 2014

I am in the middle of capturing a workload to try and tune a SQL instance and was wondering what kinds of sizes people capture in terms of traces. I am only 1 day into a capture and I believe a typical workload would be a week long capture and I am already at 10GB of files. I am only capturing rpc_completed and sql_batch_completed.

What sizes of workloads do other people capture and then where do you analyse them, do you have particular dedicated server for this kind of thing as at present I am looking to use my local PC. Also what rollover file sizes do people tend to use, I am currently using 1GB.

View 7 Replies View Related

SQL Server 2008 :: MDF And NDF File Sizes

Feb 26, 2015

I have one .mdf and two .ndf files on the same drive. The .mdf file size =275GB, one .ndf file size = 300GB and other .ndf file size = 135GB. Is this normal to have 3 different file size? if not what can I do to fix this? I don't have option to make all files to initial size equal to 300GB as a .ndf.If I have to add a .ndf file (in case of running out the above drive), what initial file size should I set up for new file on new drive? And how data gets distributed across all 4 files (including new .ndf on different drive)?

View 2 Replies View Related

Weird Database Back Up Sizes

Oct 14, 2006

I've got a 9gig DB which when backed up using the gui comes to 5gigs.When backed using the SQL "backup database" command it comes to 20gigs.Can someone suggest a good reason for the difference?

View 2 Replies View Related

Ex Post Shrinking File Sizes

Jul 20, 2005

Is there a fairly quick and dirty way to shrink the file size allowedfor a DB on SQL server after the DB is in use?Our old DBA allowed 3 gb for log files and we don't need nearly thatmuch. However, the space is still being used and reserved. Can Ishrink that "maximum" and clear up the space?I don't want to just copy all the tables and primary keys and open anew one with the new data, though that is plan A right now.I cant just change sysfiles, it yells at me.

View 1 Replies View Related

Concatenating Two Strings With Different Font Sizes

Apr 11, 2008



I have a table detail where i need to merge the information on two columns. The difficult thing is, the 2nd column must have a different font size when i render the report. Also the merging of the two columns should not generate a space between the contents of both columns. I have done concatenation using the '&', the only problem is the data in the second column inherits the font size of the first column. I have used textboxes, but it generates spaces if the data in the first column contains lesser characters.

Does anyone have a solution?

AJ0520

View 2 Replies View Related

DB Engine :: List Out All Database Sizes?

May 28, 2009

find out the list of databases that have ''ldf'' size greater than ''mdf' using stored procedure?

View 7 Replies View Related

DB Engine :: Clarification On MDF / LDF Sizes And Backups

Jun 7, 2015

My environment looks like:

- Windows 2008R2 SP2 VM (VMware 6)
- SQL 2012 SP2 Std.
- NetApp iSCSI LUNs, Snapmanager for SQL

So I have created a test database and configured the logs to grow to max. 120MB in size.

To check the allocated and free space I right-clicked the database -> tasks -> shrink file

I see currently allocated: 5,00MB and 2,50MB free space for the MDF Database
I see currently allocated: 1,00MB and 0,63MB free space for the LDF Logfile

Next I use a data generator to fill the database with random data.

After adding around 500k rows I check the size again:

I see currently allocated: 17,00MB and 0,44MB free space for the MDF Database
I see currently allocated: 61,94MB and 0,27MB free space for the LDF Logfile

Next I take a full backup incl. truncating log files. After that I check the size again:

I see currently allocated: 17,00MB and 0,44MB free space for the MDF Database
I see currently allocated: 61,94MB and 57,24MB free space for the LDF Logfile

So now my question is where are those 56,97MB? I imagined they should now be added to the MDF file but they seem to be just gone. I did this procedure 2x more time and the MDF stays the same size while the LDF is almost empty after backups. Then I thought maybe its in the memory of the server so I rebooted it. But still the MDF has the same size... Is this normal? How it should work?

View 2 Replies View Related

Database Design Where Some Products Are T-shirts With Different Sizes

Feb 27, 2007

Hello,
I'm wondering what would be the best approach to designing a database that will have different products one of them being T-Shirts of different sizes... for example 1 t-shirt design might only have 2 available sizes while another may have 4. I'm kinda stumped on how to approach this cuz there is multiple products like CD's, DVD's, Magazines etc which is pretty straight forward, but the T-shirts have this "variable" to it.
What i'm really wondering is should i have 1 main "Products" Table or should i have a separate table for the t-shirts? Should there be a column for each available size?
 Currently my database has a "products table" that has  foreign keys to "Product Type", "Artists", "Genre"
The database is basically for a record company
If anyone has designed a database similar to this i'd love any insight or even possibly to see a database diagram
Thanks 

View 1 Replies View Related

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







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