sql-server-2005

Calling IIS AppPool from SQL Server Job (2005)

Hi Folks, I was wondering if it’s possible to make a call to an IIS AppPool from a SQL Server Job (2005). I am basically looking to have a job monitor a table for an event and if a condition is fired I want to call IIS and shutdown a specific AppPool. I presume I can do this thru the CLR and .NET from the SQL Server Job but wondered wa...

Full-text search across concatenated columns?

I'm new to free-text search, so pardon the newbie question. Suppose I have the following full-text index: Create FullText Index on Contacts( FirstName, LastName, Organization ) Key Index PK_Contacts_ContactID Go I want to do a freetext search against all three columns concatenated FirstName + ' ' + LastName + ' ' + Organi...

Combining 2 TSQL statements into 1

Hi, I need to combine the following two SQL statements into one. Any help is greatly appreciated. Thanks. SELECT C.*, M.members_Email FROM tbl_Campaigns C JOIN tbl_Members M ON C.campaign_MemberId = M.members_Id WHERE C.campaign_MemberId = @userID ORDER BY C.campaign_Key DESC SELECT COUNT(*) FROM tbl_CampaignRecipients WHERE reci...

Users have open files on BackupSharedFolder. Continuing the operation will force the files closed.

I am using below sql statement to create shared folder with permission EXEC xp_cmdshell 'net share BackupSharedFolder=D:\testshared /REMARK:"test shared"' It is working fine with create shed folder. then i will use below sql command to remove shared EXEC xp_cmdshell ' net share BackupSharedFolder /delete"' Above is also working fine ...

SQL Server Service Broker to insert data on a SQL Server 2000

Hi all, I have two servers, the first one with SQL Server 2005 and the second one with SQL Server 2000. I want to insert data from the 2005 to the 2000 and I want to do it unsync (without distributed transactions because "save transaction" are used). Once the information is inserted in the tables of the 2000 server, some instead-of tri...

SQL 2005 Express - New SP ?

When clicking New Stored Procedure I get a template with some lines of comments . Can this template be changed so that it does not give each time these comment line? ...

What do all these "Save DTS Package" options mean?

I'm creating a DTS package. After specifying the source, destination, and tables, I get the Save, schedule, and replicate package step, which has a Save DTS Package checkbox. If I check the box to save, I get these options: SQL Server SQL Server Meta Data Services Structured Storage File Visual Basic File Can anyone give a good exp...

find the duplicate and write it in log file.

...

Hide SQL in Profiler

How can I make my SQL statements not to appear in Profiler ? They contain sensitive information and I don't want them to show in Profiler. Thanks for the replies ! ...

How can SQL Server email an error message when Replication publisher fails to connect to a subscriber system

Hi, We have several remote locations where we have set up SQL Server 2005 replication. Sometimes the publisher fails to replicate due to various reasons like 1) network problems, 2) improper shut downs of subscriber, 3) change in domain passwords, 4) change in SQL passwords, 5) failure to switch on the subscriber system. Is th...

How can i write a program which reports on status of SQL Server replication

Hi, Some of our end users are not IT savvy and may not know how to check the health of the SQL replication system. Are there any tools which are simpler than SQL Server Management Studio that they can keep an eye on ? I am asking this since the end users are non programmers. If not, what are the ways for the admin in the client place, ...

Optimising DATEDIFF

I just want to check my logic there. Suppose I want to find all new products in the last 30 days. My current procedure is this: SELECT ProductName FROM ProductTable WHERE DATEDIFF( d, CreateDate, GETDATE() ) < 30 However, I understand that functions like DATEDIFF will not use the non-clustered index I have created on CreateDate. So t...

Unable to start T-SQL Debugging on Win 7

When I try to do the sql stored proc debugging, before the application starts i get this msg that "Unable to start T-SQL Debugging...". This is happenning on the local machine where win 7 is installed and Sql Server dev edition 2005 is installed, Auth is windows... I'm using Visual Studio 2008 Professional Edition Result is same on serv...

SqlBulkCopy problem

i use SqlBulkCopy to insert data from OleDbDataReader (contains data from xls) to mssql-2005 i have a cloumn on the OleDbDataReader that contains number stored as text (in the xls) when i look into the mssql data i see null in that column all other columns are move ok. link text ...

Where the data saved in the table while using conventional path loading in sql loader??

In Sql loader, while using Direct path loading, the data will stored beyond the High Water Mark (HWM). My Question is: Where is the Data Stored in Conventional Path Loading? ...

sql server complex query - fetch data and search on multiple tables

I have a two tables as follows: product category(t1): id name product master(t2): id name category Now I have the following query to fetch the products and the associated category name in one query only: select *, (select name from t1 where t1.id=t2.category) as 'category' from t2 which is working perfectly. Now what ...

.Net Compression and SQL Server 2005 NVARCHAR(MAX)

Can I safely store a .Net compressed memory stream (System.IO.Compression) in an SQLServer 2005 NVARCHAR(MAX) field? SQLServer 2008 is not an alternative. ...

has ms sqlserver data vault feature?

as far as i know oracle has the "DATA VAULT" feature.so has sql server?if it has,give me an information link about that feature please. * Preventing highly privileged users (DBA) from accessing application data * Enforcing separation of duty * Providing controls over who, when, where and how applications, data and databases can be acces...

how to query to create a grouping of sets

I have a normal joining table with two columns that are keys to other tables. The records are customers mapped to a range of assets. asset_map ----------- customer_id asset_id ----------------------- 1 1 1 2 2 1 2 2 3 1 3 2 3 ...

SQLServerException: The statement did not return a result set when executing SQL

I'm using using the sqljdbc4.jar (sqljdbc_2.0) version. I'm executing an insert + a select back to get the identity like this: BEGIN INSERT INTO DateRangeOptions (Description,Code) VALUES ('dateRange.quickPick.option.all','ALL'); SELECT SCOPE_IDENTITY() END and I get: com.microsoft.sqlserver.jdbc.SQLServerException: The state...