Can I Have Mixed CLR Assemblies Installed In SQL Server?
Mar 31, 2008
I have a mixed CLR assembly (including native C++ and manage C++). Can I use this assembly in SQL SERVER 2005 or 2008? I know pure managed assemblies work fine. Thanks.
Did this as a exercise and am fed up with my fruitless searching.Went and create an CLR assembly and all with min hassel. Now that Ihave that dll out there, I am tring to find some system table or somedisplay in management studio that shows me where the file is located onthe hard drive and cannot locate it.Can someone please point me in the correct location.Thanks.
I want to find whether SQL Server 2005 x86 is installed or SQL Server 2005 x64 is installed programatically(Any API would do.) If anyone can recommend a registry key that I can rely on find whether it is a 32 bit or 64 bit SQL Server that would suffice.
I program in C# with SQL Server 2005. I need to connect to Server in security mode.
In connection string I supply UserID = myuser Password = mypassword Persist Security Info = True
In Server I set mixed authentication mode,create login 'mylogin' with password = mypassword after that in my database I create user with username = myuser and loginName = mylogin
There are two problems :
1. in login creation after I fill password, close window and open it again there is old (default) password but not my password 2. Application fails to connect to DB
I am trying to setup cached reports so that one of my larger reports doesn't have to be re-run every time someone wants to view it (the data source only updates every 24 hours).
Anyway I made a new data source, set the report to use that, and in that data source I said to use "SQLexampleUserName" as the stored credentials.
Now when I go to run the report it says: Login failed for user 'username'. The user is not associated with a trusted SQL Server connection.
I am encountering a timeout expired error when deploying a .NET assembly in SQL Server 2005 using Visual Studio.NET. I already enabled SQL Server for CLR. Whenever I run the CREATE ASSEMBLY command in SQL Management Studio, my query just ends up executing without stopping.
We have recently migrated quite a databases around 20 from SQL 2000 and 2005 to SQL server 2008R2.
I am using Ola's script for index maintenance for those with compatibility level above 80 as i heard it supports that way.
Hence separated in 2 way job where for those with compatibility level 80, we are running job with below query on each database with 80 as compared
USE ABC GO EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)" GO EXEC sp_updatestats GO
I am not sure if this is the only way in for those databases, because we are seeing the database getting because of that somewhere using above query.( seems log file filling very rapidly).
But above is not the case with those databases , with compatibility 90 and above.
Hi Friends, I have a question. At my home computer i downloaded and installed VWD. As usual it also installed Sqlexpress as part of the installation(i checked the option). Later on i downloaded Management studio separately so i am fine with my home computer as every thing is free. But at work we decided to develop application using VS 2005 and Sqlserver 2005. So we bought and installed VS2005 professional edition at work and it also installed Sqlexpress during the installation as a defualt desktop engine. I am fine with that too. But i am not understing where do i get the Management studio? Is it some thing i could get it off the web for free or what? I am not sure we would have an option while installing the VS 2005 professional that also does install management studio and we need to check that option. I am not sure if we could get the management studion off the web for free and and evelop applications.
I wrote an assembly and attached to a trigger in one of my tables. It works as I expected, but then I decided to modify the code, say adding some new triggers that I will use with other tables. Then I realize that in order to update my new version of the assembly in SQL first I need to remove the trigger in the table, then remove the assembly, add the new version and finally run a script to create the trigger again in the table.
How could I avoid going through all this process everytime I want to update my assembly?
I am running a CLR stored proc that goes to an EDS (Novell) server with LDAP and returns records into a SQL table.
I am using the Novell ldap library.
I want to do this with SSL so my code referneces the Mono security library as well.
However when I make the call to the stored proc to run in SSL, I get an object not found error. I do not think that the the Novell assembly can "find" the Mono assembly.
Two points: 1/ I can do the SSL if I run it as an asp.net page (so I know the SSL works) 2/ The proc runs and pulls all the records in non-SSL (so I know the proc works)
i found one tutorial on self signing assemblies for use in sql server, but it appears to have errors. does anyone know of a better tutorial on this topic? the site im currently looking at is here: http://www.sqljunkies.com/WebLog/ktegels/articles/SigningSQLCLRAssemblies.aspx
I have a question: how is it planned to replicate changes made to the assemblies and to the CLR functions or UDT? Will Visual Studio deploy change of the Assembly as ALTER not DROP/CREATE?
How does SQL Server 2005 handle the replication of assemblies? I get the following when trying to replicate an assembly:
Timestamp: 6/15/2007 9:41:33 AM Message: HandlingInstanceID: 05eaed53-b6be-42da-8c72-0f91fcbfa5b6 An exception of type 'Microsoft.SqlServer.Replication.ComErrorException' occurred and was caught. ------------------------------------------------------------------------------------------------- 06/15/2007 09:41:33 Type : Microsoft.SqlServer.Replication.ComErrorException, Microsoft.SqlServer.Replication, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 Message : The schema script 'StratisDSonetd85d6e89_1061.sch' could not be propagated to the subscriber. Source : Merge Replication Provider Help link : ErrorMessage : Unspecified error InterfaceId : 00000000-0000-0000-0000-000000000000 HelpFile : HelpContext : 0 Description : The schema script 'StratisDSonetd85d6e89_1061.sch' could not be propagated to the subscriber. ComHResult : -2147467259 ErrorCode : -2147467259 Data : System.Collections.ListDictionaryInternal TargetSite : Void Run() Stack Trace : at Microsoft.SqlServer.Replication.MergeSynchronizationAgent.Run() at Microsoft.SqlServer.Replication.MergeSynchronizationAgent.Synchronize() at SQLClientSync.SQLClientSync.Replicate() Additional Info: MachineName : REPCLIENT TimeStamp : 6/15/2007 1:41:33 PM FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=1.1.1.1, Culture=neutral, PublicKeyToken=d2ff10320a77ec18 AppDomainName : sqlclientsync.exe ThreadIdentity : WindowsIdentity : REPCLIENTAdministrator
I appears that the initial replication of the assembly was fine, when re-running the sync (no changes to the assembly), this error is generated.
I need to dynamically create a ADO.NET connection manger
so, my question is if it is safe to create it with the string that is generated (ConnectionManagerType) when creating the connection manager manually on my PC.
I understood that this string is the full qualified name of the assembly, so will it be different when I create it on another P.C or it is fixed on all P.Cs ?
I have followed the steps outlined in the knowledge base article http://support.microsoft.com/kb/913668 for effecting Xml Serialization within the SQL CLR. That is, I have
1. Prebuilt the serialization assembly X.Serializers for the types in assembly X and,
2. Registered both assemblies with SQL Server via the create assembly directive
Yet, when I attempt to create an XmlSerializer on the basis of one of the types defined in X, SQL CLR ignores the pre-built serialization assembly and attempts to dynamically create/load the assembly. Since dynamic loading is disallowed, this fails with the expected exception:
System.InvalidOperationException: Cannot load dynamically generated serialization assembly. In some hosting environments assembly load functionality is restricted, consider using pre-generated serializer. Please see inner exception for more information. ---> System.IO.FileLoadException: LoadFrom(), LoadFile(), Load(byte[]) and LoadModule() have been disabled by the host.
Where is it documented what the list of approved assemblies are for SQL 2005. Also, is there a way via T-SQL, or other means to get it programatically?
I'm building a SQL function from C++ and compile my assembly with /clrafe. After that I create the assembly with SAFE permission sets and create the function, both in SQL. But the server don't accept load or execute the function because of permission error. It says:
Code Snippet
"An error occurred in the Microsoft .NET Framework while trying to load assembly id 65561. The server may be running out of resources, or the assembly may not be trusted with PERMISSIONSET = EXTERNALACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues."
Does the terminology coince with the technology, or is it diffrent "safety" conditions we are speaking about? One for the SQL permission set, and another safety for CLR type-safe assemblies?
Anyway, after playing around a bit, and following the tricks from this thread. I managed to load and execute the function, but only in UNSAFE permission (unrestricted mode?)
---8<----
My second question is can I use unrestricted mode for assembly compiled with /clr (mixed CLR)?
I'm asking, because I have some C source code that I want to reuse, and for this I can't be type-safe and therefore need to compile only with /clr (mixed CLR).
Should I go back to the plain C API in SQL 2000 to implement such function in SQL 2005, and ignore all new things in c++/CLR/.NET?
If you have any points to C++ sample code, then please forward this to me.
I have followed the steps outlined in the knowledge base article http://support.microsoft.com/kb/913668 for effecting Xml Serialization within the SQL CLR. That is, I have
1. Prebuilt the serialization assembly X.Serializers for the types in assembly X via the SGEN tool and,
2. Registered both assemblies with SQL Server via the create assembly directive
Yet, when I attempt to create an XmlSerializer on the basis of one of the types defined in X, SQL CLR ignores the pre-built serialization assembly and attempts to dynamically create/load the assembly. Since dynamic loading is disallowed, this fails with the expected exception:
System.InvalidOperationException: Cannot load dynamically generated serialization assembly. In some hosting environments assembly load functionality is restricted, consider using pre-generated serializer. Please see inner exception for more information. ---> System.IO.FileLoadException: LoadFrom(), LoadFile(), Load(byte[]) and LoadModule() have been disabled by the host.
If I install SQL Server using a certain Windows Login, does that login assume some sort of "sa" alias? (I'm trying to explain the behaviour that when I login in to a server using the same username that I used when i installed the SQL Server instance, using trusted authentication, then use a database within which I haven't created any users, I seem to get full permissions, as if I had gone in as "sa")
In the scenario where you are installing MSDE/SQL Server at a customer site (not your own) is this true:
Assuming the customer has a (Windows) login with admin rights (or is a member of the admins group) over the PC which the server was installed on, there is no way of locking the customer out of any part of the SQL Server installation and its databases as Mixed Authentication (which you can't turn off) will always allow members of the (Windows) admins group to also be a member of the SQL Server admins group???
Hi All,We have started to get the strangest errors with our SQL Server. We useWindows and SQL Server authentication, and have done successfully forthe last year or so. However last week i had trouble connecting to theenterprise manager with my domain credentials. Users connecting to QueryAnalyser have no problems when using their SQL Server logins, the issueonly seems to arrise when a Domain account is provided forauthentication. If we reboot the server all is well for about 1 - 2hours and then we loose the Domain credentials again. Even SQL Agentfails to work when stated with the DOMAINAdministrator account!As i said this has worked for a long time, and we have not made anychanges to the Domain or installed any patches for any of the servers.The error messages normally involve something along the lines of "NoUser 'NULL' blah blah" and "No Trusted SQL Server". We also have anexcel report that is failing with the SQL Server error number 18452. Ihave looked this up on MSDN, and this seems to fall in to the samecategory as our other errors.Any Ideas?We can't reboot the server every 2 hours!*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
After installing SQL Server 2005 I found that I inadvertantly used Windows Authentication Mode and I would like to change to Mixed Mode (Windows Authentication and SQL Server Authentication) - what is the best way to do this? In Microsoft SQL Server 2000 you could simply go into Enterprise Manager, edit the SQL Server Registration Properties, edit the Properties of the SQL Server and edit the Properties of the SQL Server Agent.
Ok guys, I€™ve summarized doubts regarding SSIS as well as odd behaviour that sometimes I suffer for my lack of knowledge or for other reasons. So this way, I€™m a pain and bore individual only one time€¦
Question 1:
When you have a ForEach container, i.e using as enumeraton ADO and you are debugging and seeing how is going everything, whats tasks are executing and so on, you never knows if those that were in green (executed succesfully) now are executing again or not. Well, I€™ll try to explain better: In every iteration of the loop, tasks previously executed keep its colour (green) instead of turn into white.
Question 2:
Parameter Size property is a new property for Sql Task when you have installed sp2. Well, what is it for really? I mean I€™ve got some .dtsx with Sql Tasks and its values are simply -1
Question 3:
When you€™re debugging a dtsx you have in the bottom locals showing you variables and so on. Problems come when you have more than 40 variables€¦ is there any search tool? Ok, you can use
Question 4:
Outline for the tasks is lost all the time. What a nuisance! Concretely it happens in workstations running either sp1 or sp2. Amazingly it works fine in a server (2003). Memory is not related, I€™m afraid, in all the scenarios 2Gb.
Question 5:
Is it possible disallow math case for variables? Sometimes when you€™re using lots of variables, it€™s easy commit errors when you write code.
Question 6:
Assemblies 1.0/1.1 will be allow in VSA in a future??
Question 7:
Is it possible to change the scope for a variable in run-time? Devious question, I admit€¦
Question 8:
When you€™re writing a Script Task you can export the script into VB extension and then be imported from a project or whatever. What does make sense?
Question 9:
ScriptTask_32dcba2feae9428386d768f38922e162 (that€™s an example) is really stored anywhere? (When you save a script task inside the IDE) Root NameSpace is too symbolic??
Question 10:
I€™m developing against Windows 2003 english version. The whole Sql25k too. No spanish at all but sometimes I receive spanish messages related with SSIS. I don€™t understand how it can be. Nothing to do with for the fact I€™m using Terminal Server, I guess.