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


ADVERTISEMENT

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

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

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

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

DB Engine :: How To List All The Pages For A Table

Nov 19, 2015

In SQL Server, is there a way to list all the data pages, index pages, IAM pages, etc. for a given user table? Like this:
 
Data pages: (1, 200), (1, 201)
Index pages: (1, 202)
 
Or if that is impossible, then is it possible to list only the data pages for a table?

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

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

Scheduled Report For Database Names And Sizes

Jul 20, 2005

Does anyone has a script which gives all databases names and thereallocated, used sizes in SQLserver2k. I want to schedule this to create adaily report.Thanks,Nasir

View 1 Replies View Related

DB Engine :: How To Get List Of Parameter That Uses DatabaseProperty And DatabasePropertyEx Functions

Oct 22, 2015

How do I get the difference between DatabaseProperty() function and DatabasePropertyEx() Functions and how to get list of parameter that uses DatabaseProeprty() and DatabasePropertyEx() Functions.As in sql 2012 both gives red wavy line when I try to use in query analyser.

View 3 Replies View Related

DB Engine :: How To List Out All Filtered Drivers Installed On A Machine

Nov 26, 2015

Is there any windows command or any tool which would tell me what all 3rd party s/w's or Filtered drivers on my server (like antivirus, monitoring tools like Diskeeper or any I/O throttling s/w etc..)

View 3 Replies View Related

DB Engine :: Query To List Out Late Running Jobs

Nov 11, 2015

Any sql script or powershell script which outputs late running jobs? Currently I am using the below script to find out currently running jobs along with duration. But my requirement is to add few more columns to the query which indicates whether jobs is running fine or running behind expected time.

-currently using query to pull running jobs
SELECT
    ja.job_id,
    j.name AS job_name,
    ja.start_execution_date,      
    ISNULL(last_executed_step_id,0)+1 AS currently_executing_step_id,
   
[code]...

View 4 Replies View Related

T-SQL (SS2K8) :: Capture Database Sizes Table With Date

Jun 5, 2014

I'm trying to capture the sizes of all Databases into a Permanent Table and include the Date.

It works when inserting into a #Temp Table.

When I try inserting into a permanent table it returns NULL.

The following code needs modified to create a permanent table and store the Date:

CREATE TABLE #databases ( DATABASE_NAME VARCHAR(50), DATABASE_SIZE FLOAT, Date VARCHAR(100) )

INSERT #Databases EXEC ('EXEC sp_databases');
SELECT@@SERVERNAME AS SERVER_NAME, DATABASE_NAME,
DATABASE_SIZE AS 'KB',
ROUND(DATABASE_SIZE / 1024, 2) AS 'MB',
ROUND((DATABASE_SIZE / 1024) / 1024, 2) AS 'GB',
CONVERT(date, getdate()) AS Date FROM #databases

DROP TABLE #databases;

View 9 Replies View Related

Transact SQL :: Report Table Sizes In Each Database On Server

Aug 4, 2015

The below query works perfectly fine, except that it  produces many outputs instead of one continuous table that can be easaly converted to xml / csv by copying it from the "Results" window. 

What I need is a query that will produce a single result for all the tables in all the databases on the server.

The results:

The query:

DECLARE @begin INT = 1, @end INT, @sql NVARCHAR(MAX)
DECLARE @CREATE_TEMPLATE VARCHAR(MAX);
DECLARE @DBNAME VARCHAR(255);
DECLARE @SQL_SCRIPT VARCHAR(MAX);
SELECT @end = COUNT(name) FROM sys.databases
SET @CREATE_TEMPLATE = '

[Code] ....

View 11 Replies View Related

DB Engine :: How To Find List Of Indexes On Tables On Which Views Has Been Created

Aug 28, 2015

The views are in XYZ production database and user needs the list of indexes on the tables on which the views has been created.

query to find list of indexes on the tables on which the views has been created.

View 4 Replies View Related

Is It Neccesary To Restart Sql Server Engine After Modifying A Noise Word List?

Sep 26, 2007



Hello all,
We are using sql server 2005 for full text searching.

I removed some of the words in the noise word file (noiseENU.txt) and rebuilt the catalog. However i find that the changes made to the noise file do not reflect immediately. I had to restart sql server engine before my queries returned results according to the updated noise list. Is there a workaround for this ( wherein there isnt the neccesity of restarting sql server engine....this is becoming a problem on live environments as i cannot restart the server when needed)?

Thanks in advance,
Harish

View 3 Replies View Related

Finding Database Sizes And Unallocated Space On A Server Wide Scale

Apr 22, 2008



Morning forum,

I'm having a problem to which I'm sure the answer is simple...

All I want is a list of databases on my server with their allocated size and the free space within. Something similar to the first table that sp_spaceused gives you but on a server wide scale.

As I say, I'm sure there's a simple solution out there, but alas Google has failed me.

Thanks in advance,

Dan.

View 4 Replies View Related

Query To Give All Table Sizes On A Database (was Query Help)

Mar 9, 2006

Hi,
Does anyone has query to give all table sizes on a database?
Appreciate your help.
Thanks

View 2 Replies View Related

SQL 2012 :: Database Mirroring And NT Authority Account For Database Engine?

Dec 2, 2014

I have just finished configuring my first test mirrored environment (High safety mode). I setup the database engine service accounts on each of the servers with domainuser. I inherited a production mirrored environment set up by someone else. On the production servers the database engine service account is NT Authorityuser a local account. I am trying to practice installing Windows updates within a mirrored environment and I not sure how to proceed when the service account is NT Authority user account. should I change the service account to a domainuser?

View 2 Replies View Related

The Microsoft Jet Database Engine Cannot Open MS-Access Database

Aug 18, 2007


I have MS-Access as data source for one of the reports. I can preview the report fine from BI studio however, it does not work when I deploy it on report server.

The error is :

An error has occurred during report processing.
Cannot create a connection to data source '<data source name>'.

The Microsoft Jet database engine cannot open the file '<UNC location of the MS-Access database>'. It is already opened exclusively by another user, or you need permission to view its data.




MS-Access database is located on a different server.

Any help to solve this? I understand it has something to do with permission both on server where reporting service is running as well as the server where MS-access database is located. Pls help.

View 2 Replies View Related

How Can We Modify The Files Path For The Database In Database Engine?

May 14, 2007

Hi, all experts here,

Thank you very much for your kind attention.

I am trying to modify the files path (primary file, log file) of databases, but it looks like I am not able to mofidy their files path directly from the database property dialogue? Would please any experts here give me some ideas on what else can I try to figure it out? Thanks a lot in advance and I am looking forward to hearing from you shortly.

With best regards,

Yours sincerely,

View 5 Replies View Related

SQL Server 2008 :: Script To List All Database Level Permissions In A Database?

Aug 4, 2015

I found this script online..

SELECT prin.[name] [User], sec.state_desc + ' ' + sec.permission_name [Permission]
FROM [sys].[database_permissions] sec
JOIN [sys].[database_principals] prin
ON sec.[grantee_principal_id] = prin.[principal_id]
WHERE sec.class = 0
ORDER BY [User], [Permission];

but the results are this: 2 columns - User and Permission

User Permission
User1 GRANT CONNECT
User2 GRANT CONNECT

IS there a way in SQL Server (2005/2008/2012) to run a script against a Database that will show all users that have permissions to that Database and the type of permissions?

View 7 Replies View Related

SQL Security :: Cannot Expand List Of Database Tables Using Contained Database Login With Server Management Studio

Jul 30, 2015

In SSMS, I connect Object Explorer to a partially contained database using a contained user login with password. This user has a database role of dbdatareader. When I try to expand the Tables in the database, I get the error: 

The SELECT permission was denied on the object 'extended_properties', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)

Is there a way to set permissions for the contained user so that this could be done?

View 4 Replies View Related

Database Search Engine

Jul 9, 2004

Hi folks,
Whts up........??? M back, after a long gap.
I have come across with a major issue. And u know wht th issue is.........???
It is about th DATABASE SEARCH TOOL. I have a database of around 30 tables. Now I wud like to have aa search engine on my .asp page. There will be a text box on th page and one submit button. After typing some text in th text area n submitting th page, my package sud check tht perticular text in all th COLUMNS of all th TABLES, n whrevr it gets a match (exactly same, or by speech recognition), it sud through th links on th next page.

Nw i wud like u guys to take this problem, at th earliest n come up with a up to th mark solution.

Thnkx

View 12 Replies View Related

How Come I Don't See Database Engine Under MSSQLSERVER

May 21, 2007

in Surface Area Configuration for Features.

What the problem is?

Thanks in advance.

View 12 Replies View Related

Cannot Connect To Database Engine

Jan 7, 2012

i installed sql server 2005 but cant connect to database engine. i write (computer name)sqlexpress but it failed. error is:

TITLE: Connect to Server
------------------------------
Cannot connect to rezasqlexpress.
------------------------------
ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

View 1 Replies View Related

How Come I Don't See Database Engine Under MSSQLSE

May 21, 2007

in Surface Area Configuration for Features.

What the problem is?

Thanks in advance.

View 4 Replies View Related

Cannot Connect To Database Engine

Apr 30, 2008

Hi,

I've just installed a brand new instance of SQL on a new server. It's for our Helpdesk/Inventory software. All I needed to install was the DB Components and the Tools (primarily for Management Studio). I did not install SQL as a default instance, but called it TRACKIT8 (software using this instance). I have subsequently installs SP2 before trying to connect to the DB.

I am unable to conect to the DB Engine via Management Studio. In the Server name: field, there is a blank space, so I try to browse for a server, but I get nothing. I try to manually type the name of the server (NIASSQL2, localhost etc) into the field, but I cannot connect to the engine at all. I can see the services for the Server and Server Agent have started in the SQL Server Configuration Manager and I am able to change certain field in the properties of the Server and Agent (change the path of the error logs).

Is there something I am supposed to configure before I try to connect via the Management Studio? I am looking to change the paths of the Data Files, as I don't want them on my C: partition. Plus I have other instances I want to create and install. Any help would be greatly appreciated.

Cheers.

View 1 Replies View Related

Sp2 Failed For Database Engine

Mar 14, 2007

SP2 failed for database engine.

Following is the error:

EventType : sqlsesetup     P1 : do_sqlgroupmember     P2 : 0x7348    
P3 : do_sqlgroupmember     P4 : 0x7348     P5 : sqlca_sqlsecurityca.cpp@1132
P6 : unknown     P7 : sql9     P8 : hotfix@     P9 : x86     P10 : 3042 

 

Product                   : Database Services (MSSQLSERVER)
Product Version (Previous): 1399
Product Version (Final)   :
Status                    : Failure
Log File                  : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9_Hotfix_KB921896_sqlrun_sql.msp.log
Error Number              : 29512
Error Description         : MSP Error: 29512  SQL Server Setup was unable add user NT AUTHORITYSYSTEM to local group DCCIBERSQLServer2005SQLAgentUser$DCSQL01$MSSQLSERVER.


any help appreciated...

View 2 Replies View Related

Deleting A Database Engine

Mar 14, 2008

I have recently installed SQL server 2005 express edition along with Sql server management studio expressI have run the installation twice and during the installation I have created two instances of SQL server one named instance having Windows authentication and the other default instance having mixed mode authentication. Now I want to delete the named instance. Could anybody tellme I can delete the named instance?

View 3 Replies View Related

I Cannot Connect To The Database Engine ...

May 4, 2007

I can connect to Analysis Service and Integration Service but I can not connect to the Database Engine. I receive the following error message:



Cannot connect to homebase.

Additional Information:

An error has occurred whlie establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server doesn not allow remote connections. (provider: SQL Network Interfaces, error: 25 - COnnection string is not valid)(Microsoft SQL Server, Error:87)


(Click on OK to continue)

View 4 Replies View Related

DB Engine :: No Database Encryption Key Is Set

Jul 15, 2015

I'm a newbie to SQL and I inherited a 2008 R2 Sql server with about 20 different databases on it.  I've noticed that more than half of the databases are encrypted and I was looking to encrypt the rest but for some reason I am unable to do so.  I'm assuming I already have a master key created but when I go to Options of the DB and change Encryption Enabled from False to True I get and error, "Cannot change database encryption state because no database encryption key is set."  How I could use my existing key to encrypt the databases or would I have to create a separate key for each db?

View 6 Replies View Related

Upgrading Database Engine To 64 Bit

May 7, 2008

If I am upgrading the SQL Server 2005 32 bit to 64 bit (only DB Server), Do Applications that communicate with Database need to be upgraded to 64 bit as well???

Thanks,

View 1 Replies View Related







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