Showing posts with label determine. Show all posts
Showing posts with label determine. Show all posts

Friday, March 9, 2012

Programmatically determining if a data driven subscription is running

Hi,

Quick question: how do I determine programmatically if a data driven subscription is currently running?

More info:

I’m writing a web application which allows the user to kick off an existing data driven subscription (reporting services 2000), which runs from a table with parameters, paths, etc which the user has populated.

The subscription can take several minutes to run, during which time I need to prevent other users from attempting to run the subscription or alter data on the table driving the subscription.

All I’ve found in the docs so far is

1. The ActiveState on the subscription.

This seems to have more to do with weather or not it can run than if it is running.

2. The status of the subscription.

This seems to only return “done: {0} of {1} with {2} errors” Parsing this is likely to be too flaky to be acceptable.

I really need to move on this as soon as possible, any help is appreciated.

Thanks

If you look at the ReportServer.dbo.Subscriptions table, isn't there a LastRunTime column? Will that get you what you want?|||

I should have clarified that I want to obtain the information through soap access. I belive I can actually obtain that value through soap access, but I believe the lastruntime states the time at which the process was kicked off, not the time at which it finished. From the reading i've been doing I'm staring to think that this is a very difficult problem to solve. If I come up with a solution more interesting than parsing the status field I'll post the details.

Thanks anyway

|||

Ok,

Looks like I was wrong in my original post, the status returned from the subscription will say either Done: blah of blah or Processing Blah of Blah. So as an imperfect (and quick) solution I can and will parse that. I'm still not certain if i'm missing something and everything I need is already available through the soap api, but anyway... If I had more time and we weren't switching to 2005 in a few months I'd probably write a custom delivery extension that fires off an event to a web service or something to that effect.

Programmatically determine Startup Account

I have over 60 servers and am looking for some code that will allow me to
query for the Startup Account user ('system' or some domain account). Where
is this information stored?
The Spirit gives life; the flesh counts for nothing! (Jn 6:63)
There are many programming interfaces to that property. I typically like to
use command line utility to grab the information from each server, and parse
the text for the service account info. For instance, you can use NT resource
kit tool sc.exe for this purpose.
Linchi
"Blue Sky" wrote:

> I have over 60 servers and am looking for some code that will allow me to
> query for the Startup Account user ('system' or some domain account). Where
> is this information stored?
> --
> The Spirit gives life; the flesh counts for nothing! (Jn 6:63)
|||Then, this info is stored in the registry? I would prefer to stay within
SQL, where i can use the xp_regread(). Where in the registry is the
information stored?
The Spirit gives life; the flesh counts for nothing! (Jn 6:63)
"Linchi Shea" wrote:
[vbcol=seagreen]
> There are many programming interfaces to that property. I typically like to
> use command line utility to grab the information from each server, and parse
> the text for the service account info. For instance, you can use NT resource
> kit tool sc.exe for this purpose.
> Linchi
> "Blue Sky" wrote:
|||Execute something like this on your SQL Server instance:
DECLARE @.key nvarchar(100)
SELECT @.key = 'SYSTEM\CurrentControlSet\Services\' +
CASE @.@.SERVICENAME
WHEN 'MSSQLSERVER' THEN 'MSSQLSERVER'
ELSE 'MSSQL$' + @.@.SERVICENAME
END
SELECT @.key
DECLARE @.test varchar(20)
EXEC master..xp_regread @.rootkey='HKEY_LOCAL_MACHINE',
@.key= @.key,
@.value_name='ObjectName',
@.value=@.test OUTPUT
SELECT @.test
Regards
Pawel Potasinski
[http://www.potasinski.pl]
Uytkownik "Blue Sky" <BlueSky@.discussions.microsoft.com> napisa w
wiadomoci news:4A6CB5CF-2203-42B1-B209-E9EEB8125632@.microsoft.com...
>I have over 60 servers and am looking for some code that will allow me to
> query for the Startup Account user ('system' or some domain account).
> Where
> is this information stored?
> --
> The Spirit gives life; the flesh counts for nothing! (Jn 6:63)

Programmatically determine Startup Account

I have over 60 servers and am looking for some code that will allow me to
query for the Startup Account user ('system' or some domain account). Where
is this information stored?
--
The Spirit gives life; the flesh counts for nothing! (Jn 6:63)There are many programming interfaces to that property. I typically like to
use command line utility to grab the information from each server, and parse
the text for the service account info. For instance, you can use NT resource
kit tool sc.exe for this purpose.
Linchi
"Blue Sky" wrote:

> I have over 60 servers and am looking for some code that will allow me to
> query for the Startup Account user ('system' or some domain account). Whe
re
> is this information stored?
> --
> The Spirit gives life; the flesh counts for nothing! (Jn 6:63)|||Then, this info is stored in the registry? I would prefer to stay within
SQL, where i can use the xp_regread(). Where in the registry is the
information stored?
--
The Spirit gives life; the flesh counts for nothing! (Jn 6:63)
"Linchi Shea" wrote:
[vbcol=seagreen]
> There are many programming interfaces to that property. I typically like t
o
> use command line utility to grab the information from each server, and par
se
> the text for the service account info. For instance, you can use NT resour
ce
> kit tool sc.exe for this purpose.
> Linchi
> "Blue Sky" wrote:
>|||Execute something like this on your SQL Server instance:
DECLARE @.key nvarchar(100)
SELECT @.key = 'SYSTEM\CurrentControlSet\Services' +
CASE @.@.SERVICENAME
WHEN 'MSSQLSERVER' THEN 'MSSQLSERVER'
ELSE 'MSSQL$' + @.@.SERVICENAME
END
SELECT @.key
DECLARE @.test varchar(20)
EXEC master..xp_regread @.rootkey='HKEY_LOCAL_MACHINE',
@.key= @.key,
@.value_name='ObjectName',
@.value=@.test OUTPUT
SELECT @.test
Regards
Pawel Potasinski
[http://www.potasinski.pl]
Uytkownik "Blue Sky" <BlueSky@.discussions.microsoft.com> napisa w
wiadomoci news:4A6CB5CF-2203-42B1-B209-E9EEB8125632@.microsoft.com...
>I have over 60 servers and am looking for some code that will allow me to
> query for the Startup Account user ('system' or some domain account).
> Where
> is this information stored?
> --
> The Spirit gives life; the flesh counts for nothing! (Jn 6:63)

Programmatically determine Startup Account

I have over 60 servers and am looking for some code that will allow me to
query for the Startup Account user ('system' or some domain account). Where
is this information stored?
--
The Spirit gives life; the flesh counts for nothing! (Jn 6:63)There are many programming interfaces to that property. I typically like to
use command line utility to grab the information from each server, and parse
the text for the service account info. For instance, you can use NT resource
kit tool sc.exe for this purpose.
Linchi
"Blue Sky" wrote:
> I have over 60 servers and am looking for some code that will allow me to
> query for the Startup Account user ('system' or some domain account). Where
> is this information stored?
> --
> The Spirit gives life; the flesh counts for nothing! (Jn 6:63)|||Then, this info is stored in the registry? I would prefer to stay within
SQL, where i can use the xp_regread(). Where in the registry is the
information stored?
--
The Spirit gives life; the flesh counts for nothing! (Jn 6:63)
"Linchi Shea" wrote:
> There are many programming interfaces to that property. I typically like to
> use command line utility to grab the information from each server, and parse
> the text for the service account info. For instance, you can use NT resource
> kit tool sc.exe for this purpose.
> Linchi
> "Blue Sky" wrote:
> > I have over 60 servers and am looking for some code that will allow me to
> > query for the Startup Account user ('system' or some domain account). Where
> > is this information stored?
> > --
> > The Spirit gives life; the flesh counts for nothing! (Jn 6:63)|||Execute something like this on your SQL Server instance:
DECLARE @.key nvarchar(100)
SELECT @.key = 'SYSTEM\CurrentControlSet\Services\' +
CASE @.@.SERVICENAME
WHEN 'MSSQLSERVER' THEN 'MSSQLSERVER'
ELSE 'MSSQL$' + @.@.SERVICENAME
END
SELECT @.key
DECLARE @.test varchar(20)
EXEC master..xp_regread @.rootkey='HKEY_LOCAL_MACHINE',
@.key= @.key,
@.value_name='ObjectName',
@.value=@.test OUTPUT
SELECT @.test
--
Regards
Pawel Potasinski
[http://www.potasinski.pl]
U¿ytkownik "Blue Sky" <BlueSky@.discussions.microsoft.com> napisa³ w
wiadomo¶ci news:4A6CB5CF-2203-42B1-B209-E9EEB8125632@.microsoft.com...
>I have over 60 servers and am looking for some code that will allow me to
> query for the Startup Account user ('system' or some domain account).
> Where
> is this information stored?
> --
> The Spirit gives life; the flesh counts for nothing! (Jn 6:63)

Programmatically determine IIS log directory

I wrote a custom IIS log reader windows service that reads and parses log data and periodically uploads it to a SQL server table which I run my reports from later. Currently I read the file by giving the absolute physical path name for the log directory followed by the log file name I anticipate depending on date/time stamps.

My question is: Is there a programmatic way to get the directory path which is configured in IIS to store the IIS log files to? We use non default location e.g. D:\DATA\LOGS\IIS\W3SVC1 or something similar, which might change from server to server. Also, I am not worried about the individual log file names but the directory. I would prefer a C# code example.

Any help is appreciated!

KC

Hi,

I'm sorry that I don't have a solution to your problem, but your reader sounds like something I really could use. Any chance I could get you to send me a copy of the program? Unfortunately I'm a delphi programmer so I can't help you out, but I'm learning C in my spare (ha!) time and your code and logic could help me come up with a solution for my company. My email address is:

lkuderick

@.

hotmail

.

com

if you can help.

Thanks!

>> larry <<

Programmatically determine IIS log directory

I wrote a custom IIS log reader windows service that reads and parses log data and periodically uploads it to a SQL server table which I run my reports from later. Currently I read the file by giving the absolute physical path name for the log directory followed by the log file name I anticipate depending on date/time stamps.

My question is: Is there a programmatic way to get the directory path which is configured in IIS to store the IIS log files to? We use non default location e.g. D:\DATA\LOGS\IIS\W3SVC1 or something similar, which might change from server to server. Also, I am not worried about the individual log file names but the directory. I would prefer a C# code example.

Any help is appreciated!

KC

Hi,

I'm sorry that I don't have a solution to your problem, but your reader sounds like something I really could use. Any chance I could get you to send me a copy of the program? Unfortunately I'm a delphi programmer so I can't help you out, but I'm learning C in my spare (ha!) time and your code and logic could help me come up with a solution for my company. My email address is:

lkuderick

@.

hotmail

.

com

if you can help.

Thanks!

>> larry <<

Monday, February 20, 2012

Programatically determine if column supports full-text searching

Hi,
Is there a way to programmatically determine (perhaps by interrogating the
system catalogs) if a column supports full-text searching.
In my application I want to use "CONTAINS" where support is available but
deprecate to "LIKE" where it is not.
TIA
Robin
call sp_help_fulltext_columns
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"DbNetLink" <info@.NOTTHISdbnetlink.co.uk> wrote in message
news:%23vi0o$pYFHA.2128@.TK2MSFTNGP14.phx.gbl...
> Hi,
> Is there a way to programmatically determine (perhaps by interrogating the
> system catalogs) if a column supports full-text searching.
> In my application I want to use "CONTAINS" where support is available but
> deprecate to "LIKE" where it is not.
> TIA
> Robin
>