Limit a SQL Server account

  • I have some accounts for reports. They are ReadOnly accounts and just provide data for reports. I want to prevent them by limiting their access time during the business day. Also, I like to limit them by number of rows or CPU cycle that their reports produce/need. For example, if they are requesting a heavy report that needs ... of CPU cycles or huge number of rows, then the request fails or at least in a specific time of the day it fails.

    Is there a way to implement this?


    Canada DBA,

  • Hi Farad,

    If i understand ur question then u need that if the CPU process timing is very high or cpu id using full resources then the heavy report should be stoped.

    U can do it :I am not sure this will help u or not but sure that u will get a way.

    u can extimate the query timing from a single query by

    SET STATISTICS TIME ON

    Select @@CPU_BUSY

    from sp_who u can find out the processed in process and all spid.

    save the statistics time and user name from a table .now when user executes the query u see in sp_who and calculate the time if that time is more then the statistic time or the cpu busy then kill the process id.

    for limiting the access for few rows i did not tried.

    hope this help

    Sorry if this doesnt help.

     

    from

    Killer

     

  • The simple answer is no, this is not possible. You might try implementing some more or less badly working home-built solution for it, but I would not think it is worth it.

  • Hi ,

     

    U are right chris.

     

    from

    Killer

  • This sounds like a perfect opportunity to explore SRS - SQL Reporting Services. The high CPU demand reports can be generated during off hours and rendered on demand whilst smaller reports can be executed on n as needed basis.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply