sql-server-2005

Will uninstalling a named instance of SQL Server require a reboot or cause issues with existing instances?

I have a server with a default instance and 2 named instances of SQL Server 2005 standard installed. This is a mission critical production server that cannot be restarted during normal business hours. Will uninstalling the two named instances of SQL Server 2005 require a reboot or put the server in a state that may cause issues with th...

setting timeout on a SSIS 2005 script task

I am using a script task in ssis 2005 which takes some time and getting a problems timing out with "The operation has timed out". Where abouts is the setting to change the timeout period? I cant seem to find it in the properties in task and I do not wish to make a global change to timeout. ...

SQL 2005 Find Out Who Created a View

Hi: Does SQL store any information about who originally created a view, or who last modified it? ...

Unable to connect to SQL2005 using VBScript

Using the connection string below I can connect to a SQL2000 DB but not a SQL2005. I have the code in an ASP file. Dim connStr, cn, rs, sql connStr = "Provider=SQLOLEDB;Persist Security Info=True" _ & ";Initial Catalog=mydatabase" _ & ";User ID=dbuser" _ & ";Password=dbpwd" _ & ";Data Source=...

Displaying Time Zone information in Reporting Service Reports (SQL 2005)

Hi, I have a Microsoft SQL 2005, reporting project. I want to display the Current date, time and timezone information on the page header. That is, I want to get a display as below 6/17/2009 12:25:11 PM +05:30 I added a text box to the page header. When set its expression to =Now, used the FormatDateTime function but they all either di...

Call a store procedure from .net

I have a store procedure like this: CREATE PROCEDURE up_action (@id int ,@group varchar(30)='' ,@nom varchar(30)='' ,@compte varchar(30)=NULL ) AS BEGIN DECLARE @chrono int ...... select @date=date from users where compte=@compte INSERT INTO dialog (numappel,auteur,commentaire,etape,etapews,operant) VALUES (@numappel,@nomprenom,@dialog...

Save float values in SQL Server

Hi, I have a simple web app , and want to save some numbers of Float or Double format in SQL server. but there is a problem , when I try to save 123.66 , In Table I see 123.6600003662109 stored. How nd why my float number changed when save on DB? how can I fix this error? Thanks ...

How did stackoverflow create a xml data dump of those large tables?

Inspired by the xml data dump stackoverflows makes I wondered how to make them myself. I use the same tooling as they do (SqlServer and C#) but when the tables are so big I guess you wouldn't do a 'select * from questions' and iterate over it while writing it to xml via an XMLWriter class. ...

Sql Server 2005 enterprise on Windows 7

Is there any possibility to install Sql Server 2005 enterprise on Windows 7? thank you ...

Successful Strategies for TRY ... CATCH in SQL Server 2005

I'm changing some code to take advantage of TRY ... CATCH in SQL Server 2005. What successful strategies have you found for using it? I'm thinking of creating a stored proc which calls the system functions which give details of the error, rolls back any open transaction and raises an error. Is there a better way? ...

SQL Server 2005 error when grouping using subquery.

Using SQL Server 2005 I'm trying to group based on a case statement with a subquery, but I'm getting an error ("Each GROUP BY expression must contain at least one column reference. "). I can work round it quite easily, but can anyone explain the error? I've got a column reference to #header.header. create table #header (header int) crea...

Can I run/test/create dtsx packages outside Visual Studio?

Not too familiar with dtsx packages - can they be created/run outisde Visual Studio? Is BIDS (Business Intelligence Development Studio) just required to do all the above (in Visual Studio) or is it an independent development enviroment for dtsx packages? Please shed some light if you can (and get some eazy rep)! ...

SQL Server 2005 Assembly Cast Invalid

I'm trying to call my assemblys SP and receive the following error: A .NET Framework error occurred during execution of user-defined routine or aggregate "Pmt_ImportJournal": System.InvalidCastException: Specified cast is not valid. System.InvalidCastException: at JournalImport.Pmt_ImportJournal(Int32 orderno) My SP in the assemb...

What is not persisted in a database backup / restore? (SQL Server 2005)

If I take a backup of a database on a SQL 2005 Server, and then restore that backup to a different (new) database on the same database server instance, what things will not be persisted (things like cached execution plans, statistics etc...) ...

How to create SQL Server table schema from a XML schema? (with .NET and Visual Studio 2008)

I have a XML schema, and I know that "xsd.exe" can generate the C# code for it. But I want to know if is possible to automatically create the MS SQL Server 2005+ tables from the XSD, with the help of this or other tools. BTW I didn't get what the C# code generated by "xsd.exe" is worth for. What's the difference between code generated b...

SQL pivot using SQL Server 2005

I am looking for a solution to use pivot on two tables. My problem though, number/name of column & row headers exist as rows in third table. My third table looks like this: ID Name 1 Row1 1 Row2 1 Row3 2 Col1 2 Col2 2 Col3 My final solution should look like this: Col1 Col2 Col3 C...

How do you backup CRM3.0 when the 'ftcat_documentindex' is offline?

My organisation uses Microsoft CRM 3.0, and I am attempting to backup the database. The following error is preventing me from doing so, does anyone know how to resolve this issue? Error: System.Data.SqlClient.SqlError: The backup of full-text catalog 'ftcat_documentindex' is not permitted because it is not online. Check errorlog file f...

How to identify and get the sqlserver data files filepath

I am afraid that i am unable to locate the absolute path of the SQL SERVER data files. I have tried to so do by doing the following. foreach( Database db in srv.Databases) string filepath=db.PrimaryFilepath; string name=db.Name; abspth=filepath+"//"+name+".mdf"; Like this i have workaround.But is there is any alter...

Cannot create a CLUSTERED INDEX on a View because I'm referencing the same table twice, any workaround?

I want to create an indexed view that integrates data from several tables, however SQL Server complains with the error message: Cannot create index on view "MyView". The view contains a self join on "dbo.Companies". The view definition is something like this (simplified version): SELECT T.Field1 , T.Field2 , P.CompanyNam...

Using variables with GRANT and DENY in SQL Server 2005

In SQL Server 2005 how can you use a variable for the username to GRANT or DENY permissions to objects withing the database? I have tried: DECLARE @username varchar(30) SET @username = 'DOMAIN\UserName' GRANT SELECT ON [mytable] TO @username GRANT UPDATE([field one], [field two], [field three]) ON [mytable] TO @username I get Incorrec...