" Executed as user: Domain\SQLServiceAgent. DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528) Backup and file manipulation operations (such as ALTER DATABASE ADD FILE) on a database must be serialized. Reissue the statement after the current backup or file manipulation operation is completed. "
The error message is pretty self explanatory. You have to wait for the first ALTER DATABASE statement to complete before executing another. In our case a scheduled job tried to execute at the same time as currently running one and caused this, after the former took an extraordinaryly long time to complete.
http://www.experts-exchange.com/Database/Miscellaneous/Q_21552958.html
Monday, 5 January 2009
SQL 2005 access via TDS from Linux
Came across a weird situation today...
The situation :
A Stored Procedure i've written which references global Temporary tables (populated using dynamic sql)
The scenario :
Procedure ran fine and returned results from Management Studio when logged in as my login (sysadmin).
Procedure ran fine and returned results from Management Studio when logged in as 'sa'.
Procedure ran fine and returned results from Management Studio when logged in as application user.
Failed when run from Linux TSQL interface with the error >
" Msg 515, Level 16, State 2, Server SERVERNAME, Line 1
Cannot insert the value NULL into column 'MaxFileSizeinMb', table 'tempdb.dbo.##Results'; column does not allow nulls. INSERT fails. "
2 ways to fix >
1) Explicitly declare column in temp table as allowing NULL (bizarre but it worked) >
CREATE TABLE ##Results
( DataFile VARCHAR,
MaxFileSizeinMB INT NULL
DataSizeinMB INT)
or (the systems team solution we've implemented)
2) Make sure the right drivers are being used!
In this case, SQL 2005 is being accessed from linux via FreeTDS
(TDS = Tabular Data Stream)
The version of TDS being used was incorrect
TDS versions refer to the SQL Server build number, therefore >
7.0 for Sql 7
8.0 for Sql 2000
9.0 for Sql 2005
To verify the settings >
Open /etc/freetds.conf
Locate the [global] section.
Find the line that says tds version = 4.2
Change to tds version = 9.0
Restart Apache > service httpd restart
Links :
FreeTDS http://www.freetds.org/
FreeTDS Versions http://www.freetds.org/tds.html
TSQL http://linux.die.net/man/1/tsql
The situation :
A Stored Procedure i've written which references global Temporary tables (populated using dynamic sql)
The scenario :
Procedure ran fine and returned results from Management Studio when logged in as my login (sysadmin).
Procedure ran fine and returned results from Management Studio when logged in as 'sa'.
Procedure ran fine and returned results from Management Studio when logged in as application user.
Failed when run from Linux TSQL interface with the error >
" Msg 515, Level 16, State 2, Server SERVERNAME, Line 1
Cannot insert the value NULL into column 'MaxFileSizeinMb', table 'tempdb.dbo.##Results'; column does not allow nulls. INSERT fails. "
2 ways to fix >
1) Explicitly declare column in temp table as allowing NULL (bizarre but it worked) >
CREATE TABLE ##Results
( DataFile VARCHAR,
MaxFileSizeinMB INT NULL
DataSizeinMB INT)
or (the systems team solution we've implemented)
2) Make sure the right drivers are being used!
In this case, SQL 2005 is being accessed from linux via FreeTDS
(TDS = Tabular Data Stream)
The version of TDS being used was incorrect
TDS versions refer to the SQL Server build number, therefore >
7.0 for Sql 7
8.0 for Sql 2000
9.0 for Sql 2005
To verify the settings >
Open /etc/freetds.conf
Locate the [global] section.
Find the line that says tds version = 4.2
Change to tds version = 9.0
Restart Apache > service httpd restart
Links :
FreeTDS http://www.freetds.org/
FreeTDS Versions http://www.freetds.org/tds.html
TSQL http://linux.die.net/man/1/tsql
Gartner Magic Quadrant
Start the year on a high...
Microsoft in the leaders section of the 2008 Gartner Magic Quadrant for Data Warehouse Database Management Systems
http://mediaproducts.gartner.com/reprints/microsoft/vol3/article7/article7.html
Found via :
http://blogs.technet.com/dataplatforminsider/archive/2009/01/05/microsoft-positioned-in-leaders-quadrant-of-gartner-magic-quadrant-for-data-warehouse-database-management-systems.aspx
Microsoft in the leaders section of the 2008 Gartner Magic Quadrant for Data Warehouse Database Management Systems
http://mediaproducts.gartner.com/reprints/microsoft/vol3/article7/article7.html
Found via :
http://blogs.technet.com/dataplatforminsider/archive/2009/01/05/microsoft-positioned-in-leaders-quadrant-of-gartner-magic-quadrant-for-data-warehouse-database-management-systems.aspx
Database Statuses
select name as DatabaseName,databasepropertyex(name,'Status') as DatabaseStatus
from sys.databases
where databasepropertyex(name,'Status') <> 'Online'
Possible Statuses >
OFFLINE (Manually taken offline)
RESTORING (Self explanatory)
RECOVERING (Self explanatory)
SUSPECT (Recovery failed)
EMERGENCY (Sysadmin access only, data is read only)
http://msdn.microsoft.com/en-us/library/ms186823.aspx
I/O Delays
" SQL Server has encountered n occurrence(s) of I/O requests taking longer than 15 seconds to complete on file d:\path\datafile.mdf "
This is SQL's way of saying the I/O Subsystem is not coping with the data throughput.
" When you see this message the first action should still be to have a look at the physical disk counters in sysmon to ensure that the disks are servicing IOs in a reasonable period of time. If those appear to fine then start looking at what filter drivers might be installed on your system, and if there are any known issues with them, or disable them if you don’t need them. "
http://blogs.msdn.com/sqlserverstorageengine/archive/2006/06/21/642314.aspx
This is SQL's way of saying the I/O Subsystem is not coping with the data throughput.
" When you see this message the first action should still be to have a look at the physical disk counters in sysmon to ensure that the disks are servicing IOs in a reasonable period of time. If those appear to fine then start looking at what filter drivers might be installed on your system, and if there are any known issues with them, or disable them if you don’t need them. "
http://blogs.msdn.com/sqlserverstorageengine/archive/2006/06/21/642314.aspx
Saturday, 3 January 2009
Agent Login Errors
Symptoms :
Agent Login Errors on a DPM 2007 box
4 errors, in this sequence, throughout the logs >
Date 03/01/2009 01:12:54
Log SQL Agent (Current - 11/25/2008 12:25:00 PM)
Message
[298] SQLServer Error: 258, TCP Provider: Timeout error [258]. [SQLSTATE 08001]
Date 03/01/2009 01:12:54
Log SQL Agent (Current - 11/25/2008 12:25:00 PM)
Message
[165] ODBC Error: 0, Login timeout expired [SQLSTATE HYT00]
Date 03/01/2009 01:12:54
Log SQL Agent (Current - 11/25/2008 12:25:00 PM)
Message
[298] SQLServer Error: 258, Unable to complete login process due to delay in prelogin response [SQLSTATE 08001]
Date 03/01/2009 01:12:54
Log SQL Agent (Archive #2 - 05/01/2009 09:50:00)
Message
[382] Logon to server SERVERNAME\MS$DPM2007$' failed (SaveAllSchedules)
Actions Taken :
Disabling & Re-enabling TCP/IP & restarting SQL. Will monitor.
http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/thread/c895335c-9a88-488c-b39c-f54fd6cceba9/
Agent Login Errors on a DPM 2007 box
4 errors, in this sequence, throughout the logs >
Date 03/01/2009 01:12:54
Log SQL Agent (Current - 11/25/2008 12:25:00 PM)
Message
[298] SQLServer Error: 258, TCP Provider: Timeout error [258]. [SQLSTATE 08001]
Date 03/01/2009 01:12:54
Log SQL Agent (Current - 11/25/2008 12:25:00 PM)
Message
[165] ODBC Error: 0, Login timeout expired [SQLSTATE HYT00]
Date 03/01/2009 01:12:54
Log SQL Agent (Current - 11/25/2008 12:25:00 PM)
Message
[298] SQLServer Error: 258, Unable to complete login process due to delay in prelogin response [SQLSTATE 08001]
Date 03/01/2009 01:12:54
Log SQL Agent (Archive #2 - 05/01/2009 09:50:00)
Message
[382] Logon to server SERVERNAME\MS$DPM2007$' failed (SaveAllSchedules)
Actions Taken :
Disabling & Re-enabling TCP/IP & restarting SQL. Will monitor.
http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/thread/c895335c-9a88-488c-b39c-f54fd6cceba9/
Thursday, 1 January 2009
SQL 2008 : Activity Monitor
SQL 2008's Activity Monitor looks a lot like Windows 2008's Resource Monitor.
To access it, right-click a server name and select 'Activity Monitor' (yes this has changed since previous versions).

http://www.networkworld.com/community/node/32224
To access it, right-click a server name and select 'Activity Monitor' (yes this has changed since previous versions).

http://www.networkworld.com/community/node/32224
Subscribe to:
Posts (Atom)