sql-server

Unable to connect to SQL Server session database

My asp.net applications works fine everyday. Until last month, my web start to get 2-3 time of problem with Sqlsession state server as follow: Blockquote System.Web.HttpException Exception of type 'System.Web.HttpException' was thrown. at System.Web.HttpAsyncResult.End() at System.Web.SessionState.SessionStateModule.EndAc...

Proper chart scaling in Reporting Services 2005

I'm developing a simple bar-chart in Reporting Services 2005 with a stored procedure as data-source. The values in this graph can be both positive and negative, and can span a very big range, and hence I cannot specify any non-dynamic scale that will work for all scenarios. The problem I'm facing is that the automatic scaling pretty muc...

SSIS, dtsx and deployment packages

Hi I'm just trying to understand SSIS packages a bit better and how they are deployed. Correct me I'm wrong but for any deployment, I believe there needs to be at least two files a .SSISDeploymentManifest and a .dtsx. The .SSISDeploymentManifest acts as the equivalent windows installer package which points to the .dtsx. The dtsx is the...

How to find WITH RECOMPILE metadata in SQL Server (2005)?

How do you find which SPs are declared WITH RECOMPILE, either in INFORMATION_SCHEMA, sys.objects or some other metadata? (I'm adding some code to my system health monitoring and want to warn on ones which are declared that way where it is not justifiable.) Note: I'm not looking for general text search for 'WITH RECOMPILE' - I can alrea...

Raise Event from store procedure to Windows Service

Hi Is it possible to trigger an action in Windows Service, or is it possible to raise an event that can be caught in a Service from a stored procedure. If you imagine a service runs every 5 minutes thats performs some action. What if something happens in a database or a stored procedure is executed and I want to trigger this action ear...

SQL INSERT, Force Truncate Field

I have input data containing some "rogue" fields that are longer than the corresponding database field. This causes my import script, which uses SQL INSERT statements to fall over with a warning: Msg 8152, Level 16, State 13, Line 2 String or binary data would be truncated. How can I force truncation of these fields and enable my scri...

SQL Server 2k5 - Backup Of Database Without Log File(s)

Log files are often large an unwieldy. Is there a way to "backup" a SQL Server database without any log files (or with empty log files)? ...

Inherited SQL Server Database Problem

I've inherited a SQL Server Database that for some odd reason the developers didn't use Identity to auto increment the primary key. (maybe it was once an Oracle one, who knows). Now,... since the database is accessed from countless clients, I presume that the "next ID" must be stored in the DB somewhere so that they don't conflict with ...

How do I find a value anywhere in a SQL Server Database?

Given a #, how do I discover in what table and column it could be found within? I don't care if it's fast, it just needs to work. ...

Document Management

I'm writing a simple document management system for my work. I'm only a hobbyist but have been programming for a while now. My problem is this. When I delete a number of documents through my app, I then need to remove the related database records. What's the best way to go about this without ending up with files with no database records,...

Formula parsing / evaluation routine or library with generic DLookup functionality

I am writing a .Net application where I must support user-defined formulas that can perform basic mathematics, as well as accessing data from any arbitrary table in the database. I have the math part working, using JScript Eval(). What I haven't decided on is what a nice way is to do the generic table lookups. For example, I may have a...

What does "Polling caught an exception, restarting polling." error mean?

We recently discovered the below error in our log which happened before our Reporting Services going down. Our servers have been very slow lately and wondering if this could be part of the problem. Error Message: "Polling caught an exception, restarting polling. Error Message System.Data.SqlClient.SqlException: Timeout expired." ...

What is NV32ts and its SQL Injection Attack trying to do?

I have been getting a number of attacks on my website lately, with a User-Agent of NV32ts. They all are some variation of the following injection attacks against a querystring variable (where 99999 represents a valid querystring value, the attack is appended to the value): (For convenience I have urldecoded the following attacks) 9999...

SQL Server 2000 - What really is the "Actual Number of Rows" ?

Hello, I have an SQL Server 2000 query which performs an clustered index scan and displays a very high number of rows. For a table where I have 260.000 records, the actual number of rows displayed in the plan execution is ... 34.000.000. Does this makes sense? What am I misunderstanding? Thanks. ...

Object browser in SSMS 2008 doesn't work if I don't have access to all databases.

In SQL Server Management Studio 2008, if I log into a shared hosting provider with many databases on one server, I cannot use the Object Explorer. This worked fine in 2005. Anyway to change this behavior? It throws this exception: The server principal "myusername" is not able to access the database "first-database-alphabetically-on-sh...

Help with TSQL - a way to get the value in the Nth column of a row?

I hope to find a way to get the value in the Nth column of a dataset. Thus, for N = 6 I want SELECT (Column6Value) from MyTable where MyTable.RowID = 14 Is there a way to do this in TSQL as implemented in SQL Server 2005? Thanks. ...

SQL Server Index Dependency

I'm considering dropping an index from a table in a SQL Server 2005 instance. Is there a way that I can see which stored procedures might have statements that are dependent on that index? ...

sp_helptext permission

Hi, I need to give sp help text permission to the developers so that they can check the store procedures. Can somebody please, let me know how can i do it. Thanks, Christine ...

Transposing a table with SQL

Hi there, I have a SQL table like so PV Area CouterParty 851 M010 Name1 561 M011 Name2 869 M012 Name3 ... And I need to transpost it, using T-SQL (not reporting services or anything else), so that it looks like this: CounterParty M010 M011 M012 .... Name1 851 Name2 561 Name...

Index a sum column

Is creating an index for a column that is being summed is faster than no index? ...