Database Is Of 100 GB Size But Empty

May 3, 2013

I have an MS SQL database that appears to have all the data in it but when I do a check on the tables they are all "0 Mb". How can this be? Is my table data being hidden?

View 9 Replies


ADVERTISEMENT

Impact Of Empty Tables On Database Size And Performance

Jun 21, 2007

Hello All,

When creating my database I have modeled some of the tables after the Adventureworks sample database.

There are some fields or entire tables in Adventureworks that I do not see an imediate use for, however; I would hate to ommit them to find out later they would have been benificial. (.eg territory table).



In general terms what would the impact be on size and performance of a database which contains tables or fields that do not contain data.



Thanks for your help!

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

Database Empty

Mar 23, 2006

hello everyone,
am not sure if this is the right forum, but here goes.

We have a couple of clients we support running MS SQL, and as a rule, all db access is by SP and select statements.

However, we noticed earlier today, that a newly created account was empty. All columns except the users columns had been deleted.

1. Is there a way of checking which user account deleted the columns ?
2. Or finding out what went wrong ?

This has never happened before

Afrika

View 3 Replies View Related

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

Making Database Empty

Oct 12, 2005

Hello Experts,
Can anyone tell me, how can I make SQL server database empty.I mean i need to keep only restore the table structur, no table data.

View 1 Replies View Related

Export Empty Database

Jun 13, 2007

This is kind of a elementary question, but how do you export an empty copy of a SQL 2005 database to a backup file? Basically I need a backup without any of the data. Thanks!

View 3 Replies View Related

Index Tuning With Empty Database

May 15, 2000

HI

I have this complex logical model with 60 tables which i have converted to phycical model and into sql 7.0 database now the database is completely new for a new internet project without even single row of data now i have to optimise database and determine if the indexes created by the the designing team are good in sql 7.0 will the give me optimised database or not . I just dont know what to do


1) is it possible for me to use indextuning wizard without the data
whenever i try to to use indextuning wizard it askes me to use a workload file or make workloas file useing a trace as i do not have the data i just have to capture a trace by saying select * from <table>
as the work load file does not return any records the index tuning wizard does not suggest any changes In the indexing
tell me HOW DO I DETERMINE WHAT INDEXES TO CREATE FOR A OPTIMISED DATABESE ?


2) IT IS NOT POSSIBLE FOR ME TO PUT DATA IN ANY ONE TABLE AS ALL THE TABLES HAVE fk AND pk RELATION SHIP so what do i do


3) WHAT DOES dba normally do when he recives an empty data base to optimise

4) where do i make views to optimise the data


5) how do I populate data in so many tables

will puting dummy data help ?


Can some one help me with some SP which will populate the table with dummy data by some kind of do while loop with counter incrementing with 1000 rows

please help me
and if i am not clear
pl tell ask me the questions on my default email or

johnusa44@hotmail.com


john or G2

View 3 Replies View Related

Deleting Empty Tables In Sql Database??

Apr 2, 2006

Hello I have 16000 tables in a sql database and I need a sql query command to delete empty tables from that sql database please help.

F16 LĂ?GHTĂ?NĂ?NNNG

View 8 Replies View Related

Empty The Data From A Large Database???

Mar 21, 2008

Hi i wanna delete all the records from an large database 200 -300 tables, because i want make some changes an start from scratch,but keep the structures of the database key , index etc, i tried to generate script but when i run to many errors , plz help 10x

View 11 Replies View Related

Sql 2k Database Log File Full ... How To Empty That

Jul 20, 2005

hi,my sql database log file has been fulled recently ..... becuasethere are 55 millions records in main 3 tables .... so how i can emptylog file ...i don't want to attach new log file or save any pervious log info.....thanks for helping me ... and my company ..Abdul SalamSr. DBA + ProgrammerXebec Groups of Business.

View 2 Replies View Related

Database Triggers Folder Empty

Dec 19, 2007



I have an interesting problem. I am unable to see any database triggers in the Database Triggers folder under programmability in SQL 2005. I have been able to create and alter triggers in the database that function exactly as their supposed to, yet they never show up as visible in the Triggers folder. I would love for one of the luminaries on this forum to share some wisdom with me and let me know what setting is the culprit. It is driving me batty.

Thank you all in advance.

View 4 Replies View Related

To Find Out Empty Tables In A Database

Jul 20, 2006

Hi all,

I have a database which gets its daily feed from a ftp file. Now is there any way i can figure out the empty tables in the databese which doesnot get any data on the feed.

Thanks in advance,

View 10 Replies View Related

Empty Temp Shopping Cart Database

Jun 23, 2004

After a user adds items to the cart he doesn't checkout but leaves the site.

The next user on the same computer then opens another browser and sees the same items in the cart.

How do I Empty temp shopping cart database after leaving the site just like if I were using cookies.

Thx.

View 1 Replies View Related

T-SQL (SS2K8) :: How To Find All Empty Files In A Database

May 4, 2015

I need to find all empty files in the database (SQL Server 2008R2 SP2) The files become empty after the archival of a partitioned tables.

I was trying this:

select f.name, *
from sysfiles f (nolock)
left join sys.filegroups fg (nolock)
on f.name = fg.name
left join sys.indexes i (nolock)
on i.data_space_id = fg.data_space_id
left join sys.all_objects o (nolock)
ON i.[object_id] = o.[object_id]
where i.name is NULL and o.name is NULL

Did not work.

My file names are the same as the filgroup names containing the file, this is why I was joining by name.

View 2 Replies View Related

How Do I Insert Data From An Access Db To A Empty SQL Database

Jul 11, 2007

Hi,

I'm new to VS2005 (vb.net) and here my situation



I have form with a dataset1 (tbl1, tbl2, tbl3, tbl4) pulling data from a Access db. and showing it on the form1(databound)

I need to write what is on form1 to the empty dataset2 in SQL 2005 db

I have created a new DB in SQL 2005 with a Table SQL1 which has the same fields as on form1. Please can some one show me how do I do this. Please



Thanks in advance for your response.

-NM

View 3 Replies View Related

Does SSRS Have To Create Its Own Database? Or Can It Use An Existing Empty One?

Sep 10, 2007

Hello everyone,


Greetings! I just found this group after wasting hours trying to make
SSRS work with databases that are already created (that is, the DBA
created two empty databases for me, X and XTempDB).



I keep getting "this connection string is invalid can't use this to
connect to SQL Server" in the Database Setup tab.



The problem is that to create its own database, SSRS needs dbcreator
and securityadmin roles (please correct me if I'm wrong here). And I'm
having a helluva problem trying to convince the DBA to give me
temporary dbcreator and securityadmin roles!

Is there any document or
something that I can use to convince him that SSRS will not do
anything like recreating the login (because he said that the login has
already existed and has its role set up in many other databases)?


Any help, pointers, suggestions, etc. is very much appreciated.



Thanks,
Ray

View 7 Replies View Related

How To Pull Null (empty) Records From SQL Database

Dec 5, 2007


How to pull null (empty) records from SQL database,

what query am I suppose to use to get result

help me

thank you
maxs

View 4 Replies View Related

DB Design :: What Is Default Database Value For Empty String

Sep 10, 2015

What is the format for the SQL Server empty string default value?

View 4 Replies View Related

Database Insert Question - Best Practices For Empty Data

Apr 17, 2007

I am making a form that takes input for 1 to 5 students using VWD.  With the help of previous posts I have been able to make the database insert query work properly.  In my form I have a radio list that has the user select if they are entering information for 1, 2, 3,4, or 5 children.  Depending on how many children are selected on the radio list, I am displaying the proper number of textboxes and validating the data using the handy RequiredFieldValidator.  Now I am at the point where I want to perform the instert to the database depending on the selected number of children in the family.  What is the general rule for best  practices. Please keep in mind that it is my understanding that ALL fileds in a SQL insert statment must have data. Should I ...1) create alternative SQL statements depending on the textboxes displayed OR2) is it more common to insert a standard string or integer, depending on the datatype, into the unused textboxes to populate the unused fields? Sincerely,Mike 

View 2 Replies View Related

How To Pass Null Value To The Database If A Form Field Is Empty?

May 31, 2004

How can I pass into the database (@User_fax = null) if the fax form field is empty, from a command type Stored Procedure? For example:

Dim CmdUpdate As New SqlCommand("Form2_NewUser", strConnection)
CmdUpdate.CommandType = CommandType.StoredProcedure

CmdUpdate.Parameters.Add("@User_fax", SqlDbType.char, 9)
CmdUpdate.Parameters("@User_fax").Value = fax.Text()

...

strConnection.open()
CmdUpdate.ExecuteNonQuery
strConnection.close()



And, the stored procedure inside Sql server:

USE market1
GO
ALTER PROC Form2_NewUser
@User_id bigint, @User_fax char(9),...

AS

SET NOCOUNT ON
UPDATE Users
SET User_fax = @User_fax, ...

WHERE User_id = @User_id
SET NOCOUNT OFF
GO



Thank you,
Cesar

View 4 Replies View Related

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 View Related

Integration Services :: Empty String Is Showing As NULL Value In Database?

Oct 8, 2015

In my source table, I have columns FirstName and LastName, both of datatype nvarchar. In my dataflow, I created two new derived columns mapped to these two columns. When pushing data to the source, I noticed that the FirstName column had a value of NULL while LastName was just an empty string (for rows that did not have any value).

My question is, why my source table column FirstName is showing a NULL value when the derived column datatype is string and the source is string? It should just be showing an empty string right?

View 3 Replies View Related

The Database File Is Larger Than The Configured Maximum Database Size.

Mar 20, 2007

I'm getting this error while trying to insert records into a SQL Server Compact Edition database. I have pasted my connection string that was used when creating the database as well as for accessing that same database from my Windows application.

Thanks for any help any of you can give!

Data Source=OnTheGo.sdf;Encrypt Database=True;Password=<password>;Max Database Size=4091

View 3 Replies View Related

Database File Is Larger Than The Configured Max Database Size.

Feb 18, 2008

Hello,

I am developing a smart device application with Visual Studio .Net 2005 and SQL Server Compact Edition database. And also using merge replication to synchronize the data from the mobile device to the SQL Server.

My database size is around 350MB. So when I am trying to synchronize this is the error message that I get.
" The database file is larger than the configured maximum database size. The setting takes effect on the first concurrent database connection only.[Required Max Database size ( in MB; 0 if unknown)=129].

I tried changing the Max database size in the connection string and my connection string looks as follows and still did not have any luck.

connstr= "Data Source=Storage CardItems.sdf;Max Database Size=500;"

Any help regarding this would be appreciated.

Thank you
.

View 6 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







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