Category "sql-server-2008"

Cannot restore SQL Server 2008R2 database

I took a backup of the database on a disk from a server that I do not have online access to. Trying to restore the database on my local machine using: RESTORE

Alternative for Cartesian and Cross Join

I want to output all the possible combination in two tables without using cartesian join or cross join. Is this possible?

Joining two tables and getting values

I have two config tables. The structure is as below: Table 1: Client_Config id, name, value, type, description Table 2: App_Config name, value, type, descript

How to minimize transaction log sqlserver database .?

I have database size is more than 125 GB . and every 1 hour the database is not respond . the message is every time say (The transaction log for database MESP_2

How to copy file without using XP_CMDSHELL?

I am using SQL Server 2008. I would like to give users possibility to copy files. Is it possible without using XP_CMDSHELL procedure? Cause i should not change

SSIS - Intermittent error "Conversion failed because the data value overflowed the specified type."

I have an SSIS package which intermittently fails with a handful of errors, the two most informative of which are: DFT_PlaySummary SSIS Error Code DTS_E_O

Find all stored procedures that reference another stored procedure

I want to find the all the directly and indirectly references to DB objects list. I am using below queries but I found the issue. DECLARE @Search varchar(255)

Default row order in SELECT query - SQL Server 2008 vs SQL 2012

Our team recently upgraded our databases from SQL Server 2008 to SQL Server 2012. One breaking change we noticed was in the default order of rows returned by th

Error-Unable to open BCP host file data, while executing BCP command

I'm trying to copy data from a '.dat' file to a table in sql server I'm getting this error while executing the following commands: declare @cmd varchar(100) se

How to create composite partition in SQL Server?

I want to create a sample database using composite partition. I know about Range Partition and List Partition. But, I don't have enough knowledge about Hash Val

SQL Working Days between two Dates

Hi I have the following function to work out WD between two dates. my query is...i have two dates with the same date eg. 06/07/2016 and i want WD to show as 0 b

Import CSV into SQL Server 2008 R2 Automatically

How can I have SQL Server Import csv data from a folder automatically? I have a folder named RawData on the root drive that a system is currently pushing a csv

SQL server report error - "rsInternalError"

When I try to access the Report Server (or open up a report), I get the following error, An internal error occurred on the report server. See the error log fo

Store Procedure Result to Text file using SSIS package

Here i am new in Developing the SSIS package I need your support to come up with the solution. I have 10 different set of stored procedures which I have to ex

SELECT FROM OPENROWSET( BULK...) changing special characters

I've been facing an issue for a few hours, and I can't seem to get my head around this one. So I have a SQL Server database 2008R2, Collation SQL_Latin1_Genera

SQL Server "." Alias Not Working

I've added an alias of "." which should point to my local (named) instance, ".\SQL2008". But when I try to connect to ".", it times out. Am I missing something

How to deploy Provider SQLOLEDB.1 on windows 2008 R2 64-bit

In my VB6 application, I connect to the SQL Server 2008 R2 using Provider SQLOLEDB.1. This is not supporting on windows 2008 R2 64-bit. How to deploy "SQLOLEDB.

How do I do multiple CASE WHEN conditions using SQL Server 2008?

What I'm trying to do is use more than one CASE WHEN condition for the same column. Here is my code for the query: SELECT Url='', p.ArtNo,

which is the best way to implement blocking queries or SP's in sql server 2008 r2

I am using SQL Server 2008 R2, and I have to implement the process like if there is any blocking on the production server it will immediately insert into the bl

EF4 generated CRUD views having problems with the Create due to parent-child table relationship

I am relatively new to .NET, and am building a website with MVC3, EF4, SQL 2008 R2. Also, I haven't found anything on Stack that directly seems to address my i