Query/read Database Size?
Jul 20, 2005
I have a web-based admin section for a site and I would like to be able to
query the SQL Server database size and display it within my admin area. Is
there a function or method of doing this? My database is hosted by a third
party...
I appreciate any tips or advice you can provide!
Rob
View 5 Replies
ADVERTISEMENT
May 23, 2008
hi
how can read file size in sql query
View 2 Replies
View Related
Feb 6, 2006
Hi folks, sorry for the poor explanation.
Im using SQL 2000
I have a database that has a column named 'Initials' in a char in field
I want to be able to return in a query the highest entries if an indiviuals initials & count from the table, so it would display some like this
Initials Count
DRT 51
AMS 49
JJJ 21
PLI 10
Hope u can help, thanks in advance
View 2 Replies
View Related
May 8, 2008
hi,
How can I get the database size through query?
How can I get the Size of the binary file(image file ) inserted in to the Image Data type of the SQL datatable?
View 7 Replies
View Related
May 26, 2008
Hi,
How to know database size by using Query ?
-- Regards
Prashant
View 13 Replies
View Related
Jan 12, 2012
i attached adventure works in sql server 2008 and it showing as read only ,make it read write or remove read only tag from database.
View 11 Replies
View Related
Jan 18, 2008
I have two database files, one .mdf and one .ndf. The creator of these files has marked them readonly. I want to "attach" these files to a new database, but cannot do so because they are read-only. I get this message:
Server: Msg 3415, Level 16, State 2, Line 1
Database 'TestSprintLD2' is read-only or has read-only files and must be made writable before it can be upgraded.
What command(s) are needed to make these files read_write?
thanks
View 7 Replies
View Related
Jun 27, 2014
i have a database which get refreshed every day from client's data . and we need to pull heavy data from them every day as reports . so only selects happens on that database.
we do daily population of some table in some other databases from this daily refreshed DB.
will read uncommitted or NOLOCK with select queries to retrieve data faster.
there will be no dirty read as there are NO DML operation in that database so for SELECT which happens concurrently on these tables , will NOLOCK work?
View 2 Replies
View Related
Apr 14, 2014
I receive Error: 3967, Severity: 17, State: 1. Insufficient space in tempdb to hold row versions. We have 8 data files for temp db of 10210 GB size and given 10240 GB as max size.
As MS suggest to calculate the temp db file size and growth rate we need to monitor the perform counters Free Space in Tempdb (KB) and Version Store Size (KB) in the Transactions object.
basic formula: [Size of Version Store] = 2 * [Version store data generated per minute] * [Longest running time (minutes) of your transaction
My report disk utilizations says tempdb is full ? I thonk I need a shrink for the file .
Still I am confused in calculating the size , My perform counter gives me data as such
Free Space in tempdb (KB)Â Â Â Â Â Â Â Â Â Â Â Â Â Â 279938496
Version Generation rate (KB/s)Â Â Â Â Â Â Â Â Â Â 53681040
Version Cleanup rate (KB/s)Â Â Â Â Â Â 53422320
Version Store Size (KB)Â Â Â Â Â 258720
Version Store unit count      22
Version Store unit creation                     774
Version Store unit truncation        752
View 4 Replies
View Related
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
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
May 9, 2012
I'm taking a database(read-only) backup from one server and restoring it on other server. As soon as restore is done it is bringing database into single-user read-only mode.
why it is bringing the database into single user mode ?
View 1 Replies
View Related
Mar 4, 2006
I'm new to ASP.NET (I normally work with Windows Forms) and have installed the Club Website Starter Kit. I created an Administrators role and a user called "admin". When I run the project locally, everything works as it should - I can log in as admin and I can create new users.
I then copied the site to localhost (C:Inetpubwwwroot), but when I run the site from localhost, I can't log in (as admin or any other user); instead I get a message that says, "Your login attempt was not successful. Please try again."
Also, I can't create a new user. When I try, I get the following error:
Server Error in '/' Application.
Failed to update database "C:INETPUBWWWROOTAPP_DATAASPNETDB.MDF" because the database is read-only.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Failed to update database "C:INETPUBWWWROOTAPP_DATAASPNETDB.MDF" because the database is read-only.Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): Failed to update database "C:INETPUBWWWROOTAPP_DATAASPNETDB.MDF" because the database is read-only.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857242
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734854
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +3612
System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +305
System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +105
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453
System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +149
System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
I figure there must be a simple(?) explanation and solution for this problem, and ideally, some sort of step-by-step procedure that new users to ASP.NET can follow to configure a site - such as one of the starter kits - to work correctly. I can honestly say that trying to get this working has been an extremely frustrating experience.
If someone could help me out, I would really appreciate it. I've been working on this for two days and feeling I have hit the wall.
Thanks in advance.
View 1 Replies
View Related
Mar 28, 2006
Hi there,I am getting a real problem with ASP.NET 2.0, all i am trying to do is run a recovert password (using the login controls) and i got the following error.Does anybody know how to fix this? I have tried the SSEUTIL answer here and it didn't work. http://forums.asp.net/909168/ShowPost.aspxI also ensured that Network Services user has READ/WRITE/EXECUTE premissions on the directory below and that each file isn't read only and also that it inherits ACL from the directory which it seems to do..Bit of strange one this, it isn't created (and i am not using) a beta version of VS 2005 Pro... but a full retail version.The PC is the local PC with IIS 5.1 and VS installed... it is the one i am using for developing.. I don't need to copy my files to the IIS directory below as that is where i have created it and open it in VS 2005 from there..I did read that if you use IIS 5.1 then the user should be ASPNET ... but i don't seem to have that use but a Network Services user...Any help or guidance would be really appreciated... i have come to a stop stage and can't get any further..Thanksian
Server Error in '/igdotcom' Application.
Failed to update database
"C:INETPUBWWWROOTIGDOTCOMAPP_DATAASPNETDB.MDF" because the database
is read-only. Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. Exception Details:
System.Data.SqlClient.SqlException: Failed to update database
"C:INETPUBWWWROOTIGDOTCOMAPP_DATAASPNETDB.MDF" because the database
is read-only.Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
View 3 Replies
View Related
Mar 31, 2008
hi
i am currently testing my website on IIS7, and first error is that:
Server Error in '/' Application.
Failed to update database "C:INETPUBWWWROOTAPP_DATAASPNETDB.MDF" because the database is read-only.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Failed to update database "C:INETPUBWWWROOTAPP_DATAASPNETDB.MDF" because the database is read-only.Source Error:
Line 109:
Line 110: conn.Open();
Line 111: SqlDataReader reader = command.ExecuteReader();
Line 112: reader.Close();
Line 113: command.Connection.Close();
i cheked on aspnet_Data folder to see if is read-only AND IT IS, but if i change it, the read-only property is setting up again. why?
thanks in advance
View 1 Replies
View Related
Jul 20, 2005
I had a databases running on SQL Server (EVALUATION VERSION).I moved it to another system running:-Windows 2000 Server-IIS 5.0-BlueDragon Server-MSDEI applied all of the latest service packs, security updates, etc...Intalled SQL Server Web Data Administrator and .NET framework.I attached the database using sp_attach_db:[color=blue]>osql –U sa>password>Sp_attach_db ‘whatever',>@filename1 = ‘C:Program FilesMicrosoft SQL[/color]ServerMSSQLDataCollaborationTools.mdf',[color=blue]>@filename2 = ‘C:Program FilesMicrosoft SQL[/color]ServerMSSQLDataCollaborationTools.ldf'[color=blue]>go[/color]I added my datasource using the ODBC Admin Tool...Verified it using the BlueDragon Admin Datasources page....But now I'm getting the error message:'Could not run BEGIN TRANSACTION in database 'whatever' because thedatabase is read-only.'Any help/guidance would be appreciated.Thanks very much.Shaun
View 3 Replies
View Related
Dec 19, 2006
I am building a Windows Forms application in VS 2005, using C# and SQL Server 2005 Express as the backend.
When I try to accessd data from the db, it works with no problems.
When I try to insert/update/delete, I get the following error message
Failed to update database "DBNAME" because the database is read-only.
I am using a connection string with the following syntax:
"Data
Source=.SQLEXPRESS;AttachDbFilename=c:PATH_TO_DBdb.mdf;Database=MyDB;Integrated
Security=False;User Instance=False;User ID=USR;Password=PWD;"
I have made sure that the permissions on the DB are set (in Windows) so
that all users can modify. The user that is logging in to the DB has
status set to DBOWNER.
I have seen others experience the same problem - with ASP.net sites,
not Windows Forms sites (thus most of their solutions dont apply to me)
Any ideas on what is wrong and how I can get this to work?
View 9 Replies
View Related
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
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
Dec 29, 2011
I am having the example xml with the data as shown below,
declare @x xml
set @x = '<SinterklaasWishlists>
<child>
<name>Tim</name>
<wishlist>
<article>
<artno>21491269</artno>
[Code] ....
I want to extract the elements of xml using sql query and insert the data into the table as shown below:
CHILDNAME ARTICLE_NUMBER DESCRIPTION PRICE
------------------ ---------------------------- ----------------------------------- -----------
Tim1 21491269 Crane 12.50
Tim1 21499517 Keyboard 10
Tim1 21521591 Crime Investigation Game 9.95
Tim2 3145678 Mouse 12.50
View 2 Replies
View Related
Feb 6, 2008
I use excel as an interface to write query to retrieve data from a database in network drive. My problem is everyone can open and edit my query. Of course, the univeral database access user name and password will ask but everyone know this.
How can I put password to prevent any query modification?
Thanks
Daniel
View 1 Replies
View Related
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
Oct 2, 2007
getting this error after publishing my site to local IIS, then trying my signup page.
Failed to update database "C:INETPUBWWWROOTAPP_DATAASPNETDB.MDF" because the database is read-only.
have tryed to change the attributes, still not working. have given write access to the APP_DATA folder from IIS, still not working.
and i cannot delete the APP_DATA folder from IIS, it says it is being used by another process or program. how to fix this? and or delete the folder?
View 1 Replies
View Related
May 31, 2005
I use MS Sql DataBase file (SQL 2005 )as the conneciton in my project.When I use GridView to update my database, it fail:The error message is :Failed to update database "D:DATAASPNETHEALTH8APP_DATADBHEALTH.MDF" because the database is read-only. What is the problem with it?
View 12 Replies
View Related
May 8, 2000
Hello,
I'm optimizing a database running under SQL 7.0. Have anyone any knowledge wether setting the database to "read only" can enhance performance? The database is used only for reading, one table is updated via DTS on a hourly basis, the rest of the tables on a daily basis.
Brgds
Jonas Hilmersson
View 3 Replies
View Related
Aug 5, 2005
Hi
I have been learning on how to use the new features of the .NET 2.0, and Well I using VS2005 and everything is pretty straight foward. I did a Membership webform where you log in and create users and roles etc. I installed the SQL Server 2005 express as my Data provider and thats where my Tables are. I used the aspnetsql_reg comand to integrate the server to this application. Anyway my problem started when i decided to copy my project to my IIS server and well when I run the app from the Browser tells me that he Database It's set to Read-Omly and therefore it cant update it. This happens right after log in. but then I open the App. on hte VS and it runs find.
This is the error:
View 58 Replies
View Related
Mar 8, 2007
hi
I'm having a problem while attaching the database to the server through server management studio. The database is getting attached as read only database.
But when i'm attaching it through command prompt or using a batch file it is getting attached properly
Can any one suggest the rason and a reamedy for avoiding this problem
View 3 Replies
View Related
Jun 25, 2007
Hi,
I've reatored a database into my SQL Server 2005. It has been restored as "Read Only" Database. So I couldn't make any changes in my database. I don't know how to make the "Read Only" database as a Writable one. Can you help me out?
Thanks
View 3 Replies
View Related
Aug 3, 2007
Hi guys,
I'm using SQL Server 2005 Express. When i'm attaching My project database through "SQl Server Management Studio" The database is getting attached as a 'Read only' database. But when i'm attaching the same database from command prompt or using a batch file it is getting attached normally.
The database is from another system. It is behaving the same on the parent system on which it is developed.
View 4 Replies
View Related
Nov 29, 2007
How can I read type of all fields in joined query?
Is there a stored procedure method to use for this purpose?
Thanks
View 3 Replies
View Related
Feb 26, 2007
Could someone please point me in the right direction on how to read ina large query with .net.I am trying to emulate a legacy database system so I don't know theupper bounds of the sql query. An example query would be somethinglike:Select * from invoices where year 1995the query must be updatable and only return say 10 to 100 rows at atime.It should also be forward only and discard rows no longer in use tosave memory.And if at all possible I would like to lock one row at a time as therow is read in.
View 5 Replies
View Related
Apr 16, 2007
Dear Friends,
I have an OLE DB Command inside an ETL. I want to execute a stored procedure that returns 2 fields, for example:
CREATE PROCEDURE sp_Name
AS
SELECT Field1, Field2 FROM Table
How can I continue the dataflow? How can I return the values from the query? Returns only a row...
View 10 Replies
View Related
Jul 29, 2005
i have created a appl and deployed it in IIS .
When i login from the login page i get a error :Server Error in '/slepcha' Application.--------------------------------------------------------------------------------
Failed to update database "C:INETPUBWWWROOTSLEPCHAAPP_DATAASPNETDB.MDF" because the database is read-only. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Failed to update database "C:INETPUBWWWROOTSLEPCHAAPP_DATAASPNETDB.MDF" because the database is read-only.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
View 1 Replies
View Related