sql-server-2005

Asp.net sql server 2005 timeout issue

HI We am getting time outs in our asp.net application. We are using sql server 2005 as the DB. The queries run very fast in the query analyser . However when we check the time through the profiler it shows a time that is many times more than what we get in query analyser. (paramter sinffing is not the cause) Any help is much appreciated ...

Is it safe to remove the SQL Server 2005 Express installed by Visual Studio 2008 when SQL Server 2008 is installed?

Or will everything explode and kill a couple of kittens? ...

SQL2005 + return distinct result based on datetime on table in inner join

Im having a moment, what i want to do is really simple and i think im just looking at the wrong solution. I want to simply return a table that is sorted based on a datestamp of a related table. ie: Table 1: 200 MyStuff OK 201 Other Why 202 Flat So Table 2: 1 200 5/12/2009 MyValue1 2 200 5/11/2009 MyValue2 3 20...

SQL server 2005 agent not working

Sql server 2005 service pack 2 version: 9.00.3042.00 All maintenance plans fail with the same error. The details of the error are:- Execute Maintenance Plan Execute maintenance plan. test7 (Error) Messages Execution failed. See the maintenance plan and SQL Server Agent job history logs for details. The advanced information sect...

Maximum number of connection to SQL Server database

What is the maximum number of connections to SQL Server 2005 for one user? I'm having a problem with C# code trying to make multiple connection to the database in different threads. After about five threads the connections in other threads start timing out. If i knew the exact number of connection for one user, even if it was one, wou...

Why is inserting into and joining #temp tables faster??

I have a query that looks like SELECT P.Column1, P.Column2, P.Column3, ... ( SELECT A.ColumnX, A.ColumnY, ... FROM dbo.TableReturningFunc1(@StaticParam1, @StaticParam2) AS A WHERE A.Key = P.Key FOR XML AUTO, TYPE ), ( SELECT B.ColumnX, B.ColumnY, ... FROM ...

Full Text Search for Multiple tables in SQl Server 2005

Hey friends I need to implement Full text search across tables. what are the different options. ...

Installing SQL 2005 Management Studio (Not express edition)

I have the SQL Server 2005 Developer Edition DVD. I have been trying to install SQL 2005 Management Studio for a couple hours, but it isn't working. Are there any known bugs on this issue? ...

Overhead with Microsoft JDBC driver when executing a stored procedure

I am using Microsoft JDBC Driver 2.0 with SQL Server 2005. To explain my question better, let me start with a sample code to call a stored procedure. public static void executeSproc(Connection con) { CallableStatement cstmt = con.prepareCall("{call dbo.getEmployeeManagers(?)}"); cstmt.setInt(1, 50); ResultSet rs = cstmt.executeQ...

SQL 2005 cannot delete user

Hey all, I have restored a database from a backup onto a new server, and I cannot delete the old schema from the database. I have created a NEW user for this database. The NEW user is named differently (to make things clearer for other developers), so I have no use for this schema. I DID manage to delete the USER finally, but the sche...

SQL Server Replication - Adding a new stored procedure - How to get it to replicate?

I have a SQL Server 2005 Database which uses merge replication. I have added four new stored procedures on the publisher end, but they haven't replicated. The publication property "Subscription Options" - "Replicate schema changes" is set to True. How can I get easily get these tables replicated without having to send new snapshots to...

Text search in Stored Procedures in SQL Server 2005

How do I find a stored procedure containing a certain text? While I understand that the best place to do this kind of searching is through your source control tool, but are there ways to do this in the database? ...

SQL 2005 - Compress rows with nulls and duplicates into single rows

I'm not sure exactly how to describe what I want to do, so I'll use a contrived example On SQL Server 2005, Say I have a view with rows like this, call it vwGrades: ID AssnDate AssnTxt Sally Ted Bob ----------- ----------------------- ------------- ----------- ----------- ----------- 2999 ...

Database Replication or Mirroring?

What is the difference between Replication and Mirroring in SQL server 2005? ...

ùser mapping query

Hi, I want to know how to get user mapping details in sql server 2005,whether the login user has the permission on the database or not. ...

Use bcp to import csv file to sql 2005 or 2008

I have a csv file and i need to import it to a table in sql 2005 or 2008. The column names and count in the csv are different from the table column names and count. The csv is splitted by a ';' . Example CSV FILEcontents: FirstName;LastName;Country;Age Roger;Mouthout;Belgium;55 SQL Person Table Columns: FName,LName,Country ...

when insert length of lob data to be replicated exceeds configured maximum 65536

Hi, I am trying to insert value for the column of datatype image in sql server. I am getting the following error {"Length of LOB data (70823) to be replicated exceeds configured maximum 65536. The statement has been terminated."} . The data length is less than 2 MB. What is the problem? Thanks, P.Gopalakrishnan. ...

Programmatically determine available free space on a database?

Ok, I have tried searching around for this answer, but with no luck. I have about 50 databases on our SQL Server at work that I have to check almost every day to see if any space can be freed up via shrinking. Our drives tend to fill up a lot, so this is why it is an almost daily task. Is there a quick way to check what databases ac...

How can I select only common properties from a results set?

Lets say I have a table with columns such as: ID Name City State ZIP I need to write a query that will return only one row. This row will include City, State, and ZIP, but I only want a field to have a value if all values in the results set are the same, otherwise I want the field to be null. For example, if every record has the sam...

Is it possible to restrict the number of connections for a role/login in SQL Server 2005?

e.g. Make it so that you could limit it to a max 2 connections for a given technical account, the third connection being blocked repeatedly until one of the others is given up ...