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"
please help newbieI need to create a lot of objects the same type (let's say: schemas)I wish to use paramerized block in loop to do so.- how to put names of my objects to such control-flow?belss you for help
passing serialised objects to a stored procedure for the purpose of data inserts. I see this as being a way to handle multiple row inserts efficiently.
However, in my limited use of XML data I am not so sure how to link the data when I have a dependency on another "object" within the serialised XML.
Below is a code snippet showing what I have so far.
The first insert statement works fine - but how to retrieve the identifier created by the DB - I want to use an SQL statement that finds the record in the table based on the XML representation (of the PluginInfo), allowing me to insert the ConfigurationInfo with the correct reference to the PluginInfo
DECLARE @Config NVARCHAR(MAX) DECLARE @Handle AS INT DECLARE @TransactionCount AS INT SELECT @Config = ' <ConfigurationDirectory > <ConfigurationInfo groupKey="Notifications" sectionKey="App.Customization.PluginInfo"
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.
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
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?
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.
Are there any additional documents or utilities that people would suggest for monitoring and managing CLR impact on SQL server resources and performance?
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.
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??
I have written a stored procedure using C#.NET. I deployed it to SQL Server, and everything works fine.
However, an Third-Party app needs to see what parameters it can use for this SP by executing sp_sproc_columns <SP name>
sp_sproc_columns
Seems to work on normal SP's written in T-SQL, but not on Managed SP's. On my SP, sp_sproc_columns does not seem to work. It does not return the parameters. On normal SP's, it does.
I€™ve been working on getting a linked server through SQL 2005 to work with VFP 9. I get access denied for any and all security set ups on the linked server. I€™ve checked the folder-level security settings and see that the user I€™m logged in as, and have tried through security settings, and they seem to have access. What other security settings should I be checking?
I tried asking the same question in other forum but couldn't get an answer.
I used exactly the following SQL to create a login with sa account in SQL2k5 Management Studio: Create Login yy With Password='yy123Z'
Without granting any permission, straight away, i log out sa and login as yy in management studio, yy somehow can access one of my ApplicationDatabase! So i check with the following SQL in my ApplicationDatabase: IS_MEMBER('db_owner') and it returns me 1, meaning yy is db_owner. I then quickly login as sa and double check on the security|login|yy|properties|User Mapping, NONE of the database is mapped! and i also ensure "Guest account enabled for: ApplicationDatabase" is unchecked.
What could be the problem i am facing? the purpose i create yy is to ONLY allow it to have connect permission on my SQL Endpoint. Please HELP!!
I'm attempting to write an aggregate function in C++ to compare performance with the equivalent function in C#.
However, I'm having problems getting SQL Server to see the function in the assembly. It allows me to load the assembly into the database, but I can't see the type in it.
Here's my code:
// CPPTest.h
#pragma once
using namespace System; using namespace Microsoft::SqlServer::Server; using namespace System::Data::SqlTypes; using namespace System::Data::SqlClient;
Compile it with /clr:safe option and it can be loaded as an assembly into SQL Server 2005 (9.0.1399), but the AGG_CPP_OR type is not seen as an aggregate function. I've also tried implementing IBinarySerialize and setting Format to Format::UserDefined (and putting in MaxByteSize) but it makes no difference.
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 need to archive files in a database by checking an archive date for the file contained in a field in a table of a database, if the archive date is greater than todays date then archive the file by moving it to an archive folder. I am thinking the best way might be to use a manged stored procedure, but I also need to run this procedure once every 24 hours at about midnight so how would I do thi? Another way might be by using DTS or something. Has someone else done this and how did they go about it?
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
After I've written my first Plugin-Algorithmn, I have some general questions about the Managed Plugin-Algorithmn wrapper.
What does the Property "support" express in view of predictions? Is it the overall number of cases the found rule works for?
What's the difference between AdjustedProbability and Probability ?
There is a probability for a specific StateStatistic and one for the whole AttributeStatistic. What does the latter one express? Perhaps the overall probability that the discovered rules will lead to correct results for this attribute ? Let's say I have two rules for an attribute. Rule A has a probability of 0.5 and Rule B has a probability of 0.66. What would be AdjustedProbability.Probability in the case? The mean of 0.5 and 0.66 ?
CALL System.Microsoft.AnalysisServices.System.DataMining.Clustering.GetClusterDiscrimination('Page Aggregate By Month2','001','010',0.0005,true)
Internal error: An unexpected exception occured. Execution of the managed stored procedure GetClusterDiscrimination failed with the following error: Exception has been thrown by the target of an invocation.Object reference not set to an instance of an object..