Sunday, March 25, 2012
check job status
failed and need to be run again in the future. This is what I have come up
with:
select Server = 'BoxName', SJ.Name
from BoxName.msdb.dbo.SysJobHistory SJH
inner join BoxName.msdb.dbo.SysJobs SJ on SJH.job_id = SJ.job_id
inner join BoxName.msdb.dbo.SysJobSchedules SJS on SJ.Job_id = SJS.job_id
where SJH.run_status = 0
and SJS.enabled = 1
and SJS.next_run_date <> 0
and SJS.next_run_time <> 0
group by Server, SJ.Name
The problem though is it would appear that SQL doesn't update the run_status
in the SysJobHistory table very often as I am getting values returned from
this query that did fail several hours ago, but have since succeeded. Does
anyone know of a better way to write this query? I know I can setup
Alerting, but need a backup for it.
TIA, ChrisR
Take a look at sp_help_job. Or look at the sql for
sp_help_job. It sounds like you may actually be looking for
last_run_outcome which sp_help_job obtains from sysjobsteps.
-Sue
On Tue, 17 May 2005 13:26:56 -0700, "ChrisR"
<noemail@.bla.com> wrote:
>I want to have a query that can tell me all the jobs on a server that have
>failed and need to be run again in the future. This is what I have come up
>with:
>select Server = 'BoxName', SJ.Name
>from BoxName.msdb.dbo.SysJobHistory SJH
>inner join BoxName.msdb.dbo.SysJobs SJ on SJH.job_id = SJ.job_id
>inner join BoxName.msdb.dbo.SysJobSchedules SJS on SJ.Job_id = SJS.job_id
>where SJH.run_status = 0
>and SJS.enabled = 1
>and SJS.next_run_date <> 0
>and SJS.next_run_time <> 0
>group by Server, SJ.Name
>
>The problem though is it would appear that SQL doesn't update the run_status
>in the SysJobHistory table very often as I am getting values returned from
>this query that did fail several hours ago, but have since succeeded. Does
>anyone know of a better way to write this query? I know I can setup
>Alerting, but need a backup for it.
>TIA, ChrisR
>
|||Thanks Sue. The problem that I'm having though (for example) is that I have
a job used by Replication. It is technically the Log Reader Agent job. It
used to be set to run every 15 minutes until I recently changed it to run
continuosly. The last_run_outcome from sp_help_job still says 0 which is
accurate as that was the last completed outcome. If Im not mistaken, until
the job actually stops again, that outcome will stay 0? Therefore either
using my query or sp_help_job will indicate failure.
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:e07l81lbfcg3lct0ii9frtug8q52mjch1e@.4ax.com...
> Take a look at sp_help_job. Or look at the sql for
> sp_help_job. It sounds like you may actually be looking for
> last_run_outcome which sp_help_job obtains from sysjobsteps.
> -Sue
> On Tue, 17 May 2005 13:26:56 -0700, "ChrisR"
> <noemail@.bla.com> wrote:
>
check job status
failed and need to be run again in the future. This is what I have come up
with:
select Server = 'BoxName', SJ.Name
from BoxName.msdb.dbo.SysJobHistory SJH
inner join BoxName.msdb.dbo.SysJobs SJ on SJH.job_id = SJ.job_id
inner join BoxName.msdb.dbo.SysJobSchedules SJS on SJ.Job_id = SJS.job_id
where SJH.run_status = 0
and SJS.enabled = 1
and SJS.next_run_date <> 0
and SJS.next_run_time <> 0
group by Server, SJ.Name
The problem though is it would appear that SQL doesn't update the run_status
in the SysJobHistory table very often as I am getting values returned from
this query that did fail several hours ago, but have since succeeded. Does
anyone know of a better way to write this query? I know I can setup
Alerting, but need a backup for it.
TIA, ChrisRTake a look at sp_help_job. Or look at the sql for
sp_help_job. It sounds like you may actually be looking for
last_run_outcome which sp_help_job obtains from sysjobsteps.
-Sue
On Tue, 17 May 2005 13:26:56 -0700, "ChrisR"
<noemail@.bla.com> wrote:
>I want to have a query that can tell me all the jobs on a server that have
>failed and need to be run again in the future. This is what I have come up
>with:
>select Server = 'BoxName', SJ.Name
>from BoxName.msdb.dbo.SysJobHistory SJH
>inner join BoxName.msdb.dbo.SysJobs SJ on SJH.job_id = SJ.job_id
>inner join BoxName.msdb.dbo.SysJobSchedules SJS on SJ.Job_id = SJS.job_id
>where SJH.run_status = 0
>and SJS.enabled = 1
>and SJS.next_run_date <> 0
>and SJS.next_run_time <> 0
>group by Server, SJ.Name
>
>The problem though is it would appear that SQL doesn't update the run_status
>in the SysJobHistory table very often as I am getting values returned from
>this query that did fail several hours ago, but have since succeeded. Does
>anyone know of a better way to write this query? I know I can setup
>Alerting, but need a backup for it.
>TIA, ChrisR
>|||Thanks Sue. The problem that I'm having though (for example) is that I have
a job used by Replication. It is technically the Log Reader Agent job. It
used to be set to run every 15 minutes until I recently changed it to run
continuosly. The last_run_outcome from sp_help_job still says 0 which is
accurate as that was the last completed outcome. If Im not mistaken, until
the job actually stops again, that outcome will stay 0? Therefore either
using my query or sp_help_job will indicate failure.
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:e07l81lbfcg3lct0ii9frtug8q52mjch1e@.4ax.com...
> Take a look at sp_help_job. Or look at the sql for
> sp_help_job. It sounds like you may actually be looking for
> last_run_outcome which sp_help_job obtains from sysjobsteps.
> -Sue
> On Tue, 17 May 2005 13:26:56 -0700, "ChrisR"
> <noemail@.bla.com> wrote:
>>I want to have a query that can tell me all the jobs on a server that have
>>failed and need to be run again in the future. This is what I have come up
>>with:
>>select Server = 'BoxName', SJ.Name
>>from BoxName.msdb.dbo.SysJobHistory SJH
>>inner join BoxName.msdb.dbo.SysJobs SJ on SJH.job_id = SJ.job_id
>>inner join BoxName.msdb.dbo.SysJobSchedules SJS on SJ.Job_id = SJS.job_id
>>where SJH.run_status = 0
>>and SJS.enabled = 1
>>and SJS.next_run_date <> 0
>>and SJS.next_run_time <> 0
>>group by Server, SJ.Name
>>
>>The problem though is it would appear that SQL doesn't update the
>>run_status
>>in the SysJobHistory table very often as I am getting values returned from
>>this query that did fail several hours ago, but have since succeeded. Does
>>anyone know of a better way to write this query? I know I can setup
>>Alerting, but need a backup for it.
>>TIA, ChrisR
>
check job status
failed and need to be run again in the future. This is what I have come up
with:
select Server = 'BoxName', SJ.Name
from BoxName.msdb.dbo.SysJobHistory SJH
inner join BoxName.msdb.dbo.SysJobs SJ on SJH.job_id = SJ.job_id
inner join BoxName.msdb.dbo.SysJobSchedules SJS on SJ.Job_id = SJS.job_id
where SJH.run_status = 0
and SJS.enabled = 1
and SJS.next_run_date <> 0
and SJS.next_run_time <> 0
group by Server, SJ.Name
The problem though is it would appear that SQL doesn't update the run_status
in the SysJobHistory table very often as I am getting values returned from
this query that did fail several hours ago, but have since succeeded. Does
anyone know of a better way to write this query? I know I can setup
Alerting, but need a backup for it.
TIA, ChrisRTake a look at sp_help_job. Or look at the sql for
sp_help_job. It sounds like you may actually be looking for
last_run_outcome which sp_help_job obtains from sysjobsteps.
-Sue
On Tue, 17 May 2005 13:26:56 -0700, "ChrisR"
<noemail@.bla.com> wrote:
>I want to have a query that can tell me all the jobs on a server that have
>failed and need to be run again in the future. This is what I have come up
>with:
>select Server = 'BoxName', SJ.Name
>from BoxName.msdb.dbo.SysJobHistory SJH
>inner join BoxName.msdb.dbo.SysJobs SJ on SJH.job_id = SJ.job_id
>inner join BoxName.msdb.dbo.SysJobSchedules SJS on SJ.Job_id = SJS.job_id
>where SJH.run_status = 0
>and SJS.enabled = 1
>and SJS.next_run_date <> 0
>and SJS.next_run_time <> 0
>group by Server, SJ.Name
>
>The problem though is it would appear that SQL doesn't update the run_statu
s
>in the SysJobHistory table very often as I am getting values returned from
>this query that did fail several hours ago, but have since succeeded. Does
>anyone know of a better way to write this query? I know I can setup
>Alerting, but need a backup for it.
>TIA, ChrisR
>|||Thanks Sue. The problem that I'm having though (for example) is that I have
a job used by Replication. It is technically the Log Reader Agent job. It
used to be set to run every 15 minutes until I recently changed it to run
continuosly. The last_run_outcome from sp_help_job still says 0 which is
accurate as that was the last completed outcome. If Im not mistaken, until
the job actually stops again, that outcome will stay 0? Therefore either
using my query or sp_help_job will indicate failure.
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:e07l81lbfcg3lct0ii9frtug8q52mjch1e@.
4ax.com...
> Take a look at sp_help_job. Or look at the sql for
> sp_help_job. It sounds like you may actually be looking for
> last_run_outcome which sp_help_job obtains from sysjobsteps.
> -Sue
> On Tue, 17 May 2005 13:26:56 -0700, "ChrisR"
> <noemail@.bla.com> wrote:
>
>
Thursday, March 22, 2012
Check if record is full-text indexed
I am dealing with a very large database, and as soon as a record is
submitted I need to run a full-text query against it. I believe it
might take a while before the record is fully indexed and therefore
would not return a result.
How can I check whether the record in question is already indexed, if
at all?
This is MS SQL 2005
Thanks in advance..what sort of update mechanism are you using to update the Full text index
?for example, change tracking
--
Jack Vamvas
___________________________________
Need an IT job? <a href="http://links.10026.com/?link=http://www.itjobfeed.com">uk it jobs</a>
"Pacific Fox" <tacofleur@.gmail.comwrote in message
news:1177049160.189956.209000@.l77g2000hsb.googlegr oups.com...
Quote:
Originally Posted by
Hi all,
>
I am dealing with a very large database, and as soon as a record is
submitted I need to run a full-text query against it. I believe it
might take a while before the record is fully indexed and therefore
would not return a result.
>
How can I check whether the record in question is already indexed, if
at all?
>
This is MS SQL 2005
>
Thanks in advance..
>
check if im reading cached data or hitting disks
more than once, I want to know if the second run is being accessed directly
from cache or am I still hitting the disks just in case I am short of memory
or a combination of both ?
The query is a select statement and nothing more..
Look in BOL for SET STATISTICS IO ON / OFF
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Hassan" <fatima_ja@.hotmail.com> schrieb im Newsbeitrag
news:O7Y$wCLRFHA.508@.TK2MSFTNGP12.phx.gbl...
>I am running a query that returns more than 15 million rows.. If i run it
> more than once, I want to know if the second run is being accessed
> directly
> from cache or am I still hitting the disks just in case I am short of
> memory
> or a combination of both ?
> The query is a select statement and nothing more..
>
check if im reading cached data or hitting disks
more than once, I want to know if the second run is being accessed directly
from cache or am I still hitting the disks just in case I am short of memory
or a combination of both ?
The query is a select statement and nothing more..Look in BOL for SET STATISTICS IO ON / OFF
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Hassan" <fatima_ja@.hotmail.com> schrieb im Newsbeitrag
news:O7Y$wCLRFHA.508@.TK2MSFTNGP12.phx.gbl...
>I am running a query that returns more than 15 million rows.. If i run it
> more than once, I want to know if the second run is being accessed
> directly
> from cache or am I still hitting the disks just in case I am short of
> memory
> or a combination of both ?
> The query is a select statement and nothing more..
>
check if im reading cached data or hitting disks
more than once, I want to know if the second run is being accessed directly
from cache or am I still hitting the disks just in case I am short of memory
or a combination of both ?
The query is a select statement and nothing more..Look in BOL for SET STATISTICS IO ON / OFF
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Hassan" <fatima_ja@.hotmail.com> schrieb im Newsbeitrag
news:O7Y$wCLRFHA.508@.TK2MSFTNGP12.phx.gbl...
>I am running a query that returns more than 15 million rows.. If i run it
> more than once, I want to know if the second run is being accessed
> directly
> from cache or am I still hitting the disks just in case I am short of
> memory
> or a combination of both ?
> The query is a select statement and nothing more..
>sql
Check if im backing up my databases
daily basis on a server ?
I want to be able to run a script and list all databases not being backed up
dailyHassan
If you build database maintenance plan and check all user database , you
are sure that all databases are being backed up
as well as theit log files (I assume with FULL recovery mode)
"Hassan" <Hassan@.hotmail.com> wrote in message
news:e5qgFV6AGHA.140@.TK2MSFTNGP12.phx.gbl...
> Is there a way I can find out if my databases are being backed up daily on
> a daily basis on a server ?
> I want to be able to run a script and list all databases not being backed
> up daily
>|||Something like
select d.name as [Database],
max(b.backup_finish_date) as [Last Backup],
case
when datediff(hh,isnull(max(b.backup_finish_date),'19000101'),getdate()) >
24
then 'N' else 'Y' end as [Recent Full Backup]
from master.dbo.sysdatabases d
left join msdb.dbo.backupset b
on d.name = b.database_name and b.type = 'D'
group by d.name
order by d.name
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Hassan" <Hassan@.hotmail.com> wrote in message
news:e5qgFV6AGHA.140@.TK2MSFTNGP12.phx.gbl...
> Is there a way I can find out if my databases are being backed up daily on
> a daily basis on a server ?
> I want to be able to run a script and list all databases not being backed
> up daily
>|||Hi
ALTER DATABASE DataBase SET RECOVERY FULL
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:ulbMSq8AGHA.3104@.TK2MSFTNGP12.phx.gbl...
> Something like
> select d.name as [Database],
> max(b.backup_finish_date) as [Last Backup],
> case
> when datediff(hh,isnull(max(b.backup_finish_date),'19000101'),getdate()) >
> 24
> then 'N' else 'Y' end as [Recent Full Backup]
> from master.dbo.sysdatabases d
> left join msdb.dbo.backupset b
> on d.name = b.database_name and b.type = 'D'
> group by d.name
> order by d.name
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Hassan" <Hassan@.hotmail.com> wrote in message
> news:e5qgFV6AGHA.140@.TK2MSFTNGP12.phx.gbl...
>> Is there a way I can find out if my databases are being backed up daily
>> on a daily basis on a server ?
>> I want to be able to run a script and list all databases not being backed
>> up daily
>|||Sorry, wrong post
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:e1uO608AGHA.4036@.TK2MSFTNGP10.phx.gbl...
> Hi
> ALTER DATABASE DataBase SET RECOVERY FULL
>
> "Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
> news:ulbMSq8AGHA.3104@.TK2MSFTNGP12.phx.gbl...
>> Something like
>> select d.name as [Database],
>> max(b.backup_finish_date) as [Last Backup],
>> case
>> when datediff(hh,isnull(max(b.backup_finish_date),'19000101'),getdate())
>> > 24
>> then 'N' else 'Y' end as [Recent Full Backup]
>> from master.dbo.sysdatabases d
>> left join msdb.dbo.backupset b
>> on d.name = b.database_name and b.type = 'D'
>> group by d.name
>> order by d.name
>> --
>> HTH
>> Jasper Smith (SQL Server MVP)
>> http://www.sqldbatips.com
>> I support PASS - the definitive, global
>> community for SQL Server professionals -
>> http://www.sqlpass.org
>> "Hassan" <Hassan@.hotmail.com> wrote in message
>> news:e5qgFV6AGHA.140@.TK2MSFTNGP12.phx.gbl...
>> Is there a way I can find out if my databases are being backed up daily
>> on a daily basis on a server ?
>> I want to be able to run a script and list all databases not being
>> backed up daily
>>
>
Check if im backing up my databases
daily basis on a server ?
I want to be able to run a script and list all databases not being backed up
daily
Hassan
If you build database maintenance plan and check all user database , you
are sure that all databases are being backed up
as well as theit log files (I assume with FULL recovery mode)
"Hassan" <Hassan@.hotmail.com> wrote in message
news:e5qgFV6AGHA.140@.TK2MSFTNGP12.phx.gbl...
> Is there a way I can find out if my databases are being backed up daily on
> a daily basis on a server ?
> I want to be able to run a script and list all databases not being backed
> up daily
>
|||Something like
select d.name as [Database],
max(b.backup_finish_date) as [Last Backup],
case
when datediff(hh,isnull(max(b.backup_finish_date),'1900 0101'),getdate()) >
24
then 'N' else 'Y' end as [Recent Full Backup]
from master.dbo.sysdatabases d
left join msdb.dbo.backupset b
on d.name = b.database_name and b.type = 'D'
group by d.name
order by d.name
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Hassan" <Hassan@.hotmail.com> wrote in message
news:e5qgFV6AGHA.140@.TK2MSFTNGP12.phx.gbl...
> Is there a way I can find out if my databases are being backed up daily on
> a daily basis on a server ?
> I want to be able to run a script and list all databases not being backed
> up daily
>
|||Hi
ALTER DATABASE DataBase SET RECOVERY FULL
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:ulbMSq8AGHA.3104@.TK2MSFTNGP12.phx.gbl...
> Something like
> select d.name as [Database],
> max(b.backup_finish_date) as [Last Backup],
> case
> when datediff(hh,isnull(max(b.backup_finish_date),'1900 0101'),getdate()) >
> 24
> then 'N' else 'Y' end as [Recent Full Backup]
> from master.dbo.sysdatabases d
> left join msdb.dbo.backupset b
> on d.name = b.database_name and b.type = 'D'
> group by d.name
> order by d.name
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Hassan" <Hassan@.hotmail.com> wrote in message
> news:e5qgFV6AGHA.140@.TK2MSFTNGP12.phx.gbl...
>
|||Sorry, wrong post
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:e1uO608AGHA.4036@.TK2MSFTNGP10.phx.gbl...
> Hi
> ALTER DATABASE DataBase SET RECOVERY FULL
>
> "Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
> news:ulbMSq8AGHA.3104@.TK2MSFTNGP12.phx.gbl...
>
Check if im backing up my databases
daily basis on a server ?
I want to be able to run a script and list all databases not being backed up
dailyHassan
If you build database maintenance plan and check all user database , you
are sure that all databases are being backed up
as well as theit log files (I assume with FULL recovery mode)
"Hassan" <Hassan@.hotmail.com> wrote in message
news:e5qgFV6AGHA.140@.TK2MSFTNGP12.phx.gbl...
> Is there a way I can find out if my databases are being backed up daily on
> a daily basis on a server ?
> I want to be able to run a script and list all databases not being backed
> up daily
>|||Something like
select d.name as [Database],
max(b.backup_finish_date) as [Last Backup],
case
when datediff(hh,isnull(max(b. backup_finish_date),'19000101'),getdate(
)) >
24
then 'N' else 'Y' end as [Recent Full Backup]
from master.dbo.sysdatabases d
left join msdb.dbo.backupset b
on d.name = b.database_name and b.type = 'D'
group by d.name
order by d.name
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Hassan" <Hassan@.hotmail.com> wrote in message
news:e5qgFV6AGHA.140@.TK2MSFTNGP12.phx.gbl...
> Is there a way I can find out if my databases are being backed up daily on
> a daily basis on a server ?
> I want to be able to run a script and list all databases not being backed
> up daily
>|||Hi
ALTER DATABASE DataBase SET RECOVERY FULL
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:ulbMSq8AGHA.3104@.TK2MSFTNGP12.phx.gbl...
> Something like
> select d.name as [Database],
> max(b.backup_finish_date) as [Last Backup],
> case
> when datediff(hh,isnull(max(b. backup_finish_date),'19000101'),getdate(
)) >
> 24
> then 'N' else 'Y' end as [Recent Full Backup]
> from master.dbo.sysdatabases d
> left join msdb.dbo.backupset b
> on d.name = b.database_name and b.type = 'D'
> group by d.name
> order by d.name
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Hassan" <Hassan@.hotmail.com> wrote in message
> news:e5qgFV6AGHA.140@.TK2MSFTNGP12.phx.gbl...
>|||Sorry, wrong post
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:e1uO608AGHA.4036@.TK2MSFTNGP10.phx.gbl...
> Hi
> ALTER DATABASE DataBase SET RECOVERY FULL
>
> "Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
> news:ulbMSq8AGHA.3104@.TK2MSFTNGP12.phx.gbl...
>
Check if file is already open
Hi,
I wrote a VB code to generate a xls file. Users are able to run it fine but if they have another file with same name already open, then it just crashes excel.
So I want to include a code that checks if file "file.xls" is open on user's machine.
If file is open, then message "file "File.xls" is already open. Generating File_1.xls"
Run the code but create the file with file name "file_1.xls"
If file doesn't exist, then run code and create file with file name "File.xls"
So basically I want the code to run and generate the file. Only difference is that if file with same name is already open, then just rename the newly created file.
Here's the code I've created for generating the file:
Public Function getrmpricing()
Dim queryoption As String
Dim ans, Msg As String
Dim fs As Object
Dim sTemplateFile As String
Dim e_TemplateFile As String
On Error Resume Next
If Forms!rmpricingdataform!BU = "CS" Then Set fs = CreateObject("Scripting.FileSystemObject") Dim xl As New Excel.Application DoCmd.OutputTo acOutputQuery, "CustPricingbyRMCrosstabquery", acFormatXLS, "c:\customerpricing.xls", True Case "CRM" End Select 'fs.DeleteFile e_TemplateFile & "crm proposal input.XLT", True - NEWLY COMMENTED OUT DoCmd.CLOSE acForm, "rmpricingdataform"
sTemplateFile = g_dashboard & "crm proposal input.XLT"
e_TemplateFile = "C:\"
MsgBox "No template available for CS!", vbOKOnly, "RM Pricing Report"
Else
fs.CopyFile sTemplateFile, e_TemplateFile, True
xl.Workbooks.Open e_TemplateFile & "crm proposal input.XLT"
Dim xs As New Excel.Application
xs.Workbooks("customerpricing").Activate
xs.ActiveWorkbook.Activate
Select Case Forms!rmpricingdataform!BU
xl.Run "'crm proposal input.XLT'!CRM_CAPSPriceTemplate.CRM_CAPSPriceTemplate"
'xs.Workbooks.CLOSE - NEWLY COMMENTED OUT
xl.Workbooks("crm proposal input.XLT").CLOSE
'xl.Workbooks("crmpricing.xls").Save - NEVER USED
Set fs = Nothing
Call AuditTrail("RM Pricing report", "Execute")
End If
End Function
Please advise.
Not the right forum, try this one
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?query=Excel&dg=&cat=en_US_d02fc761-3f6b-402c-82f6-ba1a8875c1a7&lang=en&cr=&pt=&catlist=&dglist=&ptlist=&exp=&sloc=en-us
sqlMonday, March 19, 2012
Check Execution status when manually running Snapshot agents
agents manually rather than wait for the schedule to do it. I am using
sp_start_job to run each agent such as:
exec msdb.dbo.sp_start_job @.Job_Name='SQLSERVER-SomeSnapshotAgent-167'
waitfor delay '00:30:00' --some fixed time interval to try and have jobs not
run into each other
exec msdb.dbo.sp_start_job @.Job_Name='SQLSERVER-AnotherSnapshotAgent-154'
If I put all of my Snapshot agent jobs in a script to run back to back, how
can I check for execution status so the next job does not run into the
previous agent already running?
Thanks,
Steve
Steve,
you can use the following rputine (modified slightly) to determine the job's
current status.
http://www.replicationanswers.com/Downloads/KillRunningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
|||How do I obtain the Guid Job_id for the job name(s) that I am wanting to run?
Thank You
Steve
"Paul Ibison" wrote:
> Steve,
> you can use the following rputine (modified slightly) to determine the job's
> current status.
> http://www.replicationanswers.com/Downloads/KillRunningJobs.txt
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
>
>
|||Steve,
it'll be something like this - just replace the name with the name of the
snapshot agent:
select job_id FROM sysjobs
where name = 'UK-3XSW02J\PAULS2000INST-Pub1-2'
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
Thursday, March 8, 2012
Check available memory for SQL 2000
takes 5 hours. I suspect the problem is the amount of
memory available to SQL Server (2000 SP3).
I have noticed that when SQL Server uses 600 Mb, the batch
lasts 30 mins, and when SQL Server only uses 300 Mb, it
lasts 5 hours.
How can I document that SQL Server would need say 500 Mb ?
Is there an SQL statement that would show how much memory
is available in the system to be taken by SQL Server?
Can I use the profiler to see when SQL Server is trying to
obtain more memory, and the request is denyied or fails?
The other application suspected of using up memory on the
server is Analysis Services. Is there a way I can force
Analysis Services to relase memory without stopping and
restarting the service?Hi James,
You can find out how much memory SQL Server wants to use by checking the SQL
Server:Memory Manager:Target Server Memory counter in the Windows
Performance Monitor. The SQL Server:Memory Manager:Total Server Memory
counter indicates how much memory SQL Server actually uses, and of course
you'd like these to counter to show very similar values.
You can't check from inside SQL Server how much 'free' memory is available,
so the best thing to do is probably configure your server so that SQL Server
always has the right amount of memory available.
--
Jacco Schalkwijk
SQL Server MVP
"James" <news@.att.com> wrote in message
news:465e01c3ff7c$16dee5c0$a501280a@.phx.gbl...
> We have a batch that takes 30 mins to run, but sometimes
> takes 5 hours. I suspect the problem is the amount of
> memory available to SQL Server (2000 SP3).
> I have noticed that when SQL Server uses 600 Mb, the batch
> lasts 30 mins, and when SQL Server only uses 300 Mb, it
> lasts 5 hours.
> How can I document that SQL Server would need say 500 Mb ?
> Is there an SQL statement that would show how much memory
> is available in the system to be taken by SQL Server?
> Can I use the profiler to see when SQL Server is trying to
> obtain more memory, and the request is denyied or fails?
> The other application suspected of using up memory on the
> server is Analysis Services. Is there a way I can force
> Analysis Services to relase memory without stopping and
> restarting the service?|||There is a 'Server memory change' event that you can track using Profiler or
server side tracing procedures.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"James" <news@.att.com> wrote in message
news:465e01c3ff7c$16dee5c0$a501280a@.phx.gbl...
We have a batch that takes 30 mins to run, but sometimes
takes 5 hours. I suspect the problem is the amount of
memory available to SQL Server (2000 SP3).
I have noticed that when SQL Server uses 600 Mb, the batch
lasts 30 mins, and when SQL Server only uses 300 Mb, it
lasts 5 hours.
How can I document that SQL Server would need say 500 Mb ?
Is there an SQL statement that would show how much memory
is available in the system to be taken by SQL Server?
Can I use the profiler to see when SQL Server is trying to
obtain more memory, and the request is denyied or fails?
The other application suspected of using up memory on the
server is Analysis Services. Is there a way I can force
Analysis Services to relase memory without stopping and
restarting the service?|||Jame
By default SQL Server should use memory dynamically. In most cases this works well. Your comments about the memory available, suggests to me that you are running other applications on the server. You really should try to run SQL Server on a dedicated server, you can get unpredictable results when it shares a server with other applications
Regard
John|||As I wrote, the other application is Analysis Services
We sell a solution including SQL Server and AS, and we cannot ask the customers to run the solution on 2 machines instead of one.|||Thanks, I had missed that one
You guys don't know a way of throttling Analysis Services' memory, do you?|||May be there's a way, but I don't work with AS. You might want to post this
to the analysis services group.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"James" <anonymous@.discussions.microsoft.com> wrote in message
news:E96727BB-930E-4BCE-9731-9F8E4BA4C3E8@.microsoft.com...
Thanks, I had missed that one.
You guys don't know a way of throttling Analysis Services' memory, do you?|||Hi James,
I learned that you want to find a way to force Analysis Services to release
memory without stopping and restarting the service. Based on my experience,
there is no good way to force Analysis Services to release memory and have
Analysis Services maintain adequate performance at the same time. It seems
you have to add new memory hardware or release the memory of other
applications to lessen the pressure of lack of memory.
I found the following articles for your reference.
Chapter 26 - Performance Tuning Analysis Services
http://www.microsoft.com/resources/documentation/sql/2000/all/reskit/en-us/p
art6/c2661.mspx
Thanks & Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Check available memory for SQL 2000
takes 5 hours. I suspect the problem is the amount of
memory available to SQL Server (2000 SP3).
I have noticed that when SQL Server uses 600 Mb, the batch
lasts 30 mins, and when SQL Server only uses 300 Mb, it
lasts 5 hours.
How can I document that SQL Server would need say 500 Mb ?
Is there an SQL statement that would show how much memory
is available in the system to be taken by SQL Server?
Can I use the profiler to see when SQL Server is trying to
obtain more memory, and the request is denyied or fails?
The other application suspected of using up memory on the
server is Analysis Services. Is there a way I can force
Analysis Services to relase memory without stopping and
restarting the service?Hi James,
You can find out how much memory SQL Server wants to use by checking the SQL
Server:Memory Manager:Target Server Memory counter in the Windows
Performance Monitor. The SQL Server:Memory Manager:Total Server Memory
counter indicates how much memory SQL Server actually uses, and of course
you'd like these to counter to show very similar values.
You can't check from inside SQL Server how much 'free' memory is available,
so the best thing to do is probably configure your server so that SQL Server
always has the right amount of memory available.
Jacco Schalkwijk
SQL Server MVP
"James" <news@.att.com> wrote in message
news:465e01c3ff7c$16dee5c0$a501280a@.phx.gbl...
> We have a batch that takes 30 mins to run, but sometimes
> takes 5 hours. I suspect the problem is the amount of
> memory available to SQL Server (2000 SP3).
> I have noticed that when SQL Server uses 600 Mb, the batch
> lasts 30 mins, and when SQL Server only uses 300 Mb, it
> lasts 5 hours.
> How can I document that SQL Server would need say 500 Mb ?
> Is there an SQL statement that would show how much memory
> is available in the system to be taken by SQL Server?
> Can I use the profiler to see when SQL Server is trying to
> obtain more memory, and the request is denyied or fails?
> The other application suspected of using up memory on the
> server is Analysis Services. Is there a way I can force
> Analysis Services to relase memory without stopping and
> restarting the service?|||There is a 'Server memory change' event that you can track using Profiler or
server side tracing procedures.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"James" <news@.att.com> wrote in message
news:465e01c3ff7c$16dee5c0$a501280a@.phx.gbl...
We have a batch that takes 30 mins to run, but sometimes
takes 5 hours. I suspect the problem is the amount of
memory available to SQL Server (2000 SP3).
I have noticed that when SQL Server uses 600 Mb, the batch
lasts 30 mins, and when SQL Server only uses 300 Mb, it
lasts 5 hours.
How can I document that SQL Server would need say 500 Mb ?
Is there an SQL statement that would show how much memory
is available in the system to be taken by SQL Server?
Can I use the profiler to see when SQL Server is trying to
obtain more memory, and the request is denyied or fails?
The other application suspected of using up memory on the
server is Analysis Services. Is there a way I can force
Analysis Services to relase memory without stopping and
restarting the service?|||James
By default SQL Server should use memory dynamically. In most cases this work
s well. Your comments about the memory available, suggests to me that you ar
e running other applications on the server. You really should try to run SQL
Server on a dedicated serv
er, you can get unpredictable results when it shares a server with other app
lications.
Regards
John|||Thanks, I had missed that one.
You guys don't know a way of throttling Analysis Services' memory, do you?|||As I wrote, the other application is Analysis Services.
We sell a solution including SQL Server and AS, and we cannot ask the custom
ers to run the solution on 2 machines instead of one.|||May be there's a way, but I don't work with AS. You might want to post this
to the analysis services group.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"James" <anonymous@.discussions.microsoft.com> wrote in message
news:E96727BB-930E-4BCE-9731-9F8E4BA4C3E8@.microsoft.com...
Thanks, I had missed that one.
You guys don't know a way of throttling Analysis Services' memory, do you?|||Hi James,
I learned that you want to find a way to force Analysis Services to release
memory without stopping and restarting the service. Based on my experience,
there is no good way to force Analysis Services to release memory and have
Analysis Services maintain adequate performance at the same time. It seems
you have to add new memory hardware or release the memory of other
applications to lessen the pressure of lack of memory.
I found the following articles for your reference.
Chapter 26 - Performance Tuning Analysis Services
http://www.microsoft.com/resources/.../reskit/en-us/p
art6/c2661.mspx
Thanks & Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Wednesday, March 7, 2012
Cheapest way to purchase SQL Reporting Services
of vb studio.net enterprise and run sql server 2000.
One of the guys is writing a system which I have to report on using SQL
Reporting Services. As I don't have any .net product, do I have to purchase a
.net product to then get a development edition of SQL Reporting Services to
write any reports etc.
Looking for the cheapest way to be able to use SQL Reporting Services as I
work in the NHS (lucky me).
Any help will be much appreciated.
Thanks, MarkYour SQL license gives you RS. All you need to develop report is a copy of
VS. The cheapest way to aquire it is VB.net standard.
=?Utf-8?B?bWFya19tZW56aWVz?= <mark_menzies@.discussions.microsoft.com>
wrote in news:DC6ABF54-CFC9-417F-A898-1DB7FCB21549@.microsoft.com:
> Within my department we have 1 copy of of vb studio.net standard and 2
> copies of vb studio.net enterprise and run sql server 2000.
> One of the guys is writing a system which I have to report on using
> SQL Reporting Services. As I don't have any .net product, do I have to
> purchase a .net product to then get a development edition of SQL
> Reporting Services to write any reports etc.
> Looking for the cheapest way to be able to use SQL Reporting Services
> as I work in the NHS (lucky me).
> Any help will be much appreciated.
> Thanks, Mark
>|||Also, RS 2005 comes with a version of VS so no extra purchase is required.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Asher_N" <compguy666@.hotmail.com> wrote in message
news:Xns970F5808B7AFDcompguy666hotmailcom@.207.46.248.16...
> Your SQL license gives you RS. All you need to develop report is a copy of
> VS. The cheapest way to aquire it is VB.net standard.
> =?Utf-8?B?bWFya19tZW56aWVz?= <mark_menzies@.discussions.microsoft.com>
> wrote in news:DC6ABF54-CFC9-417F-A898-1DB7FCB21549@.microsoft.com:
>> Within my department we have 1 copy of of vb studio.net standard and 2
>> copies of vb studio.net enterprise and run sql server 2000.
>> One of the guys is writing a system which I have to report on using
>> SQL Reporting Services. As I don't have any .net product, do I have to
>> purchase a .net product to then get a development edition of SQL
>> Reporting Services to write any reports etc.
>> Looking for the cheapest way to be able to use SQL Reporting Services
>> as I work in the NHS (lucky me).
>> Any help will be much appreciated.
>> Thanks, Mark
>>
>
Saturday, February 25, 2012
Charting Issue
I have run into a very strange situation and have been unable to locate
the cause of the problem. Running SQL Reporting Services 2000 and
pulling data from an Oracle db for this specific report.
The report is very simple. A bar chart with 2 data sets. One
represented as bars, the other represented as a line. Below the chart
is a table with the text representation of the data being used for the
chart.
On the chart, the data is displayed using the same y-axis scale.
For some reason when I run a report for a specific set of criteria I
get the correct data in the table, but the graph is messed up. The
2nd data point for my line has a value of 39.30 but the line on the
chart draws up to the 120 mark. The strange thing is that the marker
icon shows the value of 39.30.
My data looks something like this:
Bar Line
39.30 39.30
0 39.30
56.50 43.90
17.50 41.40
All of the points on the line show the correct value and are in the
right position except for the 2nd point. It shows the correct value
at the point, but the line shoots up to the 120 mark on the y-axis.
I have tried this running it both on the server and also in DebugLocal
mode on my development system.
I need to get this resolved ASAP for the executive management team.
Any help would be greatly appreciated.
Thanks!Mike
If you see the Value expression for line chart it must
SUM(Fields!ColumnName.Value).
I beleive becuase of the data some where it is summing the value.
--
Thanks & Rate the Postings.
-Ravi-
"Mike H." wrote:
> 1st... sorry about the duplicate post. Was posted under the wrong account.
> I have run into a very strange situation and have been unable to locate
> the cause of the problem. Running SQL Reporting Services 2000 and
> pulling data from an Oracle db for this specific report.
> The report is very simple. A bar chart with 2 data sets. One
> represented as bars, the other represented as a line. Below the chart
> is a table with the text representation of the data being used for the
> chart.
>
> On the chart, the data is displayed using the same y-axis scale.
>
> For some reason when I run a report for a specific set of criteria I
> get the correct data in the table, but the graph is messed up. The
> 2nd data point for my line has a value of 39.30 but the line on the
> chart draws up to the 120 mark. The strange thing is that the marker
> icon shows the value of 39.30.
>
> My data looks something like this:
>
> Bar Line
> 39.30 39.30
> 0 39.30
> 56.50 43.90
> 17.50 41.40
>
> All of the points on the line show the correct value and are in the
> right position except for the 2nd point. It shows the correct value
> at the point, but the line shoots up to the 120 mark on the y-axis.
>
> I have tried this running it both on the server and also in DebugLocal
> mode on my development system.
>
> I need to get this resolved ASAP for the executive management team.
> Any help would be greatly appreciated.
>
> Thanks!|||Thank you!
I have no idea why there was a SUM function in there. Everything looks
right now.
Thanks again!
"Ravi" wrote:
> Mike
> If you see the Value expression for line chart it must
> SUM(Fields!ColumnName.Value).
> I beleive becuase of the data some where it is summing the value.
> --
> Thanks & Rate the Postings.
> -Ravi-
>
> "Mike H." wrote:
> > 1st... sorry about the duplicate post. Was posted under the wrong account.
> >
> > I have run into a very strange situation and have been unable to locate
> > the cause of the problem. Running SQL Reporting Services 2000 and
> > pulling data from an Oracle db for this specific report.
> >
> > The report is very simple. A bar chart with 2 data sets. One
> > represented as bars, the other represented as a line. Below the chart
> > is a table with the text representation of the data being used for the
> > chart.
> >
> >
> > On the chart, the data is displayed using the same y-axis scale.
> >
> >
> > For some reason when I run a report for a specific set of criteria I
> > get the correct data in the table, but the graph is messed up. The
> > 2nd data point for my line has a value of 39.30 but the line on the
> > chart draws up to the 120 mark. The strange thing is that the marker
> > icon shows the value of 39.30.
> >
> >
> > My data looks something like this:
> >
> >
> > Bar Line
> > 39.30 39.30
> > 0 39.30
> > 56.50 43.90
> > 17.50 41.40
> >
> >
> > All of the points on the line show the correct value and are in the
> > right position except for the 2nd point. It shows the correct value
> > at the point, but the line shoots up to the 120 mark on the y-axis.
> >
> >
> > I have tried this running it both on the server and also in DebugLocal
> > mode on my development system.
> >
> >
> > I need to get this resolved ASAP for the executive management team.
> > Any help would be greatly appreciated.
> >
> >
> > Thanks!
Friday, February 24, 2012
Chart Image stretching
Greetings,
I dont know where to post this. I am hoping someone else has run into this in the past.
I have a report with a chart component that works fine in i.e and safari. In fire fox the chart is stretched really bad. If I right click on the image or press reload from the report toolbar the chart is correct.
Whats really odd is this happens only when the toolbar is visible.
Greetings,
I have a chart inside of a table. The chart is a bar that represents a value for each record. The chart works fine in ie and macsafari but not in firefox.
In firefox, the chart for each record is stretched out really big. Right clicking or refreshing will cause the charts to resize correctly.
|||Greetings,
I have a chart inside of a table. The chart is a bar that represents a value for each record. The chart works fine in ie and macsafari but not in firefox.
In firefox, the chart for each record is stretched out really big. Right clicking or refreshing will cause the charts to resize correctly.
|||I have a chart in a table that prints a bar value for each record. This works fine in ie and safari. In firefox the chart for each record is stretched onl the load. If I right click or refresh using the report bar the chart is fixed.|||I have a chart in a table that prints a bar value for each record. This works
fine in ie and safari. In firefox the chart for each record is stretched onl the
load. If I right click or refresh using the report bar the chart is fixed.
Chart image distortion
Greetings,
I dont know where to post this. I am hoping someone else has run into this in the past.
I have a report with a chart component that works fine in i.e and safari. In fire fox the chart is stretched really bad. If I right click on the image or press reload from the report toolbar the chart is correct.
Whats really odd is this happens only when the toolbar is visible.
Greetings,
I have a chart inside of a table. The chart is a bar that represents a value for each record. The chart works fine in ie and macsafari but not in firefox.
In firefox, the chart for each record is stretched out really big. Right clicking or refreshing will cause the charts to resize correctly.
|||Greetings,
I have a chart inside of a table. The chart is a bar that represents a value for each record. The chart works fine in ie and macsafari but not in firefox.
In firefox, the chart for each record is stretched out really big. Right clicking or refreshing will cause the charts to resize correctly.
|||I have a chart in a table that prints a bar value for each record. This works fine in ie and safari. In firefox the chart for each record is stretched onl the load. If I right click or refresh using the report bar the chart is fixed.|||I have a chart in a table that prints a bar value for each record. This works
fine in ie and safari. In firefox the chart for each record is stretched onl the
load. If I right click or refresh using the report bar the chart is fixed.
Sunday, February 19, 2012
Chart graphic stretching
Greetings,
I dont know where to post this. I am hoping someone else has run into this in the past.
I have a report with a chart component that works fine in i.e and safari. In fire fox the chart is stretched really bad. If I right click on the image or press reload from the report toolbar the chart is correct.
Whats really odd is this happens only when the toolbar is visible.
Greetings,
I have a chart inside of a table. The chart is a bar that represents a value for each record. The chart works fine in ie and macsafari but not in firefox.
In firefox, the chart for each record is stretched out really big. Right clicking or refreshing will cause the charts to resize correctly.
|||Greetings,
I have a chart inside of a table. The chart is a bar that represents a value for each record. The chart works fine in ie and macsafari but not in firefox.
In firefox, the chart for each record is stretched out really big. Right clicking or refreshing will cause the charts to resize correctly.
|||I have a chart in a table that prints a bar value for each record. This works fine in ie and safari. In firefox the chart for each record is stretched onl the load. If I right click or refresh using the report bar the chart is fixed.|||I have a chart in a table that prints a bar value for each record. This works
fine in ie and safari. In firefox the chart for each record is stretched onl the
load. If I right click or refresh using the report bar the chart is fixed.
Chart graphic stretch
Greetings,
I dont know where to post this. I am hoping someone else has run into this in the past.
I have a report with a chart component that works fine in i.e and safari. In fire fox the chart is stretched really bad. If I right click on the image or press reload from the report toolbar the chart is correct.
Whats really odd is this happens only when the toolbar is visible.
Greetings,
I have a chart inside of a table. The chart is a bar that represents a value for each record. The chart works fine in ie and macsafari but not in firefox.
In firefox, the chart for each record is stretched out really big. Right clicking or refreshing will cause the charts to resize correctly.
|||Greetings,
I have a chart inside of a table. The chart is a bar that represents a value for each record. The chart works fine in ie and macsafari but not in firefox.
In firefox, the chart for each record is stretched out really big. Right clicking or refreshing will cause the charts to resize correctly.
|||I have a chart in a table that prints a bar value for each record. This works fine in ie and safari. In firefox the chart for each record is stretched onl the load. If I right click or refresh using the report bar the chart is fixed.|||I have a chart in a table that prints a bar value for each record. This works
fine in ie and safari. In firefox the chart for each record is stretched onl the
load. If I right click or refresh using the report bar the chart is fixed.