Questions tagged [sql-server-2008-r2]

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

Filter by
Sorted by
Tagged with
9 votes
2 answers
53k views

The INSERT/UPDATE/DELETE permission was denied on the object 'TheTable', database 'TheDb', schema 'dbo' [closed]

I have two SQL Server user accounts on a database that behave differently on INSERT / UPDATE / DELETE. SQL Server version is 2008 R2 (10.50.4042, 64 bits). UserA (SQL Login): can do these commands (on ...
0 votes
1 answer
589 views

Intall SQL Server 2008 On Windows Server 2016

We update our Server from Windows Server 2008 to Windows Server 2016. And we use SQL Server 2008 R2 on the old server. I read from the website said that SQL Server 2008 is compatible with Windows 7, ...
0 votes
1 answer
720 views

Query DB2 without using Openquery

Is there a way to query a DB2 Linked Server without using Openquery? IE, is it possible to query DB2 through a linked server by doing something like the following? select * from [db2_linked_server].[...
9 votes
1 answer
2k views

Change Tracking across several Tables

I'm looking into providing DB level change tracking within my system. I need to be able to track changes at an entity level, rather than just individual tables. Right now, we have triggers on each of ...
36 votes
5 answers
8k views

Why is there still a varchar data type?

Many of my databases have fields defined as varchars. This hasn't been much of a problem since I live and work in America (where the only language that exists is "American". ahem) After ...
2 votes
1 answer
326 views

Identity management in Transaction replication with updatable subscription

I have migrated my publisher DB to new server yesterday. For migration what I did was removed subscriptions and publication completely backed up DB on which publication was configured restored DB to ...
11 votes
3 answers
7k views

memory used by Locks

I am kind of curious, one of SQL 2012 enterprise edition with 128 GB of RAM size of database is 370 GB and growing, amount of memory used by locks (OBJECTSTORE_LOCK_Manager) memory clerk showing ...
0 votes
2 answers
781 views

why a convert from varchar do date fails on a different row everytime it runs?

I have a database with a field like this (Dont know why it's varchar): 19950105 i'm trying to convert it to DATE as DDMMYYYY. I could do this with: convert(varchar(10), cast(The_ugly_field as ...
51 votes
5 answers
112k views

How export a sql server 2008 diagram to PDF filetype?

I want to have an export from my database diagram to PDF or image types. How can I do this? I worked with SQL Server 2008 R2.
1 vote
1 answer
433 views

Connection to database causes SSPI context error

I have migrated a SQL server from another server box that was decommissioned. They have the same name and also same IP address. However, when I connect to the server from an application using trusted ...
5 votes
2 answers
28k views

Applying Quotes Across Multiple Lines

In SQL Server Management Studio you can use the shortcut CTRL + K > C or CTRL + K > U to comment/uncomment lines in bulk. Is there a similar keyboard function that applies single quotes across ...
36 votes
18 answers
105k views

How can I compare the schema of two databases?

Is there a way to find the differences in two SQL Server databases (schema only). One is local and the second is at a customer's site. We are experiencing problems with crystal reports running some ...
2 votes
1 answer
1k views

"Login failed for user..." with cross-instance access on same server in SSIS package

I have 2 SQL Server instances running on the same server. Lets call the instances Instance_A and Instance_B and the server Svr0045. Both server use the same service accounts (a service account is ...
0 votes
1 answer
366 views

Can I change database compatibility level from 80 to 90 or higher with log shipping?

I have a database on SQL 2008 R2 with compatibility level 80 and I want to change it to 90 or 100. I assumed that after changing, I may find a regression in our application's performance. Many backups ...
4 votes
1 answer
31k views

Send Multiple Attachments With Send DBMail

I thought that you just needed to separate two file names with a ; but my syntax fails with an error of Msg 102, Level 15, State 1, Line 251 Incorrect syntax near '@filename2'. This is my full ...
1 vote
1 answer
2k views

Can't uninstall SQL Server 2008 R2 SP3

I have encountered the error on SQL Server 2008 R2 where Report Builder 3 fails to load with error Microsoft.ReportingServices.ComponentLibrary.Controls.dll, has a different computed hash than ...
2 votes
2 answers
4k views

How to bulk convert ISO8859 text in Text columns to UTF8 in nvarchar(max) columns?

I've been struggling for days with a problem on a MS SQL database. Here is the situation: I have an old Open Source PHP application (Limesurvey version 1.92) running on a Windows 2008R2 server, with ...
8 votes
3 answers
58k views

Maintaining SQL Server 2008 R2 on Windows 10

I have to run SQL Server 2008 R2 on Windows 10 but it is not supported and so I am not getting any updates. Installing a later version of SQL Server is not an option. I can find all the service packs ...
2 votes
1 answer
826 views

How to audit all DML operations on a SQL Server 2008 R2 database

In order to assess options of implementing indexed views, I want to check the usage of DML operations of the tables. The database is new to me as well as the relevant business knowledge, so I just ...
7 votes
2 answers
13k views

Creating Users on secondary server in log shipping

I have a production Server say ServerA I have setup log shipping to ServerB which is left in read-only mode. The purpose of this log shipping is to lower the load on production server for some ...
4 votes
1 answer
4k views

How to copy non clustered indexes in transactional replication

I create transactional replication ,but forget to include non clustered indexes and now my subscriber have only clustered indexes (primary key) and I want to transfer all nonclustered indexes to ...
-1 votes
2 answers
260 views

SSMS gives error if column name is "MERGE" where as other keywords works

IN SSMS create table if we include sql keywords in column name then it will be wrapped around square brackets "[]" automatically and the table gets created without any error generally. But if we ...
0 votes
1 answer
243 views

How to add Reporting services sharePoint features in SQL Server 2008R2

I am facing some issues related to SSRS on SQL Server 2008R2, how can we have install below features: Reporting Services- SharePoint Reporting Services Add-in for SharePoint Products Any one could ...
6 votes
3 answers
12k views

Restore a large number of transaction logs

I'm using SQL Server 2008 R2, and I need to restore 36 .trn logs to a database. I have restored the first 4 using the restore transaction log functionality in SSMS (right-click database > tasks > ...
5 votes
1 answer
991 views

Will a nonclustered index with a unique column always address all queries filtering that column first?

I have found large heap tables that are over-indexed and for example have multiple different nonclustered indexes with different columns, but some of those indexes have the (only one present) primary ...
0 votes
1 answer
3k views

Error when running job using SSIS package

I have SQL Server 2008R2 installed on my Windows server 2008. I created a package using the Import and Export Wizard from file system. After that I created a job (SQL Agent Job ) that used the SSIS ...
0 votes
3 answers
5k views

What is Fastest way to shrink a datafile?

I have a 4 Tb SQL Server 2008 R2 database. I'm going to move this DB to a new server with a new release of SQL Server 2012. (the application does not support SQL Server > 2012, but that is not the ...
0 votes
2 answers
10k views

Invalid connection error on SQL Server 2008

I have this third party application that is interfacing with a MS SQL Server and I have some issue migrating its database from a MS SQL Server 2005 to A MS SQL Server 2008. The application was ...
-1 votes
1 answer
91 views

DMV sys.dm_exec_procedure_stats sometimes returns weird (incorrect?) values ​in successive object snapshots

I'm working on a small project to monitor activity and execution metrics of user stored procedures. Periodically (every 10 minutes or so), I'm taking snapshots of the sys.dm_exec_procedure_stats DMV, ...
3 votes
1 answer
61 views

SQL Server 2008 R2 lack of space?

I have upgraded from SQL Server 2005 to SQL Server 2008 R2 because my database was 4G and needed extra space. I though SQL Server 2008 R2 has a limit of 10Gigs hence I would have 6 Gigs free, however ...
4 votes
1 answer
401 views

Read/Write Deadlock in SQL Server

We are facing deadlocks when a stored procedure is concurrently executed. We are using Microsoft SQL Server 2008 R2, concurrent execution is done with java executing multiple request of the stored ...
1 vote
1 answer
418 views

SQL Server Merge Replication Computed Column Conflict Resolution

I'm setting up a merge replication web publication for a table that needs to use the DateTime (Later Wins) conflict resolver so that the most recently modified row wins in any conflict. This table (...
1 vote
1 answer
551 views

SQL Server 2008 R2 Express Connection

I installed SQL Server 2008 R2 Express Edition. I opened the command prompt and typed sqlcmd -S server1\SQLExpress -U SqlUserAccount -P SqlPassword to connect to SQL Server. However, it ...
2 votes
0 answers
1k views

SQL Server 2008 Replication "between retries" or "worker thread no available"

All our existing servers are in SQL 2008 and I am in the process of upgrading to SQL 2014 and as well moving SAN to different SAN storage. As part of it I have to upgrade my distributor. We got about ...
5 votes
2 answers
4k views

SQL Server database forum design sample

I am doing a design for a database using SQL Server 2008 R2, basically it is a simple database design for a forum (just like games fans forums). Fortunately I am struggling with it as I didn't find ...
1 vote
2 answers
5k views

Unable to login to SQL Server using SSMS and SQL agent failing

I have SQL Server 2008 R2 ENT insalled on Windows server 2008 R2 ENT. I am unable to login to SQL Server locally after the installation. Getting below error: Connection handshake failed. An OS call ...
1 vote
1 answer
408 views

Query Tuning and Index Tuning - SQL Server

I've been asked to improve the performance of the following query. I can't amend any existing Indexes but I can create new ones. The table structures can be found in this SQL Fiddle The row sizes of ...
0 votes
1 answer
384 views

Log backup Job disable and enable during FULL backup -Sql Server 2008R2

I am planning to test the Sql server migration of Production databases but i am thinking to stop TLog Backup job during Backup and Restore as I don't need TLog backup and my Backup and Restore process ...
4 votes
2 answers
705 views

Merge causing deadlocks

We are running MS SQL Server 2008 R2. We've got a VendorMaster table (with about 8700 rows) that we are trying to keep in sync across two databases using a Merge statement. The merge code runs every ...
3 votes
0 answers
103 views

why some one will use approximate data types for sales

I was messing around with Kartris online shop and I was reading this definition for a product version(you have basic information of a product in one table and many versions of products wich can have ...
3 votes
0 answers
2k views

"The schema script could not be propagated to the subscriber" error has SQL code instead of file name

This type of error is unfortunately not uncommon. One report of many is this one on Stack Overflow: https://stackoverflow.com/questions/11360331/sql-server-merge-replication-error-the-schema-script-...
7 votes
3 answers
12k views

identify blocking and send alert

I need to create an alert that will notify me when any query has been blocked for more than 60 seconds. For example if someone has a transaction open on a table and forgets to run a commit or a ...
0 votes
0 answers
30 views

Prevent Sql Server sending Failover partner to connecting clients

I have 2 Sql Server 2008R2, enterprise edition servers setup in an asynchronous (High Peformance) mirror setup. There is no witness. Intermittently I find that a client will attempt to connect to the ...
6 votes
4 answers
3k views

Right Trimming Binary Data in SQL Server

Scenario: I am inserting a string into a binary field (CONTEXT_INFO) and then later attempting to pull it out and convert it back to a string. When I do, the resulting string has a length of 128 ...
0 votes
1 answer
140 views

MS SQL Login failed for user 'sa'.[CLIENT: <local machine>]

I changed the password of sa using the command [ALTER LOGIN WITH PASSWORD]. Then , it keeps showing the below message in fail log every minute. Login failed for user 'sa'. Reason: Password did not ...
2 votes
1 answer
2k views

CopyDatabaseWizard.exe issue on SQL 2014

I have four servers running Server 2008r2 SP3, of which three were running SQL Server Express 2008r2 and one was running SQL Server Standard 2008r2. After much ado I got these all upgraded to be ...
0 votes
1 answer
24 views

Table structure where name changes to be retained

Example Situation - order table with client list and products. In below example table , when client name/company changes (company name may change) when updating records need to retain old company name ...
5 votes
4 answers
59k views

How to automatically execute a stored procedure every day at a particular time?

Can you please help me how to execute a stored procedure automatically in SQL database without any transaction in SQL? I want to execute on particular fix time.
2 votes
3 answers
1k views

SQL Server Pagination using CTE

I have to apply paging on query as per requirement i need two extra columns other than query result Total Records Total Pages but i am trying to confirm that this the right way to retrieve total ...
0 votes
1 answer
80 views

SSAS Backup to Remote Location

I followed the steps in the best answer on this question - How can I dynamically back up all SSAS databases on a given instance? - and can successfully create backups of our BI Cubes to a local drive ...

1
2 3 4 5
76