Archive

Archive for February, 2010

Chinese year interpretation: Note

February 13, 2010 Leave a comment

 

The Rat: 1936, 1948, 1960, 1972, 1984, 1996, 2008

The Ox: 1937, 1949, 1961, 1973, 1985, 1997, 2009

The Tiger: 1938, 1950, 1962, 1974, 1986, 1998, 2010

The Rabbit: 1939, 1951, 1963, 1975, 1987, 1999

The Dragon: 1940, 1952, 1964, 1976, 1988, 2000

The Snake: 1941, 1953, 1965, 1977, 1989, 2001

The Horse: 1942, 1954, 1966, 1978, 1990, 2002

The Sheep: 1943, 1955, 1967, 1979, 1991, 2003

The Monkey: 1944, 1956, 1968, 1980, 1992, 2004

The Rooster: 1945, 1957, 1969, 1981, 1993, 2005

The Dog: 1946, 1958, 1970, 1982, 1994, 2006

The Pig: 1947, 1959, 1971, 1983, 1995, 2007

-Yuva

http://Yuvahere.com

Advertisements
Categories: Miscellaneous

High growth rate of file groups in SQL Server Database

February 7, 2010 Leave a comment

 

This below query can be used to find all the high growth rate file groups in a SQL server database and

also helps in fine tuning those file groups alone.

USE master
GO
CREATE PROC sp_track_db_growth(@dbnameParam sysname = NULL)
AS
BEGIN
DECLARE @dbname sysname
-- Set the current DB, if dbname is not given input
SET @dbname = COALESCE(@dbnameParam, DB_NAME())
 
SELECT    CONVERT(char, backup_start_date, 111) AS [Date], --yyyy/mm/dd format
    CONVERT(char, backup_start_date, 108) AS [Time],
    @dbname AS [Database Name], [filegroup_name] AS [Filegroup Name], logical_name AS [Logical Filename], 
    physical_name AS [Physical Filename], CONVERT(numeric(9,2),file_size/1048576) AS [File Size (MB)],
    Growth AS [Growth Percentage (%)]
FROM
(
    SELECT    b.backup_start_date, a.backup_set_id, a.file_size, a.logical_name, a.[filegroup_name], a.physical_name,
        (
            SELECT    CONVERT(numeric(5,2),((a.file_size * 100.00)/i1.file_size)-100)
            FROM    msdb.dbo.backupfile i1
            WHERE     i1.backup_set_id = 
                        (
                            SELECT    MAX(i2.backup_set_id) 
                            FROM    msdb.dbo.backupfile i2 JOIN msdb.dbo.backupset i3
                                ON i2.backup_set_id = i3.backup_set_id
                            WHERE    i2.backup_set_id < a.backup_set_id AND 
                                i2.file_type='D' AND
                                i3.database_name = @dbname AND
                                i2.logical_name = a.logical_name AND
                                i2.logical_name = i1.logical_name AND
                                i3.type = 'D'
                        ) AND
                i1.file_type = 'D' 
        ) AS Growth
    FROM    msdb.dbo.backupfile a JOIN msdb.dbo.backupset b 
        ON a.backup_set_id = b.backup_set_id
    WHERE    b.database_name = @dbname AND
        a.file_type = 'D' AND
        b.type = 'D'
        
) as Derived
WHERE (Growth <> 0.0) OR (Growth IS NULL)
ORDER BY [Growth Percentage (%)] desc,logical_name, [Date] desc
END

-Yuva

http://Yuvahere.com

Categories: SQL and .NET Blog

Windows Mobile Device Center – Not Connected ERROR

February 2, 2010 Leave a comment

I faced a problem in Windows mobile device center throwing “Not connected” error marked below.

The solution for this I found is

Goto Start –> Internet Sharing  –> Menu –> Connection settings –>Click USB –>

Set USB Connection setting to “Active Sync” and also check Enable advanced network functionality –> CLick Done –> Done

Now the Windows mobile device center will connect automatically.

-Yuva

http://Yuvahere.com

Categories: SQL and .NET Blog