Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
cruxmagi
Starting Member
38 Posts |
Posted - 2008-05-09 : 08:35:08
|
| I would like to know if a singleton Stored Procedures can be created in SQLCLR |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2008-05-10 : 07:28:24
|
| I don't think so...what's your objective? You want to insure that a process can not run concurrently? There may be other ways to achieve that. Could you give some detail about what you're trying to accomplish?Be One with the OptimizerTG |
 |
|
|
cruxmagi
Starting Member
38 Posts |
Posted - 2008-05-13 : 02:55:36
|
| is there any possibilities to implement N-Tier atchitecture in CLR stored procedures |
 |
|
|
cruxmagi
Starting Member
38 Posts |
Posted - 2008-05-13 : 02:55:47
|
| is there any possibilities to implement N-Tier atchitecture in CLR stored procedures |
 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2008-05-13 : 09:13:00
|
| YesBe One with the OptimizerTG |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
|
|
Johnde81
Starting Member
1 Post |
Posted - 2011-10-14 : 08:39:45
|
| I did the following today in CLRC# private static string TheValue = "h"; [Microsoft.SqlServer.Server.SqlProcedure] public static void SetValue(SqlString value) { TheValue += value.ToString(); } [Microsoft.SqlServer.Server.SqlFunction] public static SqlString GetValue() { return (SqlString)TheValue; }SQL:exec dbo.SetValue 'ello'select dbo.GetValue()and it returned: helloafter 2 hours I ran dbo.GetValue() again and it returned the static value.After restarting SQL it only returned the initial value of 'h'So I am sure you can have a singleton in CLR. Will do more research on the object life cycle and post |
 |
|
|
|
|
|