Wednesday, March 28, 2012
help with SQL Agent job status
they are at in the process. It doesnt seem to always becorrect in its output,
however. XP_SQLAGENT_ENUM_JOBS is an undocumented proc inside of sp_help_jobs
and is used extensivly internally to get sql agent job info.
I am creating a web status page that is trying to emulate the
EM-->management-->sql server agent -->jobs status field. I would like to
reproduce the same info myself instead of relying on this sproc.
Thanks in advance!!
The SQL Server Agent jobs run in a job cache. Statuses are
written to the tables after the fact so you can't query
system tables. You can use sp_help_job as this executes the
extended stored procedure xp_sqlagent_enum_jobs to obtain
the current job status from the job cache.
Enterprise Manager uses sp_help_job.
-Sue
On Wed, 11 Aug 2004 13:49:02 -0700, "Carl Henthorn"
<CarlHenthorn@.discussions.microsoft.com> wrote:
>I have been using XP_SQLAGENT_ENUM_JOBS to get info on my jobs to see where
>they are at in the process. It doesnt seem to always becorrect in its output,
>however. XP_SQLAGENT_ENUM_JOBS is an undocumented proc inside of sp_help_jobs
>and is used extensivly internally to get sql agent job info.
> I am creating a web status page that is trying to emulate the
>EM-->management-->sql server agent -->jobs status field. I would like to
>reproduce the same info myself instead of relying on this sproc.
>Thanks in advance!!
sql
help with SQL Agent job status
they are at in the process. It doesnt seem to always becorrect in its output
,
however. XP_SQLAGENT_ENUM_JOBS is an undocumented proc inside of sp_help_job
s
and is used extensivly internally to get sql agent job info.
I am creating a web status page that is trying to emulate the
EM-->management-->sql server agent -->jobs status field. I would like to
reproduce the same info myself instead of relying on this sproc.
Thanks in advance!!The SQL Server Agent jobs run in a job cache. Statuses are
written to the tables after the fact so you can't query
system tables. You can use sp_help_job as this executes the
extended stored procedure xp_sqlagent_enum_jobs to obtain
the current job status from the job cache.
Enterprise Manager uses sp_help_job.
-Sue
On Wed, 11 Aug 2004 13:49:02 -0700, "Carl Henthorn"
<CarlHenthorn@.discussions.microsoft.com> wrote:
>I have been using XP_SQLAGENT_ENUM_JOBS to get info on my jobs to see where
>they are at in the process. It doesnt seem to always becorrect in its outpu
t,
>however. XP_SQLAGENT_ENUM_JOBS is an undocumented proc inside of sp_help_jo
bs
>and is used extensivly internally to get sql agent job info.
> I am creating a web status page that is trying to emulate the
>EM-->management-->sql server agent -->jobs status field. I would like to
>reproduce the same info myself instead of relying on this sproc.
>Thanks in advance!!
Wednesday, March 7, 2012
Help with Parameterized query building dataset
I have a class that works fine using the SQLDataReader but when I try and duplicate the process using a Dataset instead of a SQLDataReader it returnsa a null value.
This is the code for the Method to return a datareader
public
SqlDataReader GetOrgID(){
Singleton s1 =Singleton.Instance();Guid uuid;uuid =
newGuid(s1.User_id);SqlConnection con =newSqlConnection(conString);string selectString ="Select OrgID From aspnet_OrgNames Where UserID = @.UserID";SqlCommand cmd =newSqlCommand(selectString, con);cmd.Parameters.Add(
"@.UserID",SqlDbType.UniqueIdentifier, 16).Value = uuid;
con.Open();
SqlDataReader dtr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
return dtr;
This is the code trying to accomplish the same thing with a Dataset instead.
publicDataSet organID(DataSet dataset)
{
Singleton s1 =Singleton.Instance();Guid uuid;uuid =
newGuid(s1.User_id);string queryString ="Select OrgID From aspnet_OrgNames Where UserID = @.UserID";SqlConnection con =newSqlConnection(conString);SqlCommand cmd =newSqlCommand(queryString, con);
cmd.Parameters.Add(
"@.UserID",SqlDbType.UniqueIdentifier, 16).Value = uuid;SqlDataAdapter adapter =newSqlDataAdapter();
adapter.SelectCommand = cmd;
adapter.Fill(dataset);
return dataset;
}
Assume that the conString is set to a valid connection string. The Singlton passes the userid in from some code in the code behind page ...this functionality works as well.
So assume that the Guid is a valid entry..I should return a valid dataset but its null.
Got my answer on another board
http://forums.asp.net/1597763/ShowThread.aspx#1597763
|||
hi prysson,
i saw that link and its exactly the same question and posted by yourself only, you asked the same question and answered to yourself.