-- Get size of Database
EXEC DATABASENAME.dbo.sp_spaceused
-- Get size of a Table in database
EXEC DATABASENAME.dbo.sp_spaceused 'TABLENAME'
-- Get size of All tables in a database
EXEC DATABASENAME.dbo.sp_spaceused '?'
-- Sql Query
USE DATABASENAME
GO
DECLARE @database_size DECIMAL(15,2)
SELECT @database_size = SUM(((convert (dec (15,2),[size]) * 8192 / 1048576)))
FROM dbo.sysfiles
PRINT @database_size
Friday, April 3, 2009
Thursday, April 2, 2009
Software Configuration Management (SCM)
Software Configuration Management (SCM) is part of configuration management (CM). Roger Pressman, in his book Software Engineering: A Practitioner's Approach, says that software configuration management (SCM) is a "set of activities designed to control change by identifying the work products that are likely to change, establishing relationships among them, defining mechanisms for managing different versions of these work products, controlling the changes imposed, and auditing and reporting on the changes made." In other words, SCM is a methodology to control and manage a software development project.
SCM concerns itself with answering the question: somebody did something, how can one reproduce it? Often the problem involves not reproducing "it" identically, but with controlled, incremental changes. Answering the question will thus become a matter of comparing different results and of analysing their differences. Traditional CM typically focused on controlled creation of relatively simple products. Nowadays, implementers of SCM face the challenge of dealing with relatively minor increments under their own control, in the context of the complex system being developed.
Variety of artifacts may be managed and versioned, including software code, documents, design models,and even the directory structure itself
The goals of SCM are generally:
Configuration Identification- What code are we working with?
Configuration Control- Controlling the release of a product and its changes.
Status Accounting- Recording and reporting the status of components.
Review- Ensuring completeness and consistency among components.
Build Management- Managing the process and tools used for builds.
Process Management- Ensuring adherence to the organization's development process.
Environment Management- Managing the software and hardware that host our system.
Teamwork- Facilitate team interactions related to the process.
Defect Tracking- making sure every defect has traceability back to the source
SCM concerns itself with answering the question: somebody did something, how can one reproduce it? Often the problem involves not reproducing "it" identically, but with controlled, incremental changes. Answering the question will thus become a matter of comparing different results and of analysing their differences. Traditional CM typically focused on controlled creation of relatively simple products. Nowadays, implementers of SCM face the challenge of dealing with relatively minor increments under their own control, in the context of the complex system being developed.
Variety of artifacts may be managed and versioned, including software code, documents, design models,and even the directory structure itself
The goals of SCM are generally:
Configuration Identification- What code are we working with?
Configuration Control- Controlling the release of a product and its changes.
Status Accounting- Recording and reporting the status of components.
Review- Ensuring completeness and consistency among components.
Build Management- Managing the process and tools used for builds.
Process Management- Ensuring adherence to the organization's development process.
Environment Management- Managing the software and hardware that host our system.
Teamwork- Facilitate team interactions related to the process.
Defect Tracking- making sure every defect has traceability back to the source
Wednesday, April 1, 2009
SQL - Update table A from table B
-- SIMPLE UPDATE QUERY FROM TABLE A TO B
UPDATE TABLEA
SET TABLEA.[NAME] = TABLEB.[NAME]
FROM TABLEB
WHERE TABLEB.ID = TABLEA.ID
-- USING JOINS
UPDATE TABLEA
SET TABLEA.[NAME] = TABLEB.[NAME]
FROM TABLEB
INNER JOIN TABLEC
ON TABLEC.FIELD1 = TABLEB.FIELD1
WHERE TABLEB.ID = TABLEA.ID
UPDATE TABLEA
SET TABLEA.[NAME] = TABLEB.[NAME]
FROM TABLEB
WHERE TABLEB.ID = TABLEA.ID
-- USING JOINS
UPDATE TABLEA
SET TABLEA.[NAME] = TABLEB.[NAME]
FROM TABLEB
INNER JOIN TABLEC
ON TABLEC.FIELD1 = TABLEB.FIELD1
WHERE TABLEB.ID = TABLEA.ID
VB.Net - Get Directory / Folder Size
Public Function GetFolderSize(ByVal path As String, _
ByVal includeSubFolders As Boolean) As Long
GetFolderSize = 0
Dim main_dir As New System.IO.DirectoryInfo(path)
Dim dir_files() As FileInfo
If includeSubFolders Then
dir_files = main_dir.GetFiles("*", SearchOption.AllDirectories)
Else
dir_files = main_dir.GetFiles("*", SearchOption.TopDirectoryOnly)
End If
For Each ofile As IO.FileInfo In dir_files
GetFolderSize = GetFolderSize + ofile.Length
Next
End Function
Subscribe to:
Posts (Atom)