DataSource Controls :: How To See The Size Of The Individual Tables

May 13, 2010

From using the command: EXEC sp_spaceused on a SQL 2008 database,

the DB has a size of 642.56 MB, unallocated space 148.77 MB.

I can also see the size of the individual tables from the same command:

Reserved: 103656 KB
Data: 98264 KB
Index_size: 2656 KB
Unused: 2736 KB

What I don't quite get is why the total database size is 642.56 MB when the size of the individual tables is so much smaller. We pay for the total amount, in chunks of 500 MB. I was trying to see which tables where causing the DB to be so big, but to me, it looks like it is not the size of the tables but something else.

What should I look at to figure out why we are taking up so much space? Am I not understanding how this works?

View 6 Replies


Similar Messages:

DataSource Controls :: Search Table Column For Substring / Individual Tags

Jan 27, 2010

I have an SQL table which looks similar to the following:

Title | Author | Tags
'title1' 'author1' 'horror, steven king, clowns'
'title2' 'author2' 'childrens, roald dahl, chocolate'

Let's say I wanted to find the name of a book that has the tag 'clowns' in it...how can I do this? 'clowns' is a substring of the tag for 'title1'...but how do I search for substrings? I have tried to use the "LIKE" keyword but obviously it doesn't work in this situation.

View 1 Replies

DataSource Controls :: Finding Code To Loop Through The Reader And Output The Details On Individual Lines Of The Page

Jan 14, 2010

I'm currently trying to build a html table from the results of a sql data reader. As my table has multiple records, I want the code to loop through the reader and output the details on individual lines of the page. In ASP I have done this in the past using something like

[Code]....

but as I am using data readers I'm not sure what the equivalent is.

View 3 Replies

DataSource Controls :: Database Does Not Get Smaller Size?

Jan 15, 2010

I have a database that I just migrated data to. It has grown to 769MB from 13MB when I shrink it, it does not get any smaller. I don't think the amount of data should have made it grow that much. Could I be doing something wrong?

View 3 Replies

DataSource Controls :: What Is Maximum Size Of Database In Sql Server

May 2, 2010

If i have created 1 database. then what would be the max size of that database in sql server 2000 & Sql server 2005?

View 3 Replies

DataSource Controls :: Specify Size For A Nvarchar(max) Or Varchar(max) Type Of Parameter In ADO.Net?

Mar 4, 2010

I have an output parameter called '@packIds', that I create in ADO.Net using the code below:

SqlParameter packIdPara = new SqlParameter("@packIds", null);
packIdPara.SqlDbType = SqlDbType.VarChar;
packIdPara.Direction = ParameterDirection.Output;
sqlCmd.Parameters.Add(packIdPara);

How will I specify that the parameter '@packIds' is of max size? I cannot find any code for this.

[Code]....

View 3 Replies

DataSource Controls :: Create XML With SQL Tables?

Jul 12, 2010

I have the following tables and fields in SQL:

[Code]....

I'd like to create an XML file(based on the above tables mentioned) which I'd like to bind to a treeview control, but I'm not sure how to do that.

View 2 Replies

DataSource Controls :: How To Get Data From Two Tables In Linq

Apr 28, 2010

How to get data from two tables through linq .1 ) productsDetails 2) productsImages to bind further listview.

View 1 Replies

DataSource Controls :: No Of Tables And Columns In Database?

Jun 15, 2010

I want to know that how many tables we can have in database and what is the maximum no. of columns.I also want to know the maximum size for each datatype.

View 3 Replies

DataSource Controls :: Columns To Join Tables?

Apr 27, 2010

I need to join some tables to get the matching records. I often have to ask around to see how certain tables could be joined. Is there any way to query the information schema or some thing else to see what columns/values match in certain tables in order to figure out how tables should be joined.

View 4 Replies

DataSource Controls :: Dml For Primary And Foreign Key Tables?

Jun 3, 2010

how i insert,update and delete data in multiple table .such tables in which primary and foreign key constraint are

View 1 Replies

DataSource Controls :: Generating Tables From Entities

May 13, 2010

I'm creating entity on a project to use them as data on my website. I got my base simple entity Users and my DataContext. The thing is i would like the database to create the table as i create Entities.

I mean, actually my database doesn't have a Users table and do not generate it as i build and launch the project. I used to be a Java dev and in Java the table can be created with JPA so i guess Microsoft made it possible with ASP.net but how to do? I've looked on the web but didn't find it.

View 2 Replies

DataSource Controls :: Tables For Particular Presentation Of Data

Jun 29, 2010

Apologies if this is in the incorrect forum.. just a question about how to best structure some tables for a particular presentation of data. In the following table (2nd column) you'll see that each motorcycle product applies to a range of years. What is the best way to store this range of years in a relational db? At the moment I have a datefrom and a dateto field for the two ranges, but that may complicate things when I want to filter the table by a particular year. E.G. datefrom is 2006 & dateto is 2010 and I would like to filter by products for a 2008 model.

View 4 Replies

DataSource Controls :: Concatenating Rows From Another Two Tables

Apr 13, 2010

I have a problem where I would like to get a comma-separated list of items from a couple of tables as part of a set of results. All the searching I've done so far has produced results for dealing with one or two tables. I have four, and can't get my head around how to adapt the sql to deal with it.

I have the following layout:

*Table_Castings*
+---- CastingID {PK}
| MouldID

| SerialNo

| CastRef

| MeltCode

| Signature

|

|

| *Table_CastCertificates* *Table_Certificates*

| CertificateID {PK} ----------- CertificateID {PK}

+---- CastingID {PK} Description

FileID -----------------+

|

|

*Table_CertificateFiles* |

FileID {PK} -------------+

FullLocation

The results I would like include the following columns:

CastingID, MouldID, SerialNo, CastRef, MeltCode, [Certificates],

Where Certificates is a comma separated list of Description + " " + FullLocation records. (What I'll actually do is add http:// and other html codes to make FullLocation a hyperlink, but I can do that.)

Some SQL I've already got is this:

DECLARE @str VARCHAR(500)

SELECT @str = COALESCE(@str + ', ','') + '<a href="http://' + Table_CertificateFiles.FullLocation + '">' + Table_Certificates.Description + '</a>'

FROM Table_CastCertificates INNER JOIN

Table_Certificates ON Table_CastCertificates.CertificateID = Table_Certificates.CertificateID INNER JOIN

Table_CertificateFiles ON Table_CastCertificates.FileID = Table_CertificateFiles.FileID

WHERE (CastingID = 45)

SELECT output = @str

This actually gives all records in the for the specific casting, but I keep getting an error at the "=" in @str = COALESCE when I try joining it to another query to get each casting.

View 3 Replies

DataSource Controls :: Matched Rows On Two Tables

Jun 17, 2010

[Code]....

View 2 Replies

DataSource Controls :: Sql Statement To Get One Record Each From Two Tables?

Feb 2, 2010

I don't know if I'm posting this in the right place - I have a feeling it can't be too difficult but I can't seem to figure it out. I've come across this problem many times and I've never solved it. I would imagine the scenario is commonplace - I have a table of Products with a PK of ProductID, and a table of related images with a FK of ProductID. Each product can have many images, but for my initial display I want to display one product record with one image record. I have a Sequence field in the Images table and I could pick the lowest one. Right and left Joins return too many records - if I have three images for Product 1 then Product 1 is listed three times.

I've gotten around this before using a flag in the Products table, or listing an image in both tables but I'm sure there must be a SQL statement that can get the information that I need.

View 5 Replies

DataSource Controls :: Insert Data Into Two Tables With Sql?

Feb 17, 2010

I have a details view form inserting data into one table successfully with no problems and picking up the ID parameter from a session.

What i would like to do is one insert SOME of the fields NOT ALL get inserted into another table.

Table 1 = course

table 2 = matrixoneantwo

I tried creating a datasource which inserted data into Matrixoneanttwo and called it from the detailsview_inserting event (sqldatasource.insert() but then i realised that this data source is seperate to my current one and therefore cannot use its parameters.

View 11 Replies

DataSource Controls :: Combine Data From 2 Tables

Mar 27, 2010

I have 2 tables with UserId and FirstName, LastName Columns that I want to combine the data in a Select Statement or Stored Procedure

1. The 2 tables will never have the same data, each table will be distinct

2. I want to combine first and lastnames to a full name (t1.FirstName + ' ' + t1.LastName) AS FullName

3. The statement will be used to populate a dropdownlist with UserId as Value, and Name as text

I am unsure how to accomplish this since I do not need to connect the tables, but combine the Sum of their data.

View 6 Replies

DataSource Controls :: How To Compare Datarows Of 2 Tables

Apr 21, 2010

I want to make some check before I add a list of data

so I create a temp table

[Code]....

and this is the qeury I retrive from DataBase

[Code]....

so now I get 2 data resultI just want to knowhow to compare these 2 data result?

[Code]....

then now allow to add new data...

View 2 Replies

DataSource Controls :: SQL And Linking 2 Tables To Check Value?

Apr 12, 2010

i have a job application process where users apply for a job, in the admin section administrators want to be able to see which applications have not been viewed. Now i have one page which lists all the job vacancies and then users can click into that specific vacancy to see which people have submitted an application. This all works fine.

However on the page i display the job vacancies i need to make it so that if there are any applications within a vacancy that need viewing it appears in RED.

The two tables i am using are below:

tbl_vacancies
job_id
job_name
location
voucher
details
availability
region
date_added
tbl_applications
application_id
job_id
fname
sname
other_info
.
.
.
.
date_addedd
viewed

Now the viewed column is in tbl_applications table, the applications relate to a specific vacancy via the job_id.

So what i need to check is IF there are ANY applications where the viewed = 0, if so that means that there are applications that need to be seen, and i want this to appear in RED.

Now i tried this several ways i.e an INNER JOIN etc.. but the full list of vacancies won't appearing.

So i tried this:

[Code]....

[Code]....

This doesnt work at all. I have a datareader which runs through the returns, i don't get any errors, and the applications display correctly but when i use the IF to check it doesnt work..

View 2 Replies

DataSource Controls :: Making A Search From Several Tables?

Mar 16, 2011

I have a searchbox where i ask for information to a table, but i want to rewrite the code so i can search from several tables.

Here is my temporary select command which works great when using only one table:

[Code]....

View 3 Replies

DataSource Controls :: Retrieving Tables Using Reader?

Jan 20, 2010

I'm quite new to ASP.NET and i was wondering if someone could answer some of my questions.1. What is the difference between a DataTable and an Array? Is the DataTable a serverside control? Is it exposed to the user?2. Does the reader retrieve the column names? If so- how can I capture them? Are they the first row?2. Is it possible to populate an Array using the following sort of code, and if so- how?:

SqlCommand tableCommand = new SqlCommand();
SqlConnection tableConnection = new SqlConnection();
tableCommand.Connection = tableConnection;

[code]...

View 2 Replies

DataSource Controls :: Select Statement Across Three Tables?

Mar 17, 2010

[Code]....

Select statement across three tables

View 15 Replies

DataSource Controls :: Synchronize Data In 2 Tables?

Jan 6, 2010

I need to synchronize data between 2 tables. i need to update records on table2 corresponding to table1. I also need to add new records in table2 by getting new records from table1.

View 2 Replies

DataSource Controls :: Add Data To The Tables After They Are Created?

May 4, 2010

I have created a database along with the tables. The tables have the primary and foreign keys to create the relationship between them. However, I cannot now add the data to the table rows due to the key constraints. How do I now add the data to the tables without making up arbitrary data for the table ID's?

View 5 Replies







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