CREATE PROC portal.isJobRunning (@jobName VARCHAR (256))
AS
BEGIN
/**************************************************************************
Joe Kelly
2012-07-31 17:56:04.540
Determines if a job is running or not
EXEC portal.isJobRunning @jobName = 'Export%'
Template source:
http://weblogs.asp.net/johnbilliris/archive/2009/10/13/how-to-determine-if-a-sql-job-is-running.aspx
**************************************************************************/
SET NOCOUNT ON
DECLARE @xp_results TABLE (
job_id UNIQUEIDENTIFIER NOT NULL
, last_run_date INT NOT NULL
, last_run_time INT NOT NULL
, next_run_date INT NOT NULL
, next_run_time INT NOT NULL
, next_run_schedule_id INT NOT NULL
, requested_to_run INT NOT NULL -- BOOL
, request_source INT NOT NULL
, request_source_id sysname COLLATE database_default NULL
, running INT NOT NULL -- BOOL
, current_step INT NOT NULL
, current_retry_attempt INT NOT NULL
, job_state INT NOT NULL
)
INSERT INTO @xp_results
EXECUTE master.dbo.xp_sqlagent_enum_jobs 1, 'dbo'
SELECT xpr.running
, sjv.name
FROM @xp_results xpr
JOIN MSDB.dbo.sysjobs_view sjv
ON xpr.job_id = sjv.job_id
WHERE sjv.name LIKE @jobName
END
Tuesday, July 31, 2012
Flight Recorder OLAP CUBE Trace
Default 5MB log on OLAP installations:
http://msdn.microsoft.com/en-us/library/ms174827.aspx (search for FlightRecorder)
http://support.microsoft.com/kb/2128005
FlightRecorder
The events and columns captured by the Flight Recorder are controlled by a trace definition file. The advanced server property named Log\FlightRecorder\TraceDefinitionFile controls the definition file used by the Fligth Recorder. By default, the property is blank, which means the Flight Recorder defaults to using the trace file definition stored in the file flightrecordertracedef.xml, which is stored in the ..\OLAP\bin directory wherever SSAS is installed.
http://social.msdn.microsoft.com/forums/en-US/sqlanalysisservices/thread/9bcc369d-5f23-41fc-916d-448e20182430
Monday, July 30, 2012
List of Tables in Access DB
Source???
SELECT MSysObjects.Name AS table_name FROM MSysObjects WHERE (((Left([Name],1))<>"~") AND ((Left([Name],4))<>"MSys") AND ((MSysObjects.Type) In (1,4,6))) order by MSysObjects.Name
Thursday, July 19, 2012
Debugging SSCode - UCSFMC
C# as a scripting language, WebForms with no code behind, no use of app_code, a single common page inheritance for errors and the use of external include files for calling external (from the page) methods - how to debug.
a.) Remove tag referring to .\SSCode\xx.cs
b.) Take contents (functions) of xx.cs and create a file in App_Code with the calling page's name and a class wrapper with the file name
c.) In xx.aspx change the page directive references to the new class and file name.
a.) Remove tag referring to .\SSCode\xx.cs
b.) Take contents (functions) of xx.cs and create a file in App_Code with the calling page's name and a class wrapper with the file name
c.) In xx.aspx change the page directive references to the new class and file name.
Monday, July 2, 2012
Classic ASP Errors on Large Result Set with No Information
Check the IIS log.
I this case the IIS buffer had to be increased.
Example log message: 2012-07-02 19:46:09 W3SVC1522741043 127.0.0.1 POST /Reports/Reports_Var_CC_Rev.asp |0|ASP_0251_:_80004005|Response_Buffer_Limit_Exceeded 655 UCSFMC\kellyjoe 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+5.2;+Trident/4.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729;+.NET4.0C;+.NET4.0E;+InfoPath.3) 500 0 0
http://support.microsoft.com/kb/925764
I this case the IIS buffer had to be increased.
Example log message: 2012-07-02 19:46:09 W3SVC1522741043 127.0.0.1 POST /Reports/Reports_Var_CC_Rev.asp |0|ASP_0251_:_80004005|Response_Buffer_Limit_Exceeded 655 UCSFMC\kellyjoe 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+5.2;+Trident/4.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729;+.NET4.0C;+.NET4.0E;+InfoPath.3) 500 0 0
http://support.microsoft.com/kb/925764
Subscribe to:
Posts (Atom)