Are there any additional documents or utilities that people would suggest for monitoring and managing CLR impact on SQL server resources and performance?
I have a SQL Server project in Visual Studio 2005 which deploys an assembly to SQL Server 2005 containing various stored procedures user defined functions. Is there any way to tell Visual Studio to drop/create the stored procedures in a schema other than dbo?
ie: User.ChangePassword instead of dbo.ChangePassword.
Hi there, Values in my database need to updated periodically. The code, upon starting the application, queries the database and stores the values in the Application collection. This is to avoid making a database call everytime the values are needed (increases performance). The drawback is that changes to the database values are not updated in the code. How can I create a database trigger that will update the C# Application colllection whenever a table value is updated?
Our current service throws on-demand .DTSX and now we'd like that will throw old ETL 2000 too.
I'd like to know if success or not success when calling dtspkg.dll from my managed code (vb). Is it possible or not? I only capture errors for the sake of TRY..END TRY but I don't know how the hell to know if the dts execution was successful. Execute method not returns anything.
I am trying to debug sql2000 sp from managed code app with VS.Net 2003 archetect Ed.. It did not stop at the break point within the sql sp. I did granted execute permission for sp_sdidebug. Do I need to attach any process?
Is there anything left off by the article? I referenced msdn article option 2: http://support.microsoft.com/default.aspx?kbid=316549
Code creates the Temp table but when it comes to insert statement, it throws error saying "Temp table not found". Reason can be Create and Insert statement gets executed as 2 different sessions. How to get the above requirement work fine? Thank you. HV
The result is that I am able to parameterize the sql end execute with the right result. The only problem is that the value is not stored in the variable @count. I could get to the same result using managed code in sql 2005 but still I am curious to find out where the problem is ....
All -- Please help. I am using managed code in SQL Server 2005 and have a question about stored procedure name qualification. With a VS.NET 2005 Pro Database project, when I use >Build, >DeploySolution, it works great but my stored procedures are named with qualification using my domainusername.ProcName convention, something like this... XYZ_TECHKamoskiM.GetData ...when I want them to be named with the dbo.ProcName convention, something like this... dbo.GetData ...and I cannot see where this can be changed. Do you happen to know? Please advise. (BTW, I have tried going to this setting >Project, >Properties, >Database, >AssemblyOwner, and putting in the value "dbo" but that does not do what I want.) (BTW, as a workaround, I have simply scripted the procedures, so that I can drop them and then add them back with the right names-- but, that is a bit tedious and wasted effort, IMHO.) Thank you. -- Mark Kamoski
1) first i installed Sql Server 2005 Enterprise Edition, everything was working fine except i was not able to create managed objects from BI, like stored procedures, triggers, UDT, etc etc.
2) so i installed VS.net 2005 complete + Sql Server 2005 Express Edition
now i was able to create stored procedures, triggers, etc etc, i'm talking about the CLR objects, ok, i.e. the managed code, but........ i was only able to do this from Sql Server 2005 Express Edition.
whenever i try to create managed objects CLR like stored procedures and stuff from the Sql Server 2005 Enterprise edition it gives me the following error :
"The Sql Server supplied by these connection properties, does not support managed code, please choose a different server"
please help meeeee.. please please, tell me what's the problem ?
I am very new to the subject of writing CLR code inside SQL Server, so I apologise if my questions seem naive.
I have a requirement to populate an asp.net 2.0 GridView control with data columns, some of which are directly from a SQL Server 2005 database, but some of which are calculated by calling CLR methods passing the values from the database columns to those methods.
However, the methods I need to call only make sense in the process context of the client web site which is calling the stored procedure which I want to write to return the data columns.
In effect, I want to be able to make a remote procedure call from within the SQL Server CLR code to the methods available in the client process.
Is this possible? If so, could someone please refer me to an example of how to do it.
If it can be done, it opens up lots of very cool possibilities!
I am trying to understand creating SQL Server projects and managed code. So I created a C# SQL Server Database project and named it "CSharpSqlServerProject1" and followed the steps in the following "How to: " from the Help files:
"How to: Create and Run a CLR SQL Server Stored Procedure "
I used the exact code in this "How to: " for creating a SQL Server managed code stored procedure (see below) in C#. However it didn't even compile! When I went to build the code I got the following error message:
"Error 1 Target string size is too small to represent the XML instance CSharpSqlServerProject1"
It does not give a line number or any further information! Since this is a Microsoft example I'm following I figure others must have run into this too. I can't figure out how to fix it!
Here's the code as copied directly from the howto:
using System.Data.SqlClient; using System.Data.SqlTypes; using Microsoft.SqlServer.Server;
public partial class StoredProcedures { [SqlProcedure()] public static void InsertCurrency_CS( SqlString currencyCode, SqlString name) { using (SqlConnection conn = new SqlConnection("context connection=true")) { SqlCommand InsertCurrencyCommand = new SqlCommand();
Hello people :-)I'm doing some development work with Visual Studio 2005 and SQLServer 2000. My SQL DB is running on a Windows 2000 Server box in the office, and I'm doing the development on my XPPro workstation. Now I've been trying to connect to the Win2000 box though VS and although I can see the server and the DB when I hit ok I get this error"The SQL server specified by these connection propertise does not support managed objects"What the heck does that mean?any help would be great :-)
In VS 2003 I used SQLDMO (Com Object) to list all available SQL Servers. Is in SQL Server 2005 a managed .net Component that can do that task?Thanks,Rainer.
Can anyone explain why when I look at table using enterprise manager, highlight a table, all tasks, maanage indexes why only 1 index appears and when I look at the same table in sysindexes is says that there are 8 indexes. This is the sql code I executed: select object_name(id), indid from sysindexes where object_name(id) = 'tbh_matter_summ'
Is it possible that there is a problem with the database?
I have an MDS entity which will be managed in excel. I do not want the user to enter the Code and Name so I have configured code to auto generate and name to default to another attribute value. I have then hidden code and name in excel.
When I use excel and enter the attribute and publish, the name column is blank in the MDS table.Am I missing something here with the defaulting?The Action is defined as 'Name Defaults to Country'. Where Country is the attribute I am populating.
I spent the last days programming a managed datamining plugin-algorithmn for SSAS 2005 and have troubles with the Prediction-Method.
Die Prediction-Methode of the "Shell-Algorithm" leads to an error-message on execution of the prediction-query (Internal Error: Unexprected Error ... dmxpredict.cpp Row 205 ...).
Can anyone provide me with a very simple implementation of this Method which just says that for every output-attribute the first (discrete) state should be predicted with a probability of, let's say, 90 % ?
SQL Server 2005 gives you a possibility to create managed triggers. In a managed trigger I can create a new thread and process trigger event in various ways. My question is that are there any reasons why I should NOT start new threads in database triggers? The following code shows how I could create new threads. Do you see that this could cause any errors or problems in SQL Server functionality? My goal is to minimize the trigger effects in a database overall performance.
'This handles database updates of AdventureWorks Person.Contact table. <Microsoft.SqlServer.Server.SqlTrigger(Name:="UpdateContact_Trigger", Target:="Person.Contact", Event:="FOR UPDATE")> _ Public Shared Sub UpdateContact_Trigger() 'Notify: SqlContext.Pipe.Send("Trigger FIRED")
Dim triggContext As SqlTriggerContext = SqlContext.TriggerContext() 'Ensure that it was update: If triggContext.TriggerAction = TriggerAction.Update Then
'Open a connection: Using conn As New SqlConnection("context connection=true") conn.Open() 'Fetch some information about the update: Using sqlComm As New SqlCommand sqlComm.Connection = conn sqlComm.CommandText = "SELECT ContactID, FirstName, LastName from INSERTED" Using rdr As SqlDataReader = sqlComm.ExecuteReader If rdr.Read Then 'Process the data in a separate thread. The thread could send a message to MSMQ about the change 'or process if differently. The purpose of using separate thread is avoid performance hit 'in the application / database operation. Dim oData As New TriggerData("update", rdr.GetInt32(0).ToString, "contact") Dim trd As New Threading.Thread(New Threading.ThreadStart(AddressOf oData.ProcessEvent)) trd.IsBackground = True trd.Start() End If End Using End Using End Using End If End Sub
Hello. I have received the follwoing error upon an attempt to Browse the Cube. All other tabs are functional, including the Calculations tab. We are running Windows Server 2003 SP2 and SQL Server 2005 SP2. Any suggestions would be greatly appreciated!
**EDIT** - Have confirmed SP1 for VS2005 is installed both locally and on server, also.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (Microsoft Visual Studio)
------------------------------ Program Location:
at Microsoft.Office.Interop.Owc11.PivotView.get_FieldSets() at Microsoft.AnalysisServices.Controls.PivotTableFontAdjustor.TransformFonts(Font font) at Microsoft.AnalysisServices.Browse.CubeBrowser.UpdatePivotTable(Boolean translate) at Microsoft.AnalysisServices.Browse.CubeBrowser.UpdateAll(Boolean translate) at Microsoft.AnalysisServices.Browse.CubeBrowser.InitialUpdate() at Microsoft.AnalysisServices.Browse.CubeBrowser.SupportFunctionWhichCanFail(FunctionWhichCanFail function)
I've been researching AWE to determine if we should enable this for our environment.
Currently we have a quad core box with 4 gb of RAM (VMware). OS: Windows 2003 std, SQL Server 2005 std. 3GB is not set but will be as soon as we can perform maintenance on the server.
I have read mixed feedback on AWE, either it works great or grinds you to a hault. I would assume that the grinding to a hault is due to not setting the min/max values correctly or not enabling the lock page in memory setting.
We only have one instance of SQL on the server and this box won't be used for anything else aside from hosting SQL services. We do plan on running SSRS off of this server as well.
1. Will running SSRS and enabling AWE cause me problems? Will I have to reduce the max setting by the SSRS memory usage or will it share and play nice?
2. How do I go about setting the Max value? Should it be less than the physical RAM in the box? Right now its set to the default of 214748364, even if I don't enable AWE should this default value be changed?
3. It seems that even at idle the SQL server holds a lot of memory and the page file grows. If I restart the process in the morning, memory usage in taskmon is at 600mb or so. By the end of the day, its up around 2gb. How can I track down whats causing this, should this even concern me?
4. The lock Page in memory setting worries me. Everything I've read on this seems to give a warning about serious OS and other program support degradation. In some cases to the point where they have to restore the settings on the server before they can bring it back up. What are your thoughts on this.
I have created a managed stored procdure in a sql server project in VS. I have put in the corect server name password and login fro the connection to the database. When I deploy however it doesn't deploy the stored proccdure to the database even though it says it has successfully deployed the stored procedure. Has anyone had this problem and how can you make sure it is deploying to the correct database.
This seems like a simple question but I still haven't been able to get an answer from Microsoft Canada. We're looking at buying 75 device cals to connect to a single instance of SQL Server Standard Edition. Our question is on how those licenses are assigned and/or activated.
Do we need to manually do something for each station or is it an automated process done the first time a station connects to the server? We also wat to understand what happens when a workstation dies and is replaced by another one. Do you have to do something on the server to transfer the license to the new station ?
In other words, when using device cals (and/or user cals), do you have to do any type of license management or is it all transparent ?
I am stepping into the world of developing SSIS packages as part of a project I am working on, and I am kicking the tires at the moment, and I am having a couple of problems.
First, is there a really good source of 'how-to's in terms of developing against SSIS. There is plenty of documentation on MSDN/Technet, but there are NO books which cover managed DTS in ANY kind of depth.
Secondly, I am looking at bringing in an XML file programatcially, and linking in the columns I need. Works fine using the BI tools, but I get an error when I do it from visual studio.
The following code :
Code Block IDTSComponentMetaData90 xmlinputfile; Package package = CreatePackage("SSISPackage", "Test Package"); MainPipe pipe = AddDataFlowTask(package); pipelineEvents = new ComponentEvents(); xmlinputfile = pipe.ComponentMetaDataCollection.New(); // configure it up... xmlinputfile.ComponentClassID = "Microsoft.SqlServer.Dts.Pipeline.XmlSourceAdapter, Microsoft.SqlServer.XmlSrc, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"; xmlinputfile.Name = "XML Source"; xmlinputfile.Description = "Source data in the data flow..."; CManagedComponentWrapper instance = xmlinputfile.Instantiate(); instance.ProvideComponentProperties(); // At this point you would normally associate with the runtime connection manager, // but as it is an xml file, we do not need to do that // We need to set the appropriate properties to look at our xml file... instance.SetComponentProperty("XMLData", @"C:filechangedtoprotecttheinnocent.xml"); instance.SetComponentProperty("XMLSchemaDefinition", @"C:filechangedtoprotecttheinnocent.xsd"); instance.SetComponentProperty("AccessMode", 0); instance.SetComponentProperty("UseInlineSchema", false); // We need to set output connections.... instance.AcquireConnections(null); instance.ReinitializeMetaData(); instance.ReleaseConnections();
IDTSVirtualInput90 vInput = xmlinputfile.InputCollection[0].GetVirtualInput(); // Iterate through the virtual input column collection. foreach (IDTSVirtualInputColumn90 vColumn in vInput.VirtualInputColumnCollection) {
}
When I go anywhere near the InputCollection[0], watch throws an exception, and the call to GetVirutalInput() throws the same exception which is :
System.Runtime.InteropServices.COMException was unhandled by user code Message="Exception from HRESULT: 0xC0048004" Source="Microsoft.SqlServer.DTSPipelineWrap" ErrorCode=-1073446908 StackTrace: at Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSInputCollection90.get_Item(Object Index) at IntegrationServicesScratchPad._Default.btnExecute_Click(Object sender, EventArgs e) in C:Documents and SettingsjMy DocumentsVisual Studio 2005ProjectsIntegrationServicesScratchPadIntegrationServicesScratchPadDefault.aspx.cs:line 75 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Does anyone have any kind of clue as to what is going on. I have seen comments on here from other people in regards to errors with input columns?? The XML files work fine in the editor as I said, and the XSD was generated by the editor using the Generate XSD option.
I have a Windows sever 2012 with sql server 2012 enterprise. Ram size is 22GB. Sometimes SQL sever takes 95% memory.My question, How to reduce memory size without killing any process because it's production server.So there are many background process is running. And,Is there any guides to learn why Memory is raise d so high and how to reduce it.
When I try to deploy this managed stored proc assembly on SQL Server 2005 I get this error: Failed to initialize the Common Language Runtime (CLR) v2.0.50727 with HRESULT 0x8007000e. You may fix the problem and try again later I looked on the net but found no documentation about it. I know the CLR v2.0 is working as I have some ASP.NET apps running from this server that use it. Any ideas?
In a previous post in Installation and Setup I was having problems just getting an ASP.NET 2.0 app to run on my web server. Now I'm having some different weird security issues. I'm getting this message when just trying to open a database and put its contents into a gridview. Access to the ADO.net Managed Provider 'SqlClientFactory' was denied in the data source with ID 'sqlEmployees' because of security settings. I think this may have to do with our web server and our SQL server being separate machines. That always gives us issues. But I have impersonation=true in my web.config along with windows authentication and I have SQL Server configured with Windows and SQL authentication so things should be right, I'm thinking. Any ideas??
I am developing a managed stored procedure in VS.NET 2005 and I am trying to add a reference to an user developed assembly (not a system one) but adding a reference to it is not possible as it doesnt let me import assemblies but rather reference the few limited ones in a list. Why is this??