sql-server-2005

How to limit the number of connections to a SQL Server server from my tomcat deployed java application?

I have an application that is deployed on tomcat on server A and sends queries to a huge variety of SQL Server databases on an server B. I am concerned that my application could overload this SQL Server database server and would like some way to preventing it making requests to connect to any database on that server if some arbitrary nu...

SQl Server 2005 Datatype

What's best datatype for storing tax rate in SQl Server 2005? ...

Changing Database Names and Cross Database Queries In Stored Procedures

Hi, I have a number of related databases that are version-ed. Instance of different versions may run side by side, identified by their different versions, i.e. [NorhwindV1.1] and [NorhwindV1.2] may be on the same server, along with [SouthwindV1.1] and [SouthwindV1.2]. There are a number of stored procedures that make cross database q...

SSAS deployment failed > "File system error: Error opening file"

Hi, For a few months we're developing an olap cube on SQL 2005. We deploy this cube on the local server which worked fine until a few weeks ago. From that moment we got got an error while delpoying the cube. "Error 1 File system error: Error opening file; \?\C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Data\SSAS_Funda.0.db\Dim B...

transaction log shipping sql server 2005 to 2008

I have a reporting setup with SSRS on our sql server 2005 database. Because sql server 2008 is not supported by the main program which populates our database we are stuck with 2005 on our prod database. Unfortunately when I run our weekly check reports the web interface constantly times out because the server cant do the conversion to PD...

How to get 2 data sources to merge in SSIS?

Hi, I am fairly new to SSIS. I came across a situation where i have to use a data flow task. The data source is MS- SQL server 2008 and destination is Sharepoint list. I gave an SQl query for Data source object as SELECT Customer_ID, Project_ID, Project_Name, Project_Manager_ID, Project_Manager_Name, DeliveryManager1_ID, DM1NAME F...

How do I make use of multiple cores in Large SQL Server Queries?

I have two SQL Servers, one for production, and one as an archive. Every night, we've got a SQL job that runs and copies the days production data over to the archive. As we've grown, this process takes longer and longer and longer. When I watch the utilization on the archive server running the archival process, I see that it only ever ma...

Migrate SQL Server Express database to SQL Server 2005

I created an ASP.Net MVC 2 project, but I want it to use a SQL Server 2005 database instead of the express version. Is there a way to force VS 2010 to create the database in SQL 2005, or at least migrate the schema to the new database? Thanks! ...

Create your own language in SQL 2005

I have developed my own word breaker for SQL 2005 and the Full Text Search feature. I know how to use it by simply hijacking an existing language and add the wordbreaker to the registry for the hijacked language. However I'm not completely satisfied with that solution. I want to create a completely new language is this possible? ...

Flattening a table that contains rows that reference other rows in SQL Server 2005

Hello, I am facing a problem that occasionally comes up when you deal with not fully normalized table. Here is the problem. Imagine a table with 4 columns, and let's call this table dbo.Hierarchical. Here is the definition of the table: if OBJECT_ID('dbo.Hierarchical') is not null drop table dbo.Hierarchical create table dbo.Hierarch...

SQl Server 2005 Pivot

I want to basically join these 3 table in a view for a report: Class Table: ID Name 1 N1 2 N2 3 N3 Flags Table: ID ClassID Flags 1 1 F1 2 1 F2 3 2 F6 4 2 F3 5 3 F2 Sessions Table: ID ClassID Sessions 1 1 S1 2 1 S4 3 2 S3 4 3 S...

How to update database when using wild characters for example like .

Hi , I have column which consists of path for example \Abc\F\E\record_123 , now i need to update the path in database where only one change i need to do is tht \Abc\F\E\record_123 = \Abc\F\G\record_123 - i want to update E to G . how to do that with update query in database . Can anyone help me its urgent. Thanks Smartdev ...

SQL Server DB Restore Clustered to Single Node?

Hi Folks, Can you restore a DB from a SQL Server 2005 Clustered Environment (Prod) to a single server (single node) (SQL Server 2005) in Dev/Sys? Cheers, Conor ...

Sql prevent row being modified

Is it possible to prevent any changes to a row in sql? Let's say the record is created. But once it's created I don't want the record to be modified ever. So the user can still try to do a update table set column = value .. but that would raise an error preventing it to be modified something like that. ...

Is it possible to join a table valued function and another table with parameters

Quick background for those interested, I have a master detail table(options date), about 20 details for each master record. Our oltp system that is saving the data was doing 21 inserts for each new piece of information we saved. This was killing the server, so I'm trying to get this working by substituting comma separated values for the...

In SQL Server, how can I separate a large number of tsql statement into batches?

Hi guys, In SQL Server, how can I separate a large number of tsql statement into batches? Should I use the GO statement in stored procedures or functions? Should I use the GO statement in explicit transaction management situation(between BEGIN TRANSACTION and ROLLBACK TRANSACTION or COMMIT TRANSACTION)? Are there some best practice abou...

In SQL Server, how do I know what transaction mode I'm currently using?

Hi guys, In SQL Server, how do I know what transaction mode I'm currently using? Such as autocommit, explicit, or implicit. And how can I change one mode to another using tsql? Great thanks. ...

SQL Server checking if you have access to a database

Good Morning, I have connected to my SQL Server 2005 - and have managed to list all of the databases on that server. Now I would like to run a check on each database to see if I have permission to view that database.. How would I go about this? Many Thanks, Joel ...

SQL Server 2005 Merge Replication: Under what circumstances would the base snapshot expire?

Obviously changing schema, adding / removing published articles etc expires the snapshot, but is there anything else that would cause the publication to expire? We're seeing a snapshot expiring without any changes to schema or data on the server. If a snapshot is older than the subscription expiration, would that cause it to be expired...

Can I make a SQL Server 2005 Table Column accept only letters and numbers ?

When we have a column that will store a username that will only accept letters and numbers we always do validation on this input field using javascript or even server validation from code .. but i want to know if is there any way that can allow me make this validation on the Table column itself even some one try to enter data from any pl...