Ask Paula!
...bringing you notes from the field...
Home
Archives
Contact
Login
Archives
January 2019 (2)
August 2018 (1)
June 2018 (1)
May 2018 (3)
February 2018 (1)
November 2017 (1)
August 2017 (3)
July 2017 (1)
June 2017 (1)
March 2017 (1)
January 2017 (2)
March 2016 (1)
January 2016 (1)
December 2015 (3)
September 2015 (4)
May 2015 (1)
April 2015 (3)
March 2015 (1)
January 2015 (1)
July 2014 (1)
June 2014 (2)
May 2014 (2)
April 2014 (2)
December 2013 (2)
October 2013 (4)
September 2013 (5)
August 2013 (3)
July 2013 (2)
March 2013 (8)
November 2011 (3)
October 2011 (3)
September 2011 (2)
August 2011 (2)
July 2011 (2)
June 2011 (5)
May 2011 (3)
February 2011 (2)
November 2010 (1)
October 2010 (3)
September 2010 (2)
August 2010 (1)
May 2010 (2)
November 2009 (2)
August 2009 (2)
June 2009 (2)
May 2009 (4)
March 2009 (5)
January 2009 (4)
December 2008 (5)
November 2008 (3)
September 2008 (4)
August 2008 (2)
July 2008 (2)
June 2008 (1)
May 2008 (4)
April 2008 (1)
March 2008 (5)
February 2008 (2)
January 2008 (7)
Image Galleries
.NET Development
Enterprise Integration
BizTalk Gurus
Entertainment - Games
Java Development
Mobile/PDA Development
Professional Affiliations
Association of Professionals in Business Management
Computer Professionals for Social Responsibility
Data Management Association
Institue of Electronics and Electronic Engineers
Metropolitan Design and Development
Modern Language Association
Syndication:
RSS
ATOM
News
Copyright © 2008-2019 Paula DiTallo
Tag Cloud
Microsoft
more tags...
August 2017 Entries
Sql Server: How do I get the filegroup, data file name, size and path of a database?
-- start with this:SELECT dbfile.name AS DatabaseFileName, dbfile.size/128 AS FileSizeInMB, sysFG.name AS FileGroupName, dbfile.physical_name AS DatabaseFilePath FROM sys.database_files AS dbfile INNER JOIN sys.filegroups AS sysFG ON dbfile.data_space_id = sysFG.data_space_id-- for a more general look by filegroup, try this:with fileConfig as (SELECT dbfile.name AS DatabaseFileName, (dbfile.size/128) AS FileSizeInMB, sysFG.name AS FileGroupName, dbfile.physical_name AS DatabaseFilePath FROM sys.database_files ......
Share This Post:
Short Url:
http://wblo.gs/11d1
Posted On
Tuesday, August 29, 2017 2:54 PM
|
Comments (0)
SQL Server: Why is it taking so long to take a database offline?
There are probably open sessions on the database you are attempting to bring offline. SQL Server is trying to roll back any existing workloads in-flight for that database. Issue the sp_who2 command from a new connection (master db) and view what's active. If you see activity, let it complete--or if you don't want the sessions to complete for whatever reason, issue the kill command for the spid(s). In the future, use this command:ALTER DATABASE yourDBName SET OFFLINE WITH ROLLBACK IMMEDIATE;To bring ......
Share This Post:
Short Url:
http://wblo.gs/11cv
Posted On
Friday, August 11, 2017 8:21 PM
|
Comments (0)
SQL Server: How can I get a distinct count(*) with multiple columns?
To get a count(*) of distinct column combinations, do the count(*) over the distinct select statement.Example:SELECT count(*) FROM (SELECT DISTINCT ColumnA, ColumnB, ColumnC FROM YourTable ) x ......
Share This Post:
Short Url:
http://wblo.gs/11cs
Posted On
Wednesday, August 9, 2017 12:45 PM
|
Comments (0)