sql-server

How do I fix a Cross language installation problem in SQL Server 2008?

I'm trying to do a SQL Server 2008 setup and I've been given a Cross Language Installation failure. More specifically: Rule "cross language installation: failed. the Setup language is different than the language of existing SQL Server features. To continue, use SQL Server Setup installation media of the same language as the installed ...

Bypass .Net v3.5 verification when installing SQL Server 2008 Express

For some reason, when I try to install SQL Server 2008 Express, I get an error saying that I need to have .Net Framework 3.5 installed first, but the thing is: I already have! So could anybody tell me if I can bypass this verification by updating a registry key or something? I have np with visual studio or any other thing... just when I ...

How can I automate exporting of tables into proper XML files from MSSQL or Access?

We have a customer requesting data in XML format. Normally this is not required as we usually just hand off an Access database or csv files and that is sufficient. However in this case I need to automate the exporting of proper XML from a dozen tables. If I can do it out of SQL Server 2005, that would be preferred. However I can't for t...

Why am I getting "multiple cascade paths" with this table relationship?

I have the following table relationship in my database: Parent / \ Child1 Child2 \ / GrandChild I am trying to create the FK relationships so that the deletion of the Parent table cascades to both child and the grandchild table. For any one particular granchild, it will either be...

Installing TFS 2008 Workgroup Edition on Windows Server 2003 with SQL Server 2008

I ran into an issue when installing Team Foundation Server 2008 Workgroup Edition. I have a Windows Server 2003 SP2 machine that's practically new. I have installed SQL Server 2008 with almost all of the options. When I run through the TFS installation, it allows me to enter my SQL instance name and then goes through the verification pro...

In MS-SQL, how do I INSERT INTO a temp table, and have an IDENTITY field created, without first declaring the temp table?

I need to select a bunch of data into a temp table to then do some secondary calculations; To help make it work more efficiently, I would like to have an IDENTITY column on that table. I know I could declare the table first with an identity, then insert the rest of the data into it, but is there a way to do it in 1 step? ...

SQL Server 2005: T-SQL to temporarily disable a trigger

Is it possible to disable a trigger for a batch of commands and then enable it when the batch is done? I'm sure I could drop the trigger and re-add it but I was wondering if there was another way. ...

Extending SQL Server full-text index to search through foreign keys

I know that a SQL Server full text index can not index more than one table. But, I have relationships in tables that I would like to implement full text indexes on. Take the 3 tables below... Vehicle Veh_ID - int (Primary Key) FK_Atr_VehicleColor - int Veh_Make - nvarchar(20) Veh_Model - nvarchar(50) Veh_LicensePlate - nvarchar(10) At...

Logging ALL Queries on a SQL Server 2008 Express Database?

Is there a way to tell SQL Server 2008 Express to log every query (including each and every SELECT Query!) into a file? It's a Development machine, so the negative side effects of logging Select-Queries are not an issue. Before someone suggests using the SQL Profiler: This is not available in Express (does anyone know if it's available...

SQL Server Management Studio 2005 - Change Default Directory for Backup Location

Using MS SQL Server Management Studio 2005 - To Restore a Database: Restore Database (*) From Device: Click "..." Button Backup media: File Click "Add" Button Popup Window: "Locate Backup File" That window Defaults to C:\Program Files\Microsoft SQL Server\MSSQL.1\Backup How do I configure MS SQL Server Management Studio to look i...

What's the best way to manage a large number of tables in MS SQL Server?

This question is related to another: http://stackoverflow.com/questions/108445/will-having-multiple-filegroups-help-speed-up-my-database The software we're developing is an analytical tool that uses MS SQL Server 2005 to store relational data. Initial analysis can be slow (since we're processing millions or billions of rows of data), b...

IsolationLevel.RepeatableRead to prevent duplicates

I'm working on an application that is supposed to create products (like shipping insurance policies) when PayPal Instant Payment Notifications are received. Unfortunately, PayPal sometimes sends duplicate notifications. Furthermore, there is another third-party that is performing web-service updates simultaneously when they get updates...

Is there a Max function in SQL Server that takes two values like Math.Max in .NET?

I want to write a query like this: SELECT o.OrderId, MAX(o.NegotiatedPrice, o.SuggestedPrice) FROM Order o But this isn't how the MAX function works, right? It is an aggregate function so it expects a single parameter and then returns the MAX of all rows. Does anyone know how to do it my way? ...

SQL Server Adapter for Rails

Trying to find the sqlserver adapter for rails on windows. I have tried getting it from (without luck): gem install activerecord-sqlserver-adapter --source=http://gems.rubyonrails.org Where else can I get this gem? UPDATE: Make sure to run the command prompt as the administrator. Right click on the command prompt and click "Run as a...

1000's of locations have a desktop application that need to upload diff's of their db to a central store

Hi, There are literally thousands of locations where an application is running (.net desktop app),and a requirement is to have the updates to their database (diff from the last upload) to be sent to a central server that will store all the locations data. What options do I have in coming up with a solution? One idea is to generate an X...

Relative path reference in WebConfig.ConnectionString

Is it possible to specify a relative path reference in connectionstring, attachDbFileName property in a web.config? For example, In my database is located in the App_data folder, I can easily specify the AttachDBFilename as|DataDirectory|\mydb.mdf and the |Datadirectory| will automatically resolve to the correct path. Now, suppose that...

What is the T-SQL syntax to connect to another SQL Server?

If I need to copy a stored procedure (SP) from one SQL Server to another I right click on the SP in SSMS and select Script Stored Procedure as > CREATE to > New Query Editor Window. I then change the connection by right clicking on that window and selecting Connection > Change Connection... and then selecting the new server and F5 to run...

Deploy multiple instance of reporting services or connect to multiple versions of DLLs

Is there any way in SSRS2008 to deploy multiple instances of the ReportServer running separate code sets? I'm developing a very specific deployment of reporting services where I have a number of custom extensions plugged in. But, my company typically deploys multiple versions of a release at once on the same server. I'm at a little bi...

SQL Job Status

I am actually working on SP in SQL 2005. Using SP i am creating a job and am scheduling it for a particular time. These jobs take atleast 5 to 10 min to complete as the database is very huge. But I am not aware of how to check the status of the Job. I want to know if it has got completed successfully or was there any error in execution. ...

What charting tools/controls would you use with SQL Server/Reporting Services?

Apart from commercial tools like Dundas, are there any open source or cheaper (and decent) 3rd party charting tools/controls for reporting services out there? ...