sql-server-2008-r2

Why only some users get the error: “Connection is busy with results for another command”

筅森魡賤 提交于 2019-12-03 06:54:46
I have a Delphi Application that is connected to a SQL Server db using SDAC component from DevArt, we have 200 installations of the software and only to a customer, with some users, I notice the following error: "Connection is busy with results for another command" = "La connessione è occupata dai risultati di un altro comando". SQL vers. : SQL Server 2008 R2 Express with filestream full enabled My application create both db users and SQL account logins: creating a new user, then there aren't problems changing user code in my application, it means that another db user and SQL account login is

In SQL Server 2008 R2 script data missing on Script Wizard

倾然丶 夕夏残阳落幕 提交于 2019-12-03 06:34:11
问题 In my SQL Server 2008 R2 Script Option Screen of Script Wizard under section Table/View Options Look I find Script Data row and want to turn the option to True but I fail. I don't find any script data option. Why script data option missing on my SQL Server 2008 R2? Is there any command to generate the insert data option. Why this problem arise? how to solve it? Thanks in advance 回答1: It looks like they removed it from that location. You can still do it by: Right clicking on the DB Click on

SQL Server procedure declare a list

☆樱花仙子☆ 提交于 2019-12-03 06:19:17
问题 My SQL code is fairly simple. I'm trying to select some data from a database like this: SELECT * FROM DBTable WHERE id IN (1,2,5,7,10) I want to know how to declare the list before the select (in a variable, list, array, or something) and inside the select only use the variable name, something like this: VAR myList = "(1,2,5,7,10)" SELECT * FROM DBTable WHERE id IN myList 回答1: You could declare a variable as a temporary table like this: declare @myList table (Id int) Which means you can use

SQL Server Reporting Services 2008 R2 always show for login prompt

不问归期 提交于 2019-12-03 06:10:52
Whenever I try to access SSRS 2008 R2 through a URL (i.e. after being published on the net), it always shows a login prompt when accessing the report. The problem does not appear in the development environment. How do I prevent this login prompt from showing whenever I try to access a report? For the time being, we are solving this problem by providing a username and password in <appSettings> in the web.config. Once this change is made, the login prompt does not appear. Is there a better solution to this? Am I doing this the wrong way? I am assuming the prompt is for the username / password

Find Column dependency

有些话、适合烂在心里 提交于 2019-12-03 05:58:05
How to find objects which depend on particular column of table. Ex: Table: SomeTable Cols: col1 pk, col2, col3 I want to find all the objects which are dependent on col1 (Pk) Try this query, it will get you some results that i think you are looking for. To filter, search for the value in the c1.name or c2.name column. To look for all the references to a certain column, use the c2.name for the column name and the OBJECT_NAME(k.referenced_object_id) as the table which holds the c2 column :) Good Luck! select OBJECT_NAME(k.parent_object_id) as parentTable , c1.name as parentColumn , OBJECT_NAME(k

Code First can't enable migrations

北战南征 提交于 2019-12-03 05:20:51
I'm trying to enable migrations but it's throwing an exception: Checking if the context targets an existing database... System.TypeInitializationException: The type initializer for 'System.Data.Entity.Migrations.DbMigrationsConfiguration`1' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: The 'name' attribute must be specified on the 'section' tag

SQL Server Jobs with SSIS packages - Failed to decrypt protected XML node “DTS:Password” with error 0x8009000B

无人久伴 提交于 2019-12-03 04:24:16
i have a SQL server job that runs a SSIS package. This job has 9 steps and in each step it extracts data from a different database. the connections strings are defined as parameters in each step. im getting the following error when i run the job. Executed as user: USER\MYSERVER$. Microsoft (R) SQL Server Execute Package Utility Version 10.50.1600.1 for 64-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 5:50:55 PM Error: 2013-06-21 17:50:55.44 Code: 0xC0016016 Source: Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not

SQL Server GROUP BY COUNT Consecutive Rows Only

人盡茶涼 提交于 2019-12-03 03:24:59
I have a table called DATA on Microsoft SQL Server 2008 R2 with three non-nullable integer fields: ID, Sequence, and Value. Sequence values with the same ID will be consecutive, but can start with any value. I need a query that will return a count of consecutive rows with the same ID and Value. For example, let's say I have the following data: ID Sequence Value -- -------- ----- 1 1 1 5 1 100 5 2 200 5 3 200 5 4 100 10 10 10 I want the following result: ID Start Value Count -- ----- ----- ----- 1 1 1 1 5 1 100 1 5 2 200 2 5 4 100 1 10 10 10 1 I tried SELECT ID, MIN([Sequence]) AS Start, Value,

Does SQL Server CACHES Query Results? [duplicate]

安稳与你 提交于 2019-12-03 02:55:25
This question already has answers here : SQL Server cache question (5 answers) When I run a query does the SQL Server caches the results? Because : When I run the below query: SELECT id FROM Foo WHERE Foo.Name LIKE '%bar%' The query runs for 40 seconds on the 1st time . But on the second run it takes only a few seconds . Is this because the execution plan is somehow cached or actually the data is cached so that I can retrieve it much faster on the 2nd run? SQL Server does not cache the query results, but it caches the data pages it reads in memory. The data from these pages is then used to

SQL Server: Could not find type in the assembly

孤人 提交于 2019-12-03 02:37:02
问题 Assume the assembly dll: using Microsoft.SqlServer.Server; using System.Data.SqlClient; using System.Data.SqlTypes; using System; using System.Text; namespace CLRFunctions { public class T { [SqlFunction(DataAccess = DataAccessKind.Read)] public static String NormalizeString(String s, String normalizationForm) { NormalizationForm form = NormalizationForm.FormC; if (String.Equals(f, "FormD", StringComparison.OrdinalIgnoreCase)) form = NormalizationForm.FormD; return = s.Normalize(form); } } }