sql-server-2005

SQL Server 2005 vs. ASP.net datetime format confusion

Hi, I've found a similar question on stack overflow, but it didn't really answer the question I have. I need to make sure that my asp.net application is formatting the date dd/mm/yyyy the same as my SQL Server 2005. How do I verify the date culture (if that's what it's called) of the server matches how I've programmed my app? Are there...

How can I do the equivalent of "SHOW TABLES" in T-SQL?

I would like to do a lookup of tables in my SQL Server 2005 Express database based on table name. In MySQL I would use 'SHOW TABLES LIKE "Datasheet%"', but in T-SQL this throws an error (it tries to look for a SHOW stored procedure and fails). Is this possible, and if so, how? ...

Displaying Tiff files in SSRS reports.

I have a requirement to be be able to embed scanned tiff images into some SSRS reports. When I design a report in VS2005 and add an image control the tiff image displays perfectly however when I build it. I get the warning : Warning 2 [rsInvalidMIMEType] The value of the MIMEType property for the image ‘image1’ is “image/tiff”, which i...

How to change slow parametrized inserts into fast bulk copy (even from memory)

I had someting like this in my code (.Net 2.0, MS SQL) SqlConnection connection = new SqlConnection(@"Data Source=localhost;Initial Catalog=DataBase;Integrated Security=True"); connection.Open(); SqlCommand cmdInsert = connection.CreateCommand(); SqlTransaction sqlTran = connection.BeginTransaction(); cmdInsert.Transaction = sq...

How can I schedule a job in Sql Agent (Sql Server 2005) via C# code?

Hi I'd like to schedule an existing job in the Sql Server 2005 agent via C# code... i.e. when someone clicks a button on an asp.net web page. How can I do this? Thanks! ...

SQL Server Provisioning Tool

Running under Server 2008, SQL Server 2005 SP2 has the option to "Add New Administrator" from the SQL Server 2005 Surface Ara Configuration. This launches the SQL Server 2005 User Provisioning Tool for Vista. You are then able to grant privileges such as Server SysAdmin role etc. When I do this the privileges are copied across and appea...

Why should I upgrade from SQL2000 to SQL2005?

I'm looking for the single biggest reason you are glad that you've already made the jump from SQL2000 to SQL2005. ...

SQL Server Temp Tables and Connection Pooling

I have a multi-user ASP.NET app running against SQL Server and want to have StoredProcA create a #temptable temp table - not a table variable - to insert some data, then branch to StoredProcB, StoredProcC, and StoredProcD to manipulate the data in #temptable per business rules. The web app uses connection pooling when talking to SQL. ...

Wrap a SQL Reporting Matrix

I have a matrix in SQL reporting and I would like it to print on an A4 page. If the matrix has less than 4 columns then it fits but for more than 4 columns I would like the matrix to wrap and show only 4 columns per page. Is this possible? I am using SQL Reporting 2005 in localmode. ...

What are the consequences of not closing database connection after an error?

I have an application that is causing a lot of headaches. It's a .NET app connecting to SQL Server 2005 via a web service. The program has grid that is filled by a long running stored procedure that is prone to timing out. In the case when it does time out and a SqlException is thrown, there is no execption handling to close the connecti...

How to store directory / hierarchy / tree structure in the database?

How do i store a directory / hierarchy / tree structure in the database? Namely MSSQL Server. @olavk: Doesn't look like you've seen my own answer. The way i use is way better than recursive queries :) p.p.s. This is the way to go! ...

Any reason to have SQL Server 2005 and 2008 installed on same machine?

I'm setting up a new development server and want to install the latest version of SQL Server 2008 Express. Will our existing sql2005 databases work with 2008 without modification? If so is there any reason to install both versions on the same server? ...

Can SQLExpress 2005 and 2008 be installed on same machine without issue?

I would like to install SQLExpress2005 as an instance "SQLExpress" and install SQLExpresss2008 as "SQLExpress2008" instance. Is there any problem with doing this on the same machine? ...

Find out the calling stored procedure in SQL Server

Is it possible to find out who called a store procedure. So if you get an error in proc3, I know if it was called by proc1 or proc2. I'm using SQL Server 2005. ...

LOAD SQL Table from flat file

I am am trying to load a SQL table from a flat file. The flat i am talking about is a comma separated file. This has all the data required to populate a table will each column separated by a comma ",". I need some way by which i can load this content into the table faster. ...

How can one iterate over stored procedure results from within another stored procedure....without cursors?

I'm not sure if this is something I should do in T-SQL or not, and I'm pretty sure using the word 'iterate' was wrong in this context, since you should never iterate anything in sql. It should be a set based operation, correct? Anyway, here's the scenario: I have a stored proc that returns many uniqueidentifiers (single column results)....

How do you copy a record in a SQL table but swap out the unique id of the new row?

This question comes close to what I need, but my scenario is slightly different. The source table and destination table are the same and the primary key is a uniqueidentifier (guid). When I try this: insert into MyTable select * from MyTable where uniqueId = @Id; I obviously get a primary key constraint violation, since I'm attemp...

How to transfer sql encrypted data between SQL Server 2005 databases?

I have an existing SQL Server 2005 database that contains data encrypted using a Symmetric key. The symmetric key is opened using a password. I am working on an upgrade to the front end applications that use this database, which include adding dozens of new tables, stored procedures, UDFs, etc. and dozens of modifications to existing ta...

Executing dynamic SQL in a SQLServer 2005 function

I will preface this question by saying, I do not think it is solvable. I also have a workaround, I can create a stored procedure with an OUTPUT to accomplish this, it is just easier to code the sections where I need this checksum using a function. This code will not work because of the Exec SP_ExecuteSQL @SQL calls. Anyone know how to e...

Recommended Charting/Reporting/Dashboard Tool

What charting/dashboarding/reporting tool would you recommend with the following requirements: Windows platform (cross platform optional) Work with an SQL Server 2005 database (hard requirement) Pagination of multiple charts based on selected (multiple) dimensions Chart configuration/options similar to that of Excel 2007 ...