sql-server

What is the current trend for SQL Server Integration Services?

Could anybody tell me what the current trend for SQL Server Integration Services is? Is it better than other ETL tools available in market like Informatica, Cognos, etc? ...

What is the correct PHP configuration to connect to MS SQL 2000/2005?

I have a number of servers running PHP 5.2.6 (non-thread-safe build) on Windows 2003/IIS6 utilising FastCGI. I'm having some issues connecting to MS SQL 2000/2005 (MySQL connectivity is working fine, ASP/ASP.NET scripts can connect to MS SQL successfully as well). One solution suggests copying the SQL Client Tools ntwdblib.dll file to ...

MSSQL: Limited account that's only allowed to read certain views?

How do I create a MS SQL server user that only allowed to read certain views of a particular database? ...

MSSQL - Presenting data when column names dynamic...

I am presenting to a final authority evaluation scores for employees. Each row is an employee’s data and since the categories to be evaluated can change from period to period the column names cannot be hardcoded in the Stored Procedures. I have already devised the following solution. 1 Create a temp table 2 Dynamically use the Alter...

querying xml store in a text field

I have a sql server 2005 table which has xml store in a text field. I am wondering if there is an easy way (using TSQL) of retrieving the a value from the xml data without doing a line by line parsing of the text? Doing a line-by-line parsing is a possibility because the amount of xml is pretty small. However, if possible I would like ...

SSIS - AcquireConnection method call to the connection manager <Excel Connection Manager> failed with error code 0xC0202009

I have an SSIS package which reads an Excel File (Data Flow Source) and transfer the data to SQL Server using OLEDB Destination Data Flow Item. The OLEDB Connection Manager used for the destination is configured to use Windows Authentication. The package works fine on my development machine. But when I open the same package on another ma...

Length of varbinary(max) filestream on MSSQL 2008

Is there some eficient way how to get length of data in "varbinary(max) filestream" column? I found only samples with conversion to varchar and then calling the "LEN" function. ...

Preventing Sql column overflows

If I have a parametrized stored procedure which takes a varchar(10) value and converts it to an int, I currently have to ensure that the value is not greater than the varchar equivalent of the maximum int value. IF @Criteria <= '2147483647' SET @Id = CONVERT(int, @Criteria) My question: Is there a better way to prevent overflowing an...

Database agnostic table/view export software?

Trying to search for a more elegant/overall solution to our common/basic data export tasks I am convinced that there must be software out there that allows me to: Define and persist a "setup" (definition of file format, delimiters, encoding, column names etc) from a GUI Run on a schedule/from command line Work on both Oracle and MSSql...

"CSS-like" fallback cascading data in SQL Server 2005

I'm trying to implement a price fallback system in SQL server. I'd like to have a set of increasingly specific prices (eg: by region, store, warehouse, etc.) for a product, that may or may not be defined, and be able to select the most specific prices (ie: the one with most parameters defined) in a report. For example, I might have the ...

How to find duplicate field combo

I have a table with columns id, a, and b. a+b should be unique, but this is a legacy database that is not constrained correctly. How can I get a set of ids for records in which a+b is not unique? If I have ID A B 1 2 3 2 2 3 3 1 3 4 1 4 Then I want to get records 1 and 2 back from the query. ...

Automatically assigning a random string to new records

I already have a customer table, but from now on new records have to be assigned a unique random alphanumeric string of 5 characters in a new column. Is there anyways I can do this without having to use Trigger (on insert?) ...

Is there any mechanism to connect to sql server 7 from visual studio 2008?

We are currently moving our SQL Server 7 based database to SQL Server 2000 (Yeah progress) However in the mean time we have to support our SQL Server 7 database product. We currently have access to Visual Studio 2008 and I know that native support of connecting to SQL Server 7 does not exist. Does anyone know of any third party solutions...

Should I use a push or pull subscription if using RMO?

I have a CRUD winform App that uses Merge Replication to allow "disconnected" functionality. My question is; If I am doing all initializing and synchronizing programatically with RMO (like HERE) does it matter if it is a Push or Pull? What would be a difference? I understand the differences between the two (see HERE) but it seems ...

How to transform huge XML files into relational data to perform queries

I have at least 100 xml files each about 300 MB with email messages basically in the format listed below. Now my question is, how do I get this data into say SQL Sever database so that I can perform query on this data. My queries would be along the lines of: Has a certain person sent an email to another certain person on a given period...

What is the best way to handle this constraint in SQL Server 2005?

I have SMS based survey application which takes in a survey domain, and a answer. I've gotten requests for detailed DDL, so.... The database looks like this SurveyAnswer.Answer must be unique within all active Surveys for that SurveyDomain. In SQL terms, this should always return 0..1 rows: select * from survey s, surveyanswer sa wh...

Run the same replication script on several databases

We have several SQL Server 2000 databases (I know, we need to upgrade) that have the same structure and have them set up to replicate to another server. The problem is that whenever I have to change the structure (which is usually pretty easy to do on all databases, especially with tools from Red Gate) I have to stop the replication, ma...

Adding a database to my Visual Studio 2008 project says I need sql server express?

When I try to add a new Sql Server Database file to my Visual Studio project, it tells me that I need to have Sql Server 2005 Express installed even though I have Sql Server 2005 Developer already? Is this by design and if so, why did Microsoft do it? and if it is not by design, what is the solution to fix it? ...

Does MS SQL Server's "between" include the range boundaries?

For instance can select foo from bar where foo between 5 and 10 select 5 and 10 or they are excluded from the range? ...

Can't store XmlDocument in table column with data type 'xml'

I'm currently working on a small web application using Visual Studio 2008 Express. I'm attempting to retrieve an XML document from a server using a client library and then save the document into a database column (using Linq). The database column has the data type specified as xml. Unfortunately, I've been unsuccessful during my first fe...