|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Security Question
Hi All,
If I want to enable a user to extract up to 200 rows per a request, how that can be done? Is it possible to control? Thanks, Eric You can do server-side paging of the data following the example in this
article: http://www.sqlteam.com/article/server-side-paging-using-sql-server-2005 Not sure if that is exactly what you are after or not. Can you provide a little more information on what exactly you are after if it doesn't answer the question? Show quoteHide quote "Eric" <Eric***@Hotmail.com> wrote in message news:ecb8D5NVJHA.2468@TK2MSFTNGP02.phx.gbl... > Hi All, > > If I want to enable a user to extract up to 200 rows per a request, how > that can be done? > Is it possible to control? > > Thanks, > > Eric > Hi There,
My idea is how to prevent that someone that may work on my sql server 2005 will not attempt to extract more then 200 record. The person may try to extract millions of records so I am trying to find out how to prevent that? That person will work with me remotely and I need to setup an account for him. I hope that was enough details. Thanks, Eric Show quoteHide quote "Jonathan Kehayias" <jmkehayias.nospam@nospam.gmail.com> wrote in message news:%23iqfO$NVJHA.4900@TK2MSFTNGP05.phx.gbl... > You can do server-side paging of the data following the example in this > article: > > http://www.sqlteam.com/article/server-side-paging-using-sql-server-2005 > > Not sure if that is exactly what you are after or not. Can you provide a > little more information on what exactly you are after if it doesn't answer > the question? > > -- > Jonathan Kehayias > SQL Server MVP > http://jmkehayias.blogspot.com > http://www.sqlclr.net > > "Eric" <Eric***@Hotmail.com> wrote in message > news:ecb8D5NVJHA.2468@TK2MSFTNGP02.phx.gbl... >> Hi All, >> >> If I want to enable a user to extract up to 200 rows per a request, how >> that can be done? >> Is it possible to control? >> >> Thanks, >> >> Eric >> > > You can't do that at the user or login level. It would be based on the
query code that they submit to the server more or less. Show quoteHide quote "Eric" <Eric***@Hotmail.com> wrote in message news:%23uMUARWVJHA.3688@TK2MSFTNGP02.phx.gbl... > Hi There, > > My idea is how to prevent that someone that may work on my sql server 2005 > will not attempt to extract more then 200 record. The person may try to > extract millions of records so I am trying to find out how to prevent > that? That person will work with me remotely and I need to setup an > account for him. I hope that was enough details. > > Thanks, > > Eric > > > "Jonathan Kehayias" <jmkehayias.nospam@nospam.gmail.com> wrote in message > news:%23iqfO$NVJHA.4900@TK2MSFTNGP05.phx.gbl... >> You can do server-side paging of the data following the example in this >> article: >> >> http://www.sqlteam.com/article/server-side-paging-using-sql-server-2005 >> >> Not sure if that is exactly what you are after or not. Can you provide a >> little more information on what exactly you are after if it doesn't >> answer the question? >> >> -- >> Jonathan Kehayias >> SQL Server MVP >> http://jmkehayias.blogspot.com >> http://www.sqlclr.net >> >> "Eric" <Eric***@Hotmail.com> wrote in message >> news:ecb8D5NVJHA.2468@TK2MSFTNGP02.phx.gbl... >>> Hi All, >>> >>> If I want to enable a user to extract up to 200 rows per a request, how >>> that can be done? >>> Is it possible to control? >>> >>> Thanks, >>> >>> Eric >>> >> >> > > You can use the TOP option to limit the result set:
SELECT TOP 200 <columns> FROM Table ORDER BY ... TOP will always return the first 200 rows, it won't allow retrieval of
subsequent sets of 200 from the database. If the first 200 is all that is needed TOP would work, but if you need paging, it won't. Show quoteHide quote "Plamen Ratchev" <Pla***@SQLStudio.com> wrote in message news:8ZOdnYrnfO3PRajUnZ2dnUVZ_qfinZ2d@speakeasy.net... > You can use the TOP option to limit the result set: > > SELECT TOP 200 <columns> > FROM Table > ORDER BY ... > > -- > Plamen Ratchev > http://www.SQLStudio.com The question was how to extract 200 rows per user request, it did not
mention paging at all. You could build a paging solution using TOP. In my original post I made the comment that I wasn't sure if paging was what
they were after or not. My interpretation of the question being asked might be different than yours or someone elses. I also didn't say that you absolutely couldn't build a paging solution with TOP, I said doing a simple TOP 200 won't allow paging. TOP for paging would be one of the more expensive ways of doing paging in SQL Server. The cost to sort for TOP for paging can easily be more than using a CTE or a Table Variable with an identity RowID column to control the paging sets. Show quoteHide quote "Plamen Ratchev" <Pla***@SQLStudio.com> wrote in message news:8ZOdnYTnfO2DjKvUnZ2dnUVZ_qfinZ2d@speakeasy.net... > The question was how to extract 200 rows per user request, it did not > mention paging at all. You could build a paging solution using TOP. > > -- > Plamen Ratchev > http://www.SQLStudio.com
Other interesting topics
Server Disk Space
in full recovery mode but log keeps self-truncating Max server memory being ignored Consolidate datafiles to one drive SQL 2k5-32bit >SQL 2k5-64bit Cumulative package 2 for SQL 2008 How to do bulk update in SQL Server 2005. Taking database offline taking long time Maintenence Cleanup Task does not delete backup files 32 vs 64 bit SQL Server hotfixes |
|||||||||||||||||||||||