This Tag is for SQL Server 2008 R2, major build version 10.50.xxxx

learn more… | top users | synonyms

0
votes
2answers
39 views

Error when restoring SQL Server 2008 R2 backup on 2012

I am trying to restore a .bak file (backup taken on SQL Server 2008 R2, compatibility level 100). I am restoring the backup on SQL Server 2012 edition. I get the below error. Unfortunately the ...
5
votes
1answer
162 views

How can we determine the SQL server version and edition from the available set up, before actually installing it?

We are going through the downgrade activity from SQL2008R2 Ent to Standard edition. To kick off the above activity we were looking for available standard edition of SQL server. We found one , but got ...
0
votes
2answers
33 views

How to Get the Last Day of the Previous Month?

Is there a quicker and easier to read way in order to get the last day of the previous month in T-SQL? I have found this piece of source code, which does the trick, but looks obfuscated unless ...
0
votes
1answer
30 views

How to read files using the OPENDATASOURCE method?

I am trying to understand what a particular piece of source code does. The original author has written the following excerpt: /*******************************************/ -- Inserează în tabela ...
2
votes
0answers
18 views

SQL Server 2008 R2 : Unexpected timeout with SQL Agent Job/powershell

I have a SQL agent job set to execute a SQL query against a single database and then save each row into a different file with powershell before zipping the files up and emailing me. In one of my SQL ...
0
votes
0answers
9 views

Service Broker Queue Monitors Disappearing

We are experiencing a strange issue with Service Broker. We have a SQL 2005 database that was upgraded/migrated to a new SQL 2008 R2 environment (compatibility level changed as well). In this ...
1
vote
2answers
20 views

Will adding features pick up previously installed service pack updates?

We have SQL Server 2008 R2 SP3 installed. Need to add a feature to the installation, Business Intelligence Development Studio. The question is do features installed after the application of a service ...
3
votes
3answers
384 views

Verifying password policy on existing users

I've recently come into an environment where a lot of databases logins do not have the enforce_password_policy flag enabled. An upcoming audit is necessitating the verification of these logins' ...
0
votes
1answer
20 views

Replication - Initialize with Snapshot when using filtered rows

We have a large database that is being Transactionally replicated (one way) between sites. The Publication has a date based filter so that it doesn't replicate old data. I need to add a new ...
4
votes
1answer
56 views

How to move a fairly large tsql table from one server to another server?

I have been working on thinking of ways to move a 40gb table from one SQL Server box to another SQL Server box. They are at separate companies without an intranet linkage and obviously without linked ...
0
votes
5answers
46 views

Getting Data Back after Wrong Data Restore in SQL Server

I would like to inquire if there is an possible way to return lost data that stored in a Sql server Database after making a wrong database restore? I know it is extremely hard to get a positive ...
0
votes
0answers
35 views

Decimal Data Type as Primary Key

One of my tables is set up like this: create table dbo.Source ( testID decimal (10,3) PRIMARY KEY , column 2 somedatatype , column 3 somedatatype ) Whenever I perform SSIS into this table ...
0
votes
2answers
25 views

Sudden Slow Reports [on hold]

we have reports on our report server that are running slow all of a sudden. They were working fine and then all of a sudden over the weekend they started to process incredibly slow. It appears that ...
0
votes
1answer
30 views

Log Shipping -Monitor Server Down - Copying happening but not restoring on secondary

I have set up a few log shipping instances, but I am not a DBA. This weekend something happened for the first time - the log shipping Monitor Server went down temporarily due to electrical issues ...
1
vote
1answer
81 views

How to get the return value from a stored procedure executed with sp_executesql

I need to call a stored procedure in another database and check the return value. The name of the other database can vary so I'm trying to use sp_executesql, but I haven't been able to find how to get ...
0
votes
0answers
33 views

tempdb contention issue and excessive pagewrites/s

Still removing the rust from my SQL Server skills, so please bear with some stupid questions here and there... Customer has a SQL Server 2008 R2 running in an Azure VM with 8 cores and 14GB RAM. ...
0
votes
1answer
38 views

SQL Server 2008 R2: From a SQL Server Log file, how do I find out what is causing an event

Problem: The attached image is a screen shot of the SQL Server log showing an event that happens every Tuesday at around 1:20 AM. This event is causing the transaction log backup chain to break ...
1
vote
2answers
43 views

Different table size on sp_spaceused and standard report “Disk Usage by Top Tables”

I ran sp_spaceused and Disk Usage by Top Tables standard report for a table. The results for sp_spaceused are: name rows reserved data index_size unused SomeTable <1301755> ...
-3
votes
0answers
16 views

Is the MCSA For SQL Server 2008 still worth pursuing? [closed]

Is the 70-432 MSCA SQL Server 2008 still a reputable accreditation? I work with SQL Server 2008 and feel comfortable going for this exam. But, is the market calling for MCSA SQL Server 2012 and ...
0
votes
1answer
59 views

Ignore identity column on stored procedure (database) deployment [closed]

My company utilizes the feature flag model/architecture for all changes. An upcoming change will remove the identity for a certain column on a table. When trying to get the code pushed out before the ...
1
vote
1answer
22 views

Permissions to Create DB's and be able to perform any function only on those DB's

I am looking for a way to allow users to create databases which only they and SA accounts will have access to (Perform any function; creating/deleteing tables, deleting the DB, etc). For example, ...
0
votes
1answer
46 views

SQL Job to be run earlier on last work day of month

Right now, I have a SQL job (within SQL Server 2008 R2) that dumps a complex select statement into a table every weeknight (excluding weekends) and it works great. Due to our company's Month End ...
0
votes
0answers
10 views

Powershell error: “Cannot convert the ”[DBADEV\SQL2008r2]“ value of type ”Microsoft.SqlServer.Management.Smo.Server“ to type… ”

Error I'm getting from Powershell: Cannot convert argument "srv", with value: "[DBADEV\SQL2008r2]", for "SqlBackup" to type "Microsoft.SqlServer.Management.Smo.Server": "Cannot convert the ...
1
vote
1answer
26 views

Need advice on Primary and Clustering Keys of a table

I need advise on a table which is part of a development project I'm involved. A brief summary on the use of the table: Data from multiple databases will be consolidated in this table for the purpose ...
4
votes
2answers
117 views

External Memory Pressure

I have a few "gaps" in my understanding of external memory pressure. I've found quite a bit of helpful information online, including this info from SQLSkills.com. SQL Server has a built-in ...
0
votes
1answer
24 views

Setting a default principal server in SQL Server 2008

This should be a pretty simple answer but I can't find anything on it searching the web. SQL Server 2008 R2, mirrored with a witness: Node1 (Principal) Node2 (Mirror) Node3 (Witness) If Node 1 ...
2
votes
0answers
11 views

Filegroup design for Document Table for BLOB Storage

I have a table for storing documents as VARBINARY types in my database (I'm not using filestream). My database is setup with only one data file, but I am wondering if there is a benefit to creating a ...
3
votes
1answer
119 views

Can SQL Server 2008 R2 extended events execute stored procedure or query?

I'm trying to use extended events to track queries that never complete using Event Pairing as a target. (see this question I asked a few days ago). The event pairing target should let me find ...
2
votes
1answer
74 views

How to output more than 4000 characters in sqlcmd

I've made a stored procedure restoredatabase that returns code to restore a database. The output script looks like this: restore database [DB] from disk='F:\FULL1.bak' with norecovery restore ...
6
votes
3answers
291 views

Unexpected Implicit conversion in a procedure

I have a procedure like this (simplified): CREATE PROCEDURE test @userName VARCHAR(64) SELECT * FROM member M INNER JOIN order O ON M.MemberId=O.MemberId WHERE M.Username = @userName There is a ...
1
vote
0answers
28 views

System.Data.SqlClient.SqlException (0x80131904): SQL Server detected a logical consistency-based I/O error: incorrect checksum

I am migrating client's database to my hosted environment, the client runs SQL Server 2008 R2, and we run SQL Server 2014. I am stuck on restoring one log file, which left below error message when I ...
3
votes
1answer
69 views

SQL Server index causing incorrect behavior on cursors

I have a SQL Cursor that's behaving incorrectly as soon as we added an index to a table. Here's a trimmed-down example of the query causing issue: DECLARE @CUR_CRDATE NVARCHAR(8) DECLARE ...
1
vote
0answers
47 views

Is it possible to trace queries that never complete with SQL Server 2008 R2?

Running SQL Server 2008 R2. We have some queries that typically take less than one second to complete, but, occasionally, they are taking longer than 30 seconds which causes a client timeout. ...
0
votes
1answer
32 views

copy table with all constraint

how I would copy a table with all constraints? I run select * into myNewTable from baseTable where 1=0 This copy a table but no with constraints
0
votes
1answer
38 views

Set Identity as (11 - 2) in sql table

I have a issue, I want to set the ID column, where the ID should start from 11-2 then it should auto- increment by 1 like 11-3, 11-4. I am using sql-server 2008 R2. Please help
0
votes
0answers
44 views

can not login to SQL Management studio using “SQL Server Authentication”

i am able to login to sql management studio 2008 r2 using "windows authentication", but if i chnage the Authentication type to be "Sql server Authentication" instead of "windows authentication", i ...
1
vote
1answer
47 views

upgrade of 24/7 OLTP [closed]

Our primary db is a 24/7 OLTP db on SQL2008 R2 on an Active / Passive Windows cluster. It is a VLDB and uses almost all SQL functionality (including Service Broker and Mirroring), acts a Publisher and ...
0
votes
0answers
19 views

Procedure or function 'sp_InsertImages' expects parameter '@Img_path', which was not supplied [migrated]

i have passed img_path in my code nd procedure but it show me error please anyone help me. my procedure is : create proc sp_InsertImages ( @Img_path nvarchar(max), @product_id numeric(18,0), ...
-1
votes
2answers
41 views

How to run multiple select statements in Data flow task in SSIS [closed]

I am migrating data from one database to another database using SSIS package and i need to write multiple select statements for same table depending on conditions as mentioned below. Actual Queries i ...
1
vote
0answers
29 views

Rolling back a SQL Server 2008R2 Database stored in SQL Server Express [closed]

We had an accident where a bunch of data was deleted from one of our products. The product removed a bunch of lines from various tables about 12 hours ago. There is no good backup and I try to ...
0
votes
0answers
27 views

The Local Security Authority cannot be contacted

I am not very expert with SQL Server but I have to use to for one of my application development. Issue is that when I open the PC in morning to start my work, my application couldn’t make connection ...
0
votes
1answer
30 views

SQL Server collecting SQL statements using particular index

I'd like to capture SQL statements that uses a particular index. Is there a way I can utilize SQL Profiler or extended events to do so? I know I can view the plan cache to get a gist of the queries, ...
0
votes
0answers
39 views

Database Role Membership: db_executor vs db_datareader and db_datawriter in SQL Server 2008R2?

I have a couple of users who have only public and db_executor memberships in their Server Login object, User Mapping properties in the one database (let's call it A), now that our front end ...
0
votes
1answer
49 views

Any tips to watch out for when setting one of my databases to Read Only?

Our front end application uses\ pointed to a different database now in SQL Server 2008R2 in the same instance, so to prevent users from accidentally updating data in the old production database, is it ...
0
votes
1answer
28 views

How to grant insert in a table that is in another database on SQL Server 2008 R2?

On SQLServer 2008 R2 I have 2 schemas: DatabaseA and DatabaseB. On DatabaseB I have a table named TableB. Whenever tableB is updated, a trigger will insert a value in the tableA (that is on ...
0
votes
0answers
36 views

lock request time out period exceeded. When revoking db_owner access

I am trying to revoke db_owner access of an user and I am getting this below error! I have no active transactions User (whom I want to revoke access) is not connected to any db DataBase owner is ...
0
votes
0answers
48 views

Optimising an SP - Left Join against several big tables

I have stumbled upon performance bottleneck due to LEFT JOIN against several big tables (approx. 6 million rows of data, consisting of 10 columns). Any suggestions on how to optimize this SP is ...
0
votes
1answer
45 views

Can mutli-threading java client cause high CPU utilization of SQL Server 2008?

I am a Java Developer, not a DBA, and would like to consult about an issue encountered in high CPU utilization in the SQL Server 2008 (not in the Java app server). The Java client uses ...
1
vote
1answer
38 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 ...
1
vote
3answers
48 views

Script to drop all databases except one not working

I'm trying to drop all databases but one on my test server. For this, I'm using the below script but it gives error: EXEC sp_MSforeachdb ' USE [?] IF (DB_ID(''?'') > 4 AND DB_NAME()!=''ABC'') ...