473,385 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

what are the memory caps for threads running as a CLR stored procedure executed by sql server 2005? is it limited by OS only or also by sql servers memory limits? e.g. lets say my clr stored procedure is executed by sql server 2005 then it creates 10

DR
what are the memory caps for threads running as a CLR stored procedure
executed by sql server 2005? is it limited by OS only or also by sql servers
memory limits? e.g. lets say my clr stored procedure is executed by sql
server 2005 then it creates 10 threads and each thread builds a giant array
on the stack, is the limits of each array limited by sql server or the os?
do these clr stored procedures run inside the sql server address space or
does sql server fork a sepperat process for each one?
Oct 25 '07 #1
1 1604
DR,

Your example only holds up if you are using unsafe code. To create an
array on the stack, you have to use unsafe code in C#. Otherwise, you have
a reference on the stack, and the array is created on the heap.

For unsafe code, and for creating new threads, you have to set the
assembly to unsafe in sql server when registering it.

All that aside, SQL Server will manage the memory and the threads. The
CLR is hosted by SQL Server, and defers to SQL Server for threads and
memory, so how those resources are going to be allocated is going to be
dependent on SQL Servers settings (how much memory are you allowing SQL
Server to use? Is it using threads, or fibers? etc, etc).

Basically, SQL Server is the master of it's domain when it comes to the
CLR. The CLR will not do anything that SQL server will not allow it to do.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"DR" <so*******************@yahoo.comwrote in message
news:uw**************@TK2MSFTNGP03.phx.gbl...
what are the memory caps for threads running as a CLR stored procedure
executed by sql server 2005? is it limited by OS only or also by sql
servers memory limits? e.g. lets say my clr stored procedure is executed
by sql server 2005 then it creates 10 threads and each thread builds a
giant array on the stack, is the limits of each array limited by sql
server or the os? do these clr stored procedures run inside the sql server
address space or does sql server fork a sepperat process for each one?

Oct 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
11
by: jrefactors | last post by:
I want to know the differences between SQL Server 2000 stored procedures and oracle stored procedures? Do they have different syntax? The concept should be the same that the stored procedures...
5
by: Franco, Gustavo | last post by:
Hi, I have a question, and please I need a answer. How can I finalize a thread running with Application.Run (I need the message loop!!!) without call Thread.Abort?. I want to call...
9
by: Microsoft News Server | last post by:
Hi, I am currently having a problem with random, intermittent lock ups in my ASP.net application on our production server (99% CPU usage by 3 threads, indefinately). I currently use IIS Debug...
1
by: Antonio | last post by:
My web page allows a user to click a button for a report to be created. When they click, the code calls a web service which accesses SQL Server and calls a stored procedure. THE SP takes 2 minutes...
9
by: fniles | last post by:
I am using VB.NET 2003 and SQL2000 database. I have a stored procedure called "INSERT_INTO_MYTABLE" that accepts 1 parameter (varchar(10)) and returns the identity column value from that table....
0
by: DR | last post by:
what are the memory caps for threads running as a CLR stored procedure executed by sql server 2005? is it limited by OS only or also by sql servers memory limits? e.g. lets say my clr stored...
9
by: Ryan Liu | last post by:
Hi, I use C# wrote an Client/Server application. In production environment, will be 130 clients (Windows XP) connect to a Server (Windows 2000/2003 Server) thought TCP/IP socket in a local 100M...
167
by: darren | last post by:
Hi I have to write a multi-threaded program. I decided to take an OO approach to it. I had the idea to wrap up all of the thread functions in a mix-in class called Threadable. Then when an...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.