Showing posts with label method. Show all posts
Showing posts with label method. Show all posts

Monday, March 19, 2012

Check for existence of server

Is there any sort of check that can be done to see if a particular instance
of SQL Server is present? I already call a method to check for connection --
if no connection, I have the user re-enter server settings (server name and
database name). But the connection check is made by calling for a scalar
value in the database. What I'd rather do is graduate the error messages:
1. No server installed
2. Specified database name not installed
3. Specfied table or sproc not available
Any thoughts?Earl
1) if not exists (select * from sysservers where svrname ='blblb')
print 'Server does not exist'
2) if not exists (select * from sysdatabases where name ='blblb')
print Database does not exist'
3) if object_id('test') is null
print 'An object does not exist'
"Earl" <brikshoe@.newsgroups.nospam> wrote in message
news:%23obJi4vLHHA.1008@.TK2MSFTNGP06.phx.gbl...
> Is there any sort of check that can be done to see if a particular
> instance of SQL Server is present? I already call a method to check for
> connection -- if no connection, I have the user re-enter server settings
> (server name and database name). But the connection check is made by
> calling for a scalar value in the database. What I'd rather do is graduate
> the error messages:
> 1. No server installed
> 2. Specified database name not installed
> 3. Specfied table or sproc not available
> Any thoughts?
>|||Sure as shown on page 565, you can use the dbProviderFactories.GetFactory
method to return a list of (visible) servers based on a specific provider.
These same classes can be used to start, stop or pause the server service as
well (in addition to others).
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Earl" <brikshoe@.newsgroups.nospam> wrote in message
news:%23obJi4vLHHA.1008@.TK2MSFTNGP06.phx.gbl...
> Is there any sort of check that can be done to see if a particular
> instance of SQL Server is present? I already call a method to check for
> connection -- if no connection, I have the user re-enter server settings
> (server name and database name). But the connection check is made by
> calling for a scalar value in the database. What I'd rather do is graduate
> the error messages:
> 1. No server installed
> 2. Specified database name not installed
> 3. Specfied table or sproc not available
> Any thoughts?
>

Check for existence of server

Is there any sort of check that can be done to see if a particular instance
of SQL Server is present? I already call a method to check for connection --
if no connection, I have the user re-enter server settings (server name and
database name). But the connection check is made by calling for a scalar
value in the database. What I'd rather do is graduate the error messages:
1. No server installed
2. Specified database name not installed
3. Specfied table or sproc not available
Any thoughts?Earl
1) if not exists (select * from sysservers where svrname ='blblb')
print 'Server does not exist'
2) if not exists (select * from sysdatabases where name ='blblb')
print Database does not exist'
3) if object_id('test') is null
print 'An object does not exist'
"Earl" <brikshoe@.newsgroups.nospam> wrote in message
news:%23obJi4vLHHA.1008@.TK2MSFTNGP06.phx.gbl...
> Is there any sort of check that can be done to see if a particular
> instance of SQL Server is present? I already call a method to check for
> connection -- if no connection, I have the user re-enter server settings
> (server name and database name). But the connection check is made by
> calling for a scalar value in the database. What I'd rather do is graduate
> the error messages:
> 1. No server installed
> 2. Specified database name not installed
> 3. Specfied table or sproc not available
> Any thoughts?
>|||Hi Earl
"Earl" wrote:

> Is there any sort of check that can be done to see if a particular instanc
e
> of SQL Server is present? I already call a method to check for connection
--
> if no connection, I have the user re-enter server settings (server name an
d
> database name). But the connection check is made by calling for a scalar
> value in the database. What I'd rather do is graduate the error messages:
> 1. No server installed
> 2. Specified database name not installed
> 3. Specfied table or sproc not available
> Any thoughts?
>
It sounds like you are not handling any errors that are given when you try
and connect to the server. You may want to look at:
http://msdn2.microsoft.com/en-us/library/ms677489.aspx
John|||Sure as shown on page 565, you can use the dbProviderFactories.GetFactory
method to return a list of (visible) servers based on a specific provider.
These same classes can be used to start, stop or pause the server service as
well (in addition to others).
hth
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Earl" <brikshoe@.newsgroups.nospam> wrote in message
news:%23obJi4vLHHA.1008@.TK2MSFTNGP06.phx.gbl...
> Is there any sort of check that can be done to see if a particular
> instance of SQL Server is present? I already call a method to check for
> connection -- if no connection, I have the user re-enter server settings
> (server name and database name). But the connection check is made by
> calling for a scalar value in the database. What I'd rather do is graduate
> the error messages:
> 1. No server installed
> 2. Specified database name not installed
> 3. Specfied table or sproc not available
> Any thoughts?
>

Sunday, February 19, 2012

Chart data from custom assembly method?

Hi!
I'm new to reporting services and have a question for you.
I've managed to get a single value from a custom assembly method and publish
it on a report,
what I want to do now is to fill a chart with data from my custom assembly
method, the data
is returned like a dataset.
Displaying a single value was no big deal, found a lot of examples on the
net and in this forum, but
setting the custom dataset as source is very hard to find.
Regards,
Peter Larsson!Isn't this possible, anyone?
/P
"Peter Larsson" <peterskola@.frillesas.nospam> wrote in message
news:eAHDhuahHHA.1624@.TK2MSFTNGP06.phx.gbl...
> Hi!
> I'm new to reporting services and have a question for you.
> I've managed to get a single value from a custom assembly method and
> publish it on a report,
> what I want to do now is to fill a chart with data from my custom assembly
> method, the data
> is returned like a dataset.
> Displaying a single value was no big deal, found a lot of examples on the
> net and in this forum, but
> setting the custom dataset as source is very hard to find.
> Regards,
> Peter Larsson!
>
>

Thursday, February 16, 2012

Charging back

Hi,
Is there any automated method to measure reporting services usage (report
duration) per report in order to be used for charging back report owners in
an enterprise and shared reporting services environment?
We have SQL Server RS 2000 SP2 on an shared report/ SQL server and need to
find a method to charge back our customers.
ThanksAlex,
All your reporting services report processing statistics are stored in the
Report Server database in the ExecutionLog table. It details execution
times, user ID, etc for each report run. You will have to tie the report ID
to the ItemID in the Catalogue to get you report names to see which reports
are being run by who.
Reporting services cleans the executionlog table out every couple of months,
so if you wish to keep a permanent record of all reports run then you will
have to periodically export the table contents to another table/database.
Hoep this helps
Ray
"Alex" wrote:
> Hi,
> Is there any automated method to measure reporting services usage (report
> duration) per report in order to be used for charging back report owners in
> an enterprise and shared reporting services environment?
> We have SQL Server RS 2000 SP2 on an shared report/ SQL server and need to
> find a method to charge back our customers.
> Thanks
>
>|||Hi Ray,
Thanks for the info. It works great.
Alex
"Ray Seppala" <Ray.Seppala@.defence.gov.au.(Donotspam)> wrote in message
news:81AD2BFF-FDED-4B78-BA08-FFCC11C4A3F1@.microsoft.com...
> Alex,
> All your reporting services report processing statistics are stored in the
> Report Server database in the ExecutionLog table. It details execution
> times, user ID, etc for each report run. You will have to tie the report
> ID
> to the ItemID in the Catalogue to get you report names to see which
> reports
> are being run by who.
> Reporting services cleans the executionlog table out every couple of
> months,
> so if you wish to keep a permanent record of all reports run then you will
> have to periodically export the table contents to another table/database.
> Hoep this helps
> Ray
> "Alex" wrote:
>> Hi,
>> Is there any automated method to measure reporting services usage (report
>> duration) per report in order to be used for charging back report owners
>> in
>> an enterprise and shared reporting services environment?
>> We have SQL Server RS 2000 SP2 on an shared report/ SQL server and need
>> to
>> find a method to charge back our customers.
>> Thanks
>>|||Ray,
I beleive the start and end time are from when user clicks on run button
until they actually see the report. This time will include the time while
Reporting server was waiting for data from database server. This will not be
fair to include the wait time in charge back and charge customers for it.
Is there anyway to get the actual time Reporting server was busy processing
the report only?
Thanks
"Ray Seppala" <Ray.Seppala@.defence.gov.au.(Donotspam)> wrote in message
news:81AD2BFF-FDED-4B78-BA08-FFCC11C4A3F1@.microsoft.com...
> Alex,
> All your reporting services report processing statistics are stored in the
> ver
> Report Server database in the ExecutionLog table. It details execution
> times, user ID, etc for each report run. You will have to tie the report
> ID
> to the ItemID in the Catalogue to get you report names to see which
> reports
> are being run by who.
> Reporting services cleans the executionlog table out every couple of
> months,
> so if you wish to keep a permanent record of all reports run then you will
> have to periodically export the table contents to another table/database.
> Hoep this helps
> Ray
> "Alex" wrote:
>> Hi,
>> Is there any automated method to measure reporting services usage (report
>> duration) per report in order to be used for charging back report owners
>> in
>> an enterprise and shared reporting services environment?
>> We have SQL Server RS 2000 SP2 on an shared report/ SQL server and need
>> to
>> find a method to charge back our customers.
>> Thanks
>>|||Alex,
There is a bit in BOL about the execution data you can get from RS. Try
this link;
ms-help://MS.RSBOL80.1033/rsadmin/htm/arp_rslogfiles_v1_88gy.htm
Chris
Ray Seppala wrote:
> Alex,
> All your reporting services report processing statistics are stored
> in the Report Server database in the ExecutionLog table. It details
> execution times, user ID, etc for each report run. You will have to
> tie the report ID to the ItemID in the Catalogue to get you report
> names to see which reports are being run by who.
> Reporting services cleans the executionlog table out every couple of
> months, so if you wish to keep a permanent record of all reports run
> then you will have to periodically export the table contents to
> another table/database.
> Hoep this helps
> Ray
> "Alex" wrote:
> > Hi,
> >
> > Is there any automated method to measure reporting services usage
> > (report duration) per report in order to be used for charging back
> > report owners in an enterprise and shared reporting services
> > environment?
> >
> > We have SQL Server RS 2000 SP2 on an shared report/ SQL server and
> > need to find a method to charge back our customers.
> >
> > Thanks
> >
> >
> >