Monday, March 26, 2012
REG : SQL JOBS
Is there anyway that we would be able to get the start time of the job
when it was started manually..I already looked into all the tables related
to jobs and everything gets updated only after the completion of the job.But
i would like to know the start time as soon as the job is started..Not aware of any. A work around:
add a step at the very beginning of the job, put something like "select 1"
in it. Then check job history after starting the job.
HTH
Quentin
"Karthik" <nkvatsan@.hotmail.com> wrote in message
news:eoOSuHHTDHA.2120@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Is there anyway that we would be able to get the start time of the job
> when it was started manually..I already looked into all the tables related
> to jobs and everything gets updated only after the completion of the
job.But
> i would like to know the start time as soon as the job is started..
>|||Click on the job in Enterprise manager and view job history
It gets the time from sysjobhistory in the msdb database.
Regards
John|||sysjobhistory is not updated after the completion of the job. It gets an
update (or insert) after the completion of every step of every job.
"Karthik" <nkvatsan@.hotmail.com> wrote in message
news:eoOSuHHTDHA.2120@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Is there anyway that we would be able to get the start time of the job
> when it was started manually..I already looked into all the tables related
> to jobs and everything gets updated only after the completion of the
job.But
> i would like to know the start time as soon as the job is started..
>|||Thanks for the reply...Well thats what i meant.I dont want to add a step at
the beginning of every job because we have 300 jobs...But i was thinking of
modifying the sp_start_job proc..But was just wondering is there any
undocumented sp that will give the start time of the job as soon as it is
started..
"Quentin Ran" <quentinran@.yahoo.com> wrote in message
news:OJ6TXgHTDHA.2260@.TK2MSFTNGP12.phx.gbl...
> sysjobhistory is not updated after the completion of the job. It gets an
> update (or insert) after the completion of every step of every job.
> "Karthik" <nkvatsan@.hotmail.com> wrote in message
> news:eoOSuHHTDHA.2120@.TK2MSFTNGP10.phx.gbl...
> > Hi,
> > Is there anyway that we would be able to get the start time of the job
> > when it was started manually..I already looked into all the tables
related
> > to jobs and everything gets updated only after the completion of the
> job.But
> > i would like to know the start time as soon as the job is started..
> >
> >
>|||The reason i wanted to know the start time is that i want to send
notification to the right group about the jobs that are taking more time
than the average run duration.I did already write scripts for that. But it
works only if the jobs are on their normal schedule because i can get the
next_run_time from sysjobschedule table. But if somebody starts the job
manually, i would like to know the start time for that so that i would be
able to calculate the rest of the information based on the start time of the
job..I hope i am clear on what i said...
"Quentin Ran" <quentinran@.yahoo.com> wrote in message
news:u2wkO$HTDHA.2148@.TK2MSFTNGP11.phx.gbl...
> Don't see why you need to do such check for so many jobs. A couple or
many,
> you may look at sp_add_jobstep to add the dummy step if so desire.
> I believe you are aware of the fact that if you need to start a job after
> another one, you can do it in a separate job to launch them one after the
> other.
> Quentin
>
> "Karthik" <nkvatsan@.hotmail.com> wrote in message
> news:e26Rx4HTDHA.1576@.TK2MSFTNGP12.phx.gbl...
> > Thanks for the reply...Well thats what i meant.I dont want to add a step
> at
> > the beginning of every job because we have 300 jobs...But i was thinking
> of
> > modifying the sp_start_job proc..But was just wondering is there any
> > undocumented sp that will give the start time of the job as soon as it
is
> > started..
> > "Quentin Ran" <quentinran@.yahoo.com> wrote in message
> > news:OJ6TXgHTDHA.2260@.TK2MSFTNGP12.phx.gbl...
> > > sysjobhistory is not updated after the completion of the job. It gets
> an
> > > update (or insert) after the completion of every step of every job.
> > >
> > > "Karthik" <nkvatsan@.hotmail.com> wrote in message
> > > news:eoOSuHHTDHA.2120@.TK2MSFTNGP10.phx.gbl...
> > > > Hi,
> > > > Is there anyway that we would be able to get the start time of the
> job
> > > > when it was started manually..I already looked into all the tables
> > related
> > > > to jobs and everything gets updated only after the completion of the
> > > job.But
> > > > i would like to know the start time as soon as the job is started..
> > > >
> > > >
> > >
> > >
> >
> >
>
Refreshing Links in Access doesn't allow me to Add Records!
I have an application in Access2003 with linked tables. When I create the
links manually (picking DNS etc) I have no problems. When I then try to
recreate the links programatically (different users) I am not able to add an
y
records to any of the tables! If I erase all the linked tables and reconnect
manually with the other user I have no problems!
I am using the relink code from
http://support.microsoft.com/defaul...kb;en-us;159691
Any and all suggestions Welcome!!!
Regards
Meir
Suggestions?There is a seperate newgroup for acceess/adp/sql server integration.
Post there
--
Regards
R.D
--Knowledge gets doubled when shared
"mrrcomp" wrote:
> Hi
> I have an application in Access2003 with linked tables. When I create the
> links manually (picking DNS etc) I have no problems. When I then try to
> recreate the links programatically (different users) I am not able to add
any
> records to any of the tables! If I erase all the linked tables and reconne
ct
> manually with the other user I have no problems!
> I am using the relink code from
> http://support.microsoft.com/defaul...kb;en-us;159691
>
> Any and all suggestions Welcome!!!
> Regards
> Meir
>
> Suggestions?
>|||As long as the user has permissions in the database and you have a
primary key defined on the table, inserts an dupdates shouldn't be a
problem. However, instead of using a DSN, you can supply connection
information in your code. This should get you started:
Public Sub LinkODBConnectionString()
Dim strConnection As String
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Set db = CurrentDb
' Specify the driver, the server, and the connection
strConnection = "ODBC;Driver={SQL Server};" & _
" Server=(local);Database=SqlDbName;Truste
d_Connection=Yes"
' Specifying a SQLS user/password instead of integrated security
' strConnection = "ODBC;Driver={SQL Server};" & _
' " Server=(Local);Database=SqlDbName;UID=Us
erName;PWD=password"
' Create Linked Table. The LinkedTableName and the
' ServerTableName can be the same.
Set tdf = db.CreateTableDef("LinkedTableName")
tdf.Connect = strConnection
tdf.SourceTableName = "ServerTableName"
db.TableDefs.Append tdf
Set tdf = Nothing
End Sub
On Fri, 7 Oct 2005 05:17:03 -0700, "mrrcomp"
<mrrcomp@.discussions.microsoft.com> wrote:
>Hi
>I have an application in Access2003 with linked tables. When I create the
>links manually (picking DNS etc) I have no problems. When I then try to
>recreate the links programatically (different users) I am not able to add a
ny
>records to any of the tables! If I erase all the linked tables and reconnec
t
>manually with the other user I have no problems!
>I am using the relink code from
>http://support.microsoft.com/defaul...kb;en-us;159691
>
>Any and all suggestions Welcome!!!
>Regards
>Meir
>
>Suggestions?sql
Wednesday, March 21, 2012
Referential Integrity Constraints w/o Referential Integrity in the db?
Using the new referential integrity constraints that will be made available, will it allow us to manually define the relationships between entities even if there is no true foreign key constraints setup in the database?
Lets say we deleted the FK_Orders_Customers in Northwind between orders and customers.
Or is this ability available now?
Thank for your time.
Using a TRIGGER, you can define just about any type of constraint you desire.
However, the referential constraints (PK-FK) will still require relationships between tables.
|||The problem that I have is that we are working with a highly denormalized database so true constraints on all of our tables are not really an option at the moment.
If we are really trying to abstract the programming level away from the data layer than we should be able to define entities in the EDM as well as their relationships entirely. It would seem that triggers and foreign key contraints are not necessary at the database level (despite how preferable they might be). Is this an option currently?
Thanks
... Sorry, it appears that I posted this to the wrong forum. It should have been in the ADO.NET Orcas forum. My apologies.