Getting Database Size And Log Size

Aug 11, 2000

Hi,
I am using
exec sp_helpdb
go
dbcc sqlperf(logspace) for
getting database size and log size. Is this gives the correct
database size and log size or Is there any other way to get the logsize and database size by means of query analyzer.

Thanks in Advance.

Seenu. S

View 4 Replies


ADVERTISEMENT

SQL 2005 Resize Initial Log Size: MODIFY FILE Failed. Specified Size Is Less Than Current Size.

Sep 4, 2007


I am trying to resize a database initial log file from 500M to 2M. I€™m using€?

ALTER DATABASE <DBNAME> MODIFY FILE ( NAME = <DBLOGFILENAME, SIZE = 2 ) "



And I'm getting "MODIFY FILE failed. Specified size is less than current size." I tried going into the database properties and setting the log file to 2M, but it doesn€™t keep the changes.



Any help with this process?

View 1 Replies View Related

Table Size And Database Size

Mar 2, 2008

Hi,
i use this script that show me the size of each table and do the sum of all the table size.

SELECT
X.[name],
REPLACE(CONVERT(varchar, CONVERT(money, X.[rows]), 1), '.00', '') AS [rows],
REPLACE(CONVERT(varchar, CONVERT(money, X.[reserved]), 1), '.00', '') AS [reserved],
REPLACE(CONVERT(varchar, CONVERT(money, X.[data]), 1), '.00', '') AS [data],
REPLACE(CONVERT(varchar, CONVERT(money, X.[index_size]), 1), '.00', '') AS [index_size],
REPLACE(CONVERT(varchar, CONVERT(money, X.[unused]), 1), '.00', '') AS [unused]
FROM
(SELECT
CAST(object_name(id) AS varchar(50)) AS [name],
SUM(CASE WHEN indid < 2 THEN CONVERT(bigint, [rows]) END) AS [rows],
SUM(CONVERT(bigint, reserved)) * 8 AS reserved,
SUM(CONVERT(bigint, dpages)) * 8 AS data,
SUM(CONVERT(bigint, used) - CONVERT(bigint, dpages)) * 8 AS index_size,
SUM(CONVERT(bigint, reserved) - CONVERT(bigint, used)) * 8 AS unused
FROM sysindexes WITH (NOLOCK)
WHERE sysindexes.indid IN (0, 1, 255)
AND sysindexes.id > 100
AND object_name(sysindexes.id) <> 'dtproperties'
GROUP BY sysindexes.id WITH ROLLUP) AS X
ORDER BY X.[name]

the problem is that the sum of all tables is not the same size when i make a full database backup.
example of this is when i run this query against my database i see a sum of 111,899 KB that they are 111MB,but when
i do full backup to that database the size of this full backup is 1.5GB,why is that and where this size come from?

THX

View 5 Replies View Related

Sql 2005 Install Error. MODIFY FILE Failed. Specified Size Is Less Than Current Size.

Jun 15, 2006

I installed sql 2005 a while back. Then I recently found out my file system was fat32 (I don't understand why the hardware people did this...) and I had to convert to NTFS. Naturally the sql service no longer worked so I uninstalled inorder to reinstall now I can't reinstall it I keep getting this message



native_error=5039, msg=[Microsoft][SQL Native Client][SQL Server]MODIFY FILE failed. Specified size is less than current size.


I'll try to post the full log in a new post.



View 11 Replies View Related

SPROC Problem - String[1]: The Size Property Has An Invalid Size Of 0.

Mar 16, 2007

Hi folks,Can anyone enlighten me here? I'm trying to use a SPROC which, when supplied with an int, looks up the table and returns certain columns from it. I'm using a SqlCommand, here's my codebehind: ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ SqlCommand dataSource = new SqlCommand("retrieveData", new SqlConnection(dbConnString));        dataSource .CommandType = CommandType.StoredProcedure;        dataSource .Parameters.AddWithValue("id", poid);        dataSource .Parameters.AddWithValue("title", title).Direction = ParameterDirection.Output;        dataSource .Parameters.AddWithValue("creator", creator).Direction = ParameterDirection.Output;        dataSource .Parameters.AddWithValue("assignee", assignee).Direction = ParameterDirection.Output; etc, etc... And the SPROC:------------------------------------------------------------------------------------------------------------------set ANSI_NULLS ONset QUOTED_IDENTIFIER ONGOALTER PROCEDURE [dbo].[retrieveData]    @id int,    @title varchar(50) OUTPUT,    @creator varchar(50) OUTPUT,    @assignee varchar(50) OUTPUT,    @contact varchar(50) OUTPUT,    @deliveryCost numeric(18,2) OUTPUT,    @totalCost numeric(18,2) OUTPUT,    @status tinyint OUTPUT,    @project smallint OUTPUT,    @supplier smallint OUTPUT,    @creationDateTime datetime OUTPUT,    @amendedDateTime datetime OUTPUT,    @locked bit OUTPUT        AS    /**SET NOCOUNT ON;    **/    SELECT    [title] AS [@title], [datetime] AS [@creationDateTime], [creator] AS [@creator], [assignee] as [@assignee],    [supplier] as [@supplier], [contact] AS [@contact], [delivery_cost] AS [@deliveryCost], [total_cost] AS [@totalCost],    [amended_timestamp] AS [@amendedDateTime], [locked] AS [@locked]    FROM purchase_orders    WHERE [id] = @id; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  The id being passed in is definately not null, and is set to a value of an item I know exists. The resulting error is:

Exception Details: System.InvalidOperationException: String[1]: the Size property has an invalid size of 0.Line 63: retrievePODetails.Connection.Open();Line 64: retrievePODetails.ExecuteNonQuery();[InvalidOperationException: String[1]: the Size property has an invalid size of 0.] System.Data.SqlClient.SqlParameter.Validate(Int32 index) +717091... ... Can anyone see anything I'm missing? Thanks,Ally   

View 1 Replies View Related

Error - Output Param - SP - Size Property Has An Invalid Size Of 0

Nov 14, 2007

Using C#, SQL Server 2005, ASP.NET 2, in a web app, I've tried removing the size from parameters of type NCHAR, NVARCHAR, and VARCHAR.  I'd rather just send a string and let the size of the parameter in the SP truncate any extra chars if need be. I began getting the error below, and eventually realized it happened only with output parameters, as in the code snippet below.String[3]: the Size property has an invalid size of 0.   par = new SqlParameter("@BusinessEntity", SqlDbType.NVarChar);  par.Direction = ParameterDirection.Output;  cmd.Parameters.Add(par);  cmd.ExecuteNonQuery();What's the logic behind this? Is there any way around it other than either finding out what the size should be, or assigning a size larger than would ever be needed? ThanksMike Thomas 

View 6 Replies View Related

Reduce The File Size Less Then Original Size In SQL 2000

Jul 25, 2007

I have one db test with one .mdf and .ldf file...mdf file size is 100mb and for some reson i removed all the tablesfrom that .mdf file and transfer it into new secondary file so all thetables moved into secondary file now i want to reduce the first .mdffile from 100 mb to 50mb is that possible,it's showing 90mb is free.Please reply

View 1 Replies View Related

Encrypted Data Size By Original Size, Algorithm ?

Jan 24, 2006

I want to know encrypted data's size for designing database field size.

For example, cardnumber varchar(20) Encrypted by Triple_DES and PassPhrase, How match size does need to encrypted data store field.

I think the size does not depend to PassPhrase char length.

Regards,
Yoshihiro Kawabata

View 3 Replies View Related

String[18]: The Size Property Has An Invalid Size Of 0

Dec 11, 2007

I am getting error to run stored procedure using executenonquery method. The Stored Procedure is having OUTPUT parameter.
ExecuteNonQuery statement is called using SqlHelper.
Error : String[18]: the Size property has an invalid size of 0

View 1 Replies View Related

Best Practice For Data Size/Log Size Ratio

Jul 23, 2005

Just wanted to know what is a general rule of thumb when determining log file space against a database's data file.We allow our data file for our database to grow 10%, unlimited. We do not allow our log file to autogrow due to a specific and poorly written process (which we are in a three month process of remove) that can balloon the log file size.Should it be 10% of the Data file, i.e. if the Date file size is 800MB the log file should be 8MB?I realize there are a myraid of factors that go against file size but a general starting point would be nice.ThanksJeff--Message posted via http://www.sqlmonster.com

View 4 Replies View Related

Analysis :: Different Size In RAM Than Actual Size On Disk

Apr 20, 2015

The Tabular model is showing 19 GB on disk, but it is acquiring around 40 GB in memory.

View 3 Replies View Related

DB Size Not The Actual Physical Size

Feb 15, 2000

Hi,

An MSSQL DB running SAP indicates a smaller DB size (MMC & SAP) than the actual physical size. The difference is about 8 GB.

A lot of records were deleted before this. Did they remain in the DB as NULL values or something ?

Does anyone know what the reason for this could be ? And how to clean this up ?

Thanks in advance,
Paul

View 2 Replies View Related

SQL 2012 :: Existing Replica MDF File Size Increased In Size Than New Replica Install

Apr 14, 2015

Here are my scenarios:

We have an application with replicated environment setup on sql server 2012 . Users will have a replica on their machines and they will replicate to the master database. It has 3 subscriptions subscribed to the publications on the master db.

1) We set up a replica(which uses sql server 2012) on a machine with no sql server on it. After the initial synchronization(used replmerge tool) the mdf file has grown to 33gigs and ldf has grown to 41 gigs. I went to sql server management studion . Right click and checked the properties of the local database. over all size is around 84 gb with little empty free space available.

2) We set up a replica(which uses sql server 2012) on a machine with sql server 2008 on it. After the initial synchronization(used replmerge tool) the mdf file has grown to 49 gigs and ldf has grown to 41 gigs. I went to sql server management studio , Right click and checked the properties of the local database. over all size is around 90 gb with 16 gb free space available.

3) We set up a replica(which uses sql server 2012) on a machine with sql server 2012 on it. We have dropped the local database and recreated the local db and did the initial synchronization using replmerge tool. The mdf file has grown to 49 gigs and ldf has grown to 41 gigs. I went to sql server management studio , Right click and checked the properties of the local database. over all size is around 90 gb with 16 gb free space available.

Why it is allocating the space differently? This is effecting our initial replica set up times.

View 0 Replies View Related

SQL Server Admin 2014 :: Possible To Find Table Size And In That Table Each Row Size

Jun 10, 2014

It is possible to find table size and in that table each row size.

View 4 Replies View Related

Database Log Size

Jun 7, 2007

hi
my database on remote server i cannot access directly.
i can access it only with query analyzer.
my log file size is 9mb but nothing in database. only few tables there so how i can reduce log file size with query.
 
thanks

View 4 Replies View Related

How To Get The SQL Database Size

Jul 15, 2004

Is it possible to get the SQL Server database size programmatically?
I have an WEB application in c# ASP NET, but I can found any information about.

Thanks for your attention

Freedeveloper

View 2 Replies View Related

Database Size

Mar 1, 2002

We have a SQL server database most time for read only because the data source comes from another database( which is not SQL server database, now it is about 2G). Every day we have a job running as following:
Step 0. extra the data from another database, and create plain text files for each table for BCP job.
Step 1. drop all of the index
Step 2. truncate all of the tables.
Step 3. BCP in all of the data from plain text file.
Step 4. create all of the index again
Step 5. shirnk the database.

Everything runs fine but the database grows 1 G from yesterday's database. I am sure we do not have so much data entry in one day.
Any one can give some suggestion?
I wonder if I need do shirnk the database or shirnk the data file before create the index.
How can know how much size for all of the index file?
Thank you very much.
Judy

View 1 Replies View Related

SQL 7 Database Size

May 4, 2001

I am a beginner with sql and I have been inputting data (txt files) to my database and now have approached 4GB in size and it will not let me expand any further on the primary file group. My 'boss' said that sql has no size. I am using desktop

View 4 Replies View Related

Database Size

Aug 13, 2001

Is there a stored procedure that returns the current size of a database, and the maximum size of a database whose growth property IS NOT set to unlimited?

TIA,

Chris

View 1 Replies View Related

Max Size Of A SQL Database

Jul 25, 2000

Just wondering if anyone knew the maximum size of a database that SQL Server 7 can handle.

joe

View 1 Replies View Related

Database Size

May 9, 2000

When I run sp_spaceused on my database it give me a total size of 258MB
The backup of this database reads 226MB
The Properties screen tells me that my data is a total of 278MB
I am running SQL 7.0 .
Why am I getting different sizes?

View 2 Replies View Related

Database Size ?

Mar 30, 2000

I have a simple question, why Am I running out of space with my current 3.5GB database, I am constantly expanding it, yet when I dump the database nightly the dump is just around 1.5GB?

View 1 Replies View Related

Database Size

Dec 17, 2002

Newbie here ....I started with a datbase of 90 megs...it now grew to 300 megs in 2 months...what is the best way to see the largest table or to find out why this database grew so fast? Thanks!

View 3 Replies View Related

Database Size

Jul 6, 2003

Hi..
My database data file are over 2.1 Gbs now. can anyone tell me is my data file too big?? or not safe?? or there's a limite for MSSQL 2000. my last choice are move some data to another database. but i have consider the report i have to make. so i really dont want to do that. can anyone advice. thanks

View 4 Replies View Related

Database Size

Aug 27, 2003

Hi,
I have 30 servers and about 600 databases. I want to know the size of databases ( data files as will log files) both used and allocated space.
Can any one tell me the easiest way to get this information?

Thanks.

View 7 Replies View Related

Database Size

Jul 27, 1999

Hi all,
We are using sql6.5. srvpack 3.
I noticed that one of our database was maxed out, and increased the size of the device and then increased the size of the database.
when I checked the database it is still showing the database is maxed out. I did it twice, it still shows that the space has been used.
Can anyone please explain to me why this is happening and how to get the actual space measurement.
Thanks in advance.

View 2 Replies View Related

Database Size

Nov 13, 1998

After we ran sp_spaceused on one database, the size for the UNUSED column is a negative number -1324KB. Can someone explain how this could happen? I really appreciate.

View 1 Replies View Related

Database Log Size

Aug 20, 2001

Hi,

I need to check the log size of my database periodically and send a notification if the size exceeds 8 GB. I want to set this up as job that runs every 30 minutes or so and page the DBA if it exceeds the above said limit. Can anyone give me the command which can be used to obtain the logsize into a variable. I am new to SQL and would appreciate your expert advise.

Thanks,
Marcus

View 1 Replies View Related

Database Size

Jan 2, 2006

Hi,
Someone can telle how with a query can i get the use size of all my db of akll my server.

I use the table sysfiles but is the total size of my file and not the use size.

Thanks a lot and happy new year.

Best regards.

View 2 Replies View Related

Database Size

May 4, 2006

Is there any shortest way to database size (data & log)

I refer to Article ID: 256650 (reduce log file size)
Quit a lot of step

I want to reduce physical occupied HDD size

View 2 Replies View Related

Database Size

Nov 5, 2007

Is there any way I can join all the information produced by this into a single output rather than multiple outputs

EXEC sp_MSforeachtable @command1=" EXEC sp_spaceused '?'"


Like this
Listing_Images43 16 KB8 KB8 KB0 KB
User 3 16 KB 8 KB 8 KB 0 KB

I want to fill a gridview in ASP but don't know how to deal with data produced through multiple queries

View 3 Replies View Related

Database Size

Apr 24, 2008

Hi All,

Will the database size decrease once I delete data from the audit tables?

View 3 Replies View Related

Database Size

May 18, 2004

I want how can i do to do capacity planning in sqlserver 2000.
Do you make scripts (vbs) who query the sysfiles tables and transfer the answer in excel ?
Please help me.
Phil

View 3 Replies View Related







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