We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [sql-server-2008]

SQL Server 2008 (major build version 10.00.xxxx). Please also tag with sql-server.

Filter by
Sorted by
Tagged with
0
votes
2answers
108 views

Upgrade BI server to 2014 and stay on 2008r2 with the database engine server

We would be happy to upgrade our SQL Server environments to 2014, but we have a tight budget for next year. Our BI server (SQL Server 2008 Standard Edition, that is used only for BI purposes) is ...
0
votes
1answer
85 views

Missing Encryption Key when migrating Reporting Services from SQL Server 2008 to SQL Server 2016

Owing to a ransomware attack on our production server Reporting Services went down. This server was installed few years ago and its been in production for long. We have quite a few reports on this ...
0
votes
1answer
552 views

Validate data between two large tables

I have this scenario. Data files are transferred from multiple stores (transactions) to the head office as they happen. For each store the table in question is pretty big in size. At the head office, ...
8
votes
1answer
1k views

NEWID() In Joined Virtual Table Causes Unintended Cross Apply Behavior

My actual work query was an inner join, but this simple example with cross join seems to nearly always reproduce the problem. SELECT * FROM ( SELECT 1 UNION ALL SELECT 2 ) AA ( A ) CROSS JOIN ...
4
votes
1answer
585 views

GZip existing varbinary(max) column in Sql Server 2008+

I have an existing legacy table that is ~180GB in size due to a client application storing PDF files as varbinary. I'd like to be able to compress that column for all rows using GZIP to help save ...
2
votes
1answer
109 views

Replace/upgrade mirrored server hardware

We are deploying new VMs for a mirrored database that is in high safety mode with automatic failover and also going from SQL Server 2008 to SQL Server 2008R2. Most of the documentation I've come ...
2
votes
1answer
24 views

Permission Denied for a User that is part of AD

I have a group created in Active Directory. This Group contains 3 users. For some strange reason one of the user within the group can't select from specific type of SCHEMA whilst the 2 other users ...
1
vote
0answers
17 views

Capture trigger update() with inserted & Deleted changes only

I have price table that has over 100 columns. I'm in the process of fine tunning triggers and reducing amounts of records inserted, to audit changes when updates are applied. The audit table ...
0
votes
2answers
2k views

Error cs1567 while installing ms-sql on windows 8.1 [on hold]

I tried to install sql server 2008 and 2012 on my windows 8.1 laptop, but at both times I faced with the same error: TITLE: SQL Server Setup failure. SQL Server Setup has encountered the ...
1
vote
2answers
3k views

Restoring database backup file gives access error

I am running SQL server 2008 and trying to restore from a backup file. Note: the backup file and folder and read/write access to "everyone". Running the command as "master" Running RESTORE ...
5
votes
1answer
213 views

Does the Query cost in Sql Server account for buffering?

If I am comparing 2 queries by checking their relative "Query cost" as a high level indicator of performance, does the buffer status have any effect on the values shown in the execution plan?
14
votes
2answers
6k views

SQL Server VARCHAR Column Width

Searching around the web, I have found conflicting advice on whether there is a performance impact when specifying overly-wide VARCHAR columns, e.g. VARCHAR(255) when VARCHAR(30) will probably do. I ...
19
votes
2answers
37k views

Tracking stored procedure usage

Besides using SQL Server Profiler, is there any way to track which stored procedures are being used, or at least when they were last executed?
0
votes
0answers
24 views

How to create difference value in last group row

I want to create a query for a find difference value between Quo QTY and INV QTY and display in the last group row. For example, in this picture, I want to query a display like this. but now it ...
2
votes
3answers
3k views

Increasing timeout period for schema compare

I need to increase the timeout period for schema comparison. I'm using Visual Studio 2012 to compare two SQL Server 2008 R2 databases on Windows Server 2008. I believe this is something I need to ...
15
votes
2answers
11k views

Why does “SELECT POWER(10.0, 38.0);” throw an arithmetic overflow error?

I'm updating my IDENTITY overflow check script to account for DECIMAL and NUMERIC IDENTITY columns. As part of the check I compute the size of the data type's range for every IDENTITY column; I use ...
0
votes
1answer
49 views

Moving Partitioning Files To Another Disk Drive In SQL Server

There is a production table which was partitioned by someone in our company. Some partitioning files was wrongly located to different disk drive. I have to move those files to the disk where they ...
0
votes
2answers
3k views

IIS Application pool running under network service can't connect to SQL Server

I just deployed an ASP.NET MVC 4 application to IIS 7 but when I browse it i get the following error: Cannot open database "PCSPI" requested by the login. The login failed. Login failed for user 'NT ...
2
votes
1answer
178 views

Ideas how to make this query faster?

I have the following query: SELECT TabPohybyZbozi.ID, TabPohybyZbozi.NazevSozNa2, TabZakazka.Nazev, TabDokladyZbozi.DatPorizeni, TabPohybyZbozi.IDDoklad FROM ...
2
votes
2answers
92 views

'Row Goal' different behavior - why?

This is a heap with 400+ Million rows and 16 non clustered indexes, 146 columns. Please do not focus on why I cannot create a clustered index. That is not in my control and not in scope to my question....
0
votes
1answer
38 views

Unable to trace “Arithmetic overflow error converting numeric to data type numeric” error in profiler

I have a .net application. Its trying to create tables, views and insert/update data into many tables. while application running i got an error. I tried to trace the query in SQL Profiler, but i ...
1
vote
1answer
211 views

Transactional replication with updates on the subscriber?

Summary We need a "two-way" (bi-directional) replication topology which should be easy to setup and administer, with minimal downtime when changes are required. Current solution We have two SQL ...
-1
votes
1answer
155 views

Large table partition

I have non-partitioned production table with 100 million records for last 2 years. The table has the clustered and non clustered indexes. I want to insert daily about 150K records from external ...
4
votes
1answer
53 views

How do I solve the following error on attaching ldf-less database in SQL Server?

Before you write about the dangers of not having backups, etc., please withhold judgement... perhaps I just inherited the problem? I have an .mdf which which I am trying to attach to SQL Server 8. I'...
0
votes
1answer
144 views

error 15466 An error during decryption

I have a stored procedure that runs xp_cmdshell with a user with sysadmin right.(it was created by someone else long time ago). For security purposes I need to remove the sysadmin right from this user....
6
votes
3answers
2k views

why does my clustered index scan have ordered = false

When I look to at my query plan, I see plenty of clustered index seeks (yay!) and scans (not quite so yay!) but in some of them ordered = False. I will mention that we have parallelism involved, ...
0
votes
1answer
194 views

sqlserver lsalert job does not update it's out-of-sync counter

I am getting 14421 error messages and ended up reading the following KB Here is the part I'm referring to : Problems either with the Backup job or Copy job are most likely to result in "out of ...
-1
votes
1answer
28 views

How to sync data between two databases on two different ms sql server instances - one 2008 and the other 2016

What is the easiest way to sync data between two databases on two different instances. I am not thinking replication. Just sync e.g. production database to test database from time to time.
2
votes
1answer
200 views

Error when trying to start Microsoft SQL Server 2008 instance from SQL Server Configuration Manager

I get this error when I try to start Microsoft SQL Server 2008 instance from SQL Server configuration manager. SQL Server configuration manager : The request failed or the service did not respond ...
2
votes
1answer
93 views

SQL 2008/R2 Extended Events - Row Count

I need to setup a sql audit to capture all queries running on a server from any unauthorized locations, and one of the columns that is required is Row Count. In sql trace, this is possible. But I can'...
18
votes
2answers
3k views

Why does SQL Injection not happen on this query inside a stored procedure?

I made the following stored procedure: ALTER PROCEDURE usp_actorBirthdays (@nameString nvarchar(100), @actorgender nvarchar(100)) AS SELECT ActorDOB, ActorName FROM tblActor WHERE ActorName LIKE '%' ...
0
votes
1answer
31 views

Migrating a maintenance plan from ms sql 2008 to 2016

I have a bunch of maintenance plans that I want to copy/migrate to sql server 2016. I am able to connect to Integration Services on sql server 2016 but I get the following error when expanding 'MSDB' ...
0
votes
1answer
43 views

What firewall ports should be opened for central management server

Within my environment we currently have a MSSQL installation which serves as the Master in a Multiserver Agent environment (MSX). Due to this server being within a tightly controlled network the ...
-3
votes
1answer
25 views

Sql query to Clear existing email addresses from table [closed]

Sql query to Clear existing email addresses from table. please I need help
0
votes
1answer
103 views

Mssql query problem. Column '' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause

There is a problem I have experienced in mssql. ( but I don't have this problem in mysql. ) They know two different engines. but I could not find a solution. Do you think I can fix this error? My ...
32
votes
6answers
22k views

Make SqlClient default to ARITHABORT ON

First things first: I'm using MS SQL Server 2008 with a database at compatibility level 80, and connecting to it with .Net's System.Data.SqlClient.SqlConnection. For performance reasons I've created ...
0
votes
1answer
99 views

MS Access Foreign key not working in SQL Server

In MS Access I have a 'multi column - One to Many' foreign key between two table. When I try to create the same relationship in SQL Server I get a message " The columns in table 'Laser_Status_info' do ...
0
votes
1answer
252 views

How to split a multivalued column, do a lookup and update another column?

This is a part of my previous question. How can I achieve the following for all the records in my table using a single query? SET @TeamMembers = TeamMembers from tblProjects where ID = '125' ...
3
votes
1answer
72 views

Full recovery model and tablock inserts logging

When testing some queries, I set the recovery model to full on a database and ran two identical 1M row inserts, with and without TABLOCK. On the one with TABLOCK, I got around 9295 log records on a ...
0
votes
1answer
349 views

SQL query output to Sybase temp table

I need to query a MSSQL 2008 db for 4 columns of data where one column (an ID) is used to join a number of tables from a Sybase ASE 15 database then output all 4 columns from the SQL query with a ...
-1
votes
2answers
101 views

SQL export select statement to Excel using script

I have a project that requires me to create a script for migration between test and live data-bases. What i want to do is create an extract from the test database into an excel sheet or a txt file ...
21
votes
8answers
118k views

"Could not find stored procedure' even though the stored procedure have been created in MS SQL Server Management Studio

I have created a table testtable inside the database testbase that have the following structure: product_no (int, not null) product_name (varchar(30), not null) price (money, null) expire_date (date, ...
2
votes
3answers
356 views

How to restrict deletion of specific row of SQL server table

I want to restrict deletion of specific row. For example if someone wants to truncate a table or delete all the records from table then an error message should be thrown, for particular id it is not ...
1
vote
1answer
246 views

MS SQL 2008 Databse in Suspect mode and CHECKDB returns error: Object ID 3 has chain linkage mismatch

We did a disk expansion for VM DB server. However, after this operation the DB became suspect mode and cannot be open. Then we tried somethings like that; https://www.sqlrecoverysoftware.net/blog/...
37
votes
8answers
230k views

Writing select result to a csv file

We need to write the SELECT query results to a csv file. How can it be done using T-SQL in SQL Server 2008 r2? I know that it can be done in SSIS, but for some reasons, we don't have this option. I ...
30
votes
8answers
117k views

IntelliSense not working but it is enabled

This problem is really proving to be a tricky one (and quite annoying). In SQL Server Management Studio 2008, up until a few days ago my IntelliSense was working great. Then all of a sudden it ...
0
votes
1answer
44 views

Correct way to restore dbs to new server

We are migrating from sql server 2008 to 2017 and will do the following install sql server 2017 on the new machine make backups of all dbs on old server RESTORE DATABASE DbName FROM DISK = 'C:\temp\...
1
vote
0answers
41 views

ODBC connects but authentication fails on users table

We have sql 2008 running in mixed mode. The site where sql is running the ODBC connection works and ms access authenticates against the user table. We have an IPSec vpn to a satellite office using ...
0
votes
2answers
383 views

Side By Side Upgrade and Migration from 2008 to 2016

Side By Side Upgrade and Migration from 2008 to 2016 Old Server Name Test1 New Server Name Test1 Default Instance Test 1 My question is when the new server be named as the old one 'Test1" and it ...
1
vote
3answers
498 views

Query to see Index Fragmentation on all databases without using SP or temp tables

I am trying to compile a index fragmentation report on all databases, in a multi-server environment. The query will be executed via an openquery command, so I would like to make it as simple as ...