Skip to main content

Posts

Getting the size of your Microsoft (MS) SQL database

I foudn this at Stack Overflow, and thought it woud be great to save it since it works well. SELECT t.NAME AS TableName, s.Name AS SchemaName, p.rows AS RowCounts, SUM(a.total_pages) * 8 AS TotalSpaceKB, SUM(a.used_pages) * 8 AS UsedSpaceKB, (SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB FROM sys.tables t INNER JOIN sys.indexes i ON t.OBJECT_ID = i.object_id INNER JOIN sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id INNER JOIN sys.allocation_units a ON p.partition_id = a.container_id LEFT OUTER JOIN sys.schemas s ON t.schema_id = s.schema_id WHERE t.NAME NOT LIKE 'dt%' AND t.is_ms_shipped = 0 AND i.OBJECT_ID > 255 GROUP BY t.Name, s.Name, p.Rows ORDER BY t.Name   It returns a table that you can use to calculate the total size. Original post Get size of all tables in database Obvioulsy you must use the database first.

The new IOS 7 mainly visual changes.

I must admit after all the negative press I was worried about upgrading to the new IOS 7. My iPhone 4 may be old but I decided to upgrade it first.  The download took well over an hour on a 4mb ADSL line (for those none Telkom SA users that is DSL). And after doing a backup in installed this was smooth but did take a bit of time.  So what is all the fuss about? To be totally honest I do jot kown. The main thing that has changed is that icons form apple apps are different and look is similar to Vista's aero look with everything being transparent. The buttons that we got used t are replaced with language based buttons, so delete is replace with trash, the button bars are now like menu commands rather than icon based tool bars.  As far as improvements are concerned, most of the changes are visual, I am sure that there are under the good improvements but the visual changes are what seems to be the main change. Zooming app buttons cool open app scrolling, and finally some mult...

Integrative theory Levels - a Summary

From Ken Wilber has composed, I have extracted the below. Each area of development is normally mutually exclusive, except for the last stage which is inclusive. From the many minds of Trans personal Psychology and East-West studies, Ken Wilder and his colleagues have after 2-3 decades came up the notion of at least two different types of components of the mind, there are listed in a tabular form below: Structures of consciousness (the way we grow up) States of consciousness (the way we wake up) archaic magic mythic rational pluralistic integral and higher gross subtle cause based pure witnessing non-dual These are both development sequences. Ken says that each state and structure sees the other states or structures as incorrect, or inferior to the current state, except for integral or non-dual, which sees all the states for what they are and how they are needed. By the way structures are how we think, and states are essentially our level of spiritual aw...

Automatic class or object maker for Access tables in C#

The entity framework is all very well when you run SQL. But what about all of us that are running Access, or are porting old access systems to the web and need to keep legacy systems in place? I was keen to us the object data source to work with data and could not find anything that was able make a class for me. So I wrote my own that listed the tables in the database, then created the class file and stored it in the temp directory. I have a separate code folder to dump these in so that the project does not play with them, rather than dumping them into the App_Code  folder, but you can change this. I placed this code in the test folder of my app which is called  TrackerDotNet So here is the code: First the HTML file <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AutoClassMaker.aspx.cs" Inherits="TrackerDotNet.test.AutoClassMaker" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "ht...

Clearing invoices marked for emails send later or batch in Quickbooks 2013

One of the few great new features in Quickbooks 2013, is that fact that you can send batch emails. The problem with this feature is what happens if you have a whole lot marked for batch, and you only want ot send one lot. Well it look like you are up the paddle without a stream. Here is how I solved it. What you need: QB 2013 Outlook Method 1. In Outlook take it off line, this varies per the version some you can just right click in the task bar others you need to go to Send/Receive->Work offline 2. Go to Quickbooks. Under preferences make sure the email is set to be sent via Outlook. I normally have this off, as since 2006 version I have had problems sending PDF files direct to clients, instead I use a gmail account that automatically forwards reply back to my accounts email. So I have this set to SMTP. But for this excercise, in Quick Books Edit->Preferences->Send Forms. I have set the Send Email Using to Outlook 3. Open up an invoice / estimate. Click on the a...

VBA retrieve and current Row and Colum, in Excel

I wanted to store Row and Column in a VBA macro, and could not really find a good source for the how to anywhere so thought I would document how I did it:   Dim actRow As Integer   Dim actCol As Integer   Dim actRange As String   actRow = ActiveCell.Row   actCol = ActiveCell.Column    ' I actually want 2 rows up in the same colum.   actRange = Chr$(Asc("A") + actCol) + CStr(actRow - 2)   Range(actRange).Select You can change the row and col by just adding 1.

Audible - solving the echo

I love audible, being in the car a lot I use the product a lot. Weather it is a book that is educational, motivational or fiction it is a great service. So recently I got fustrated. I download a new book on to my iPhone and it had a terrible echo. I had downloaded books before where the audio quality was not very good, so assumed it must be the recording. I requested that they exchange the book online which they did and I then I got a new book same problem. Guess how easy it is to fix. On the front page, on the bottom right there is a speed setting, check what it is set too. My echo was caused by it being set to .75x I changed it to 1x and echo gone ;)