Tag: sql-server-2005

Script all objects in a database into a table

I need to populate a table in SQL server 2005 with some objects in a particular database (stored procedures, tables, views and functions, etc) In the table I would like one line per object and the table columns will be the name of the object , the script of the object, schema and object type. […]

Truly empty element with sql server for xml-directive

How do I create a truly empty xml element with the for xml-directive in sql server (2005)? Example: select ” for xml path(‘element’), root(‘elements’) Outputs: <elements><element></element></elements> But what I really want is: <elements><element /></elements>

SQL Server 2005 truncates strings at double quotes

When I update the pollQuestion and pollName column that contain double quotes using the stored proc below, it saves the double quotes properly. However, for columns option1,…,option9, the stored proc doesn’t save the double quotes or any characters after the double quotes. It’s as though SQL Server truncates the string prematurely at the double quotes. […]

When connecting SAP Business One to SQL Server 2005, what is the

we have SAP Business One – Fourth Shift Edition running here at a small manufacturing company. The consulting company that has come in to do the installation/implementation uses the “sa” id/pass to initially connect to the database to get the list of companies. From then on, I have to assume that its the sa id/pass […]

The query has been canceled because the estimated cost of this query exceeds the configured threshold

The query has been canceled because the estimated cost of this query (1660) exceeds the configured threshold of 1500. Contact the system administrator. I am getting error as above on live while running one of the stored procedure threads where parameter contain XML variable. I have checked the configuration value of QUERY_GOVERNOR_COST_LIMIT is set to […]

SQL Server 2000-2005-2008 Distributed Query Problem

Just set up a new server. Trying to transfer some workload from one to the other. Everything looks great, except when I come to run this code: CREATE TABLE #KEYWORD5 (ITEM_MASTER_ID NUMERIC(25) NULL) INSERT INTO #KEYWORD5 exec SQL2K801.soupftidx.dbo.P_REMOTE_SQL_EXEC ‘SELECT IM.ITEM_MASTER_ID FROM ITEM_MASTER IM WHERE IM.BUYER_ORGANIZATION_ID IN (5970,5230) AND IM.ACTIVE_FLAG = ”Y” AND CONTAINS(IM.*, ” (“SCREW*” […]

How do I get SQL Server 2005 data stored as windows-1252 as UTF-8?

I have a client database with English and French data in windows-1252 encoding. I need to fetch this data as part of an AJAX call and send it in UTF-8 format. Is there a way I can pass the data through a stored proc to perform this conversion? My web app cannot be altered to […]

TSQL Extended Procedure 'xp_dirscan'?

What is the equivalent of the extended procedure ‘xp_dirscan’ in SQL Server 2005?

Error while connecting remotely

i m using sql server 2005 with service pack-2. When I connect sql server with by registering the remote server with IP, username and password. I have done all the neccessary setting for connecting remotely “SQL Server 2005 Surface Area Configuration”. i got following error while connection: This version of Microsoft SQL Server Management Studio […]

How should I go about transferring data from an ODBC app to SQL on an hourly basis?

I’m trying to pull data from an ODBC app to SQL2005(dev ed) DB on an hourly basis. When I run SSIS the option to import all tables and views is grayed out and forces your to write a query. How would I go about setting up a SSIS integration service to update ALL 250 some […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.