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

learn more… | top users | synonyms

0
votes
0answers
6 views

SQL 2005 Cluster Service pack 4 upgrade failure at remote user account

I built SQL Server 2005 ENT Cluster on Windows Server 2008 R2. I need to upgrade it to SQL Server 2005 SP4. However, I get this error at the Remote User Account screen" "Enter the remote user account ...
1
vote
0answers
19 views

Unable to install SQL named instance as it says RS feature exist, even after dropping it

We are trying to Un-install a named instance from one of our servers. But, don't know why it did not un-installed the reporting services even after proper selection was made during uni-install. ...
-3
votes
0answers
19 views

Cannot connect to database server 2008-r2 [on hold]

I installed SQL Server 2008 r2 but when I try to connect to Db instance with any application, (Sql management, Sharepoint ecc) I got the message that cannot find any Sql database Server. Every SQL ...
2
votes
2answers
65 views

How to backup full transaction logs for SQL Server 2008R2

I have a 32GB Database with over 7GB logs (DB name: XYZ). I'd like to copy the DB with all of the logs. I thought that I can simply run: ... ALTER DATABASE XYZ SET RECOVERY FULL; BACKUP DATABASE XYZ ...
0
votes
2answers
37 views

Dynamic SELECT and place result in variable columns

Edit: I use Microsoft SQL Server Management Studio, I believe it's SQL 2008R2. Sorry, new to this. I've got a complex question, at least, I think so since I can't find the answer after excessive ...
1
vote
1answer
24 views

What should we do when same column fields occurring multiple time in many tables?

I have more than 20 tables in my database. There are some columns which occur in almost all of the tables. In that case what should I do? Do I put all those columns in every table or is there a better ...
-1
votes
0answers
24 views

Generating new empty values while retrieving data from a database [on hold]

I have a Pettycash table Like this: PettycashId LedgerName OppositeLedgerName amount While I retrieving data like this: Select PettycashId,Ledgername,OppositeLedgername,Amount from Pettycash ...
1
vote
1answer
34 views

SSIS Packages get stuck in SQL Agent jobs [on hold]

We run about a dozen scheduled SQL Agent jobs which run SSIS packages. Intermittently, every scheduled job will get stuck in a running state. i.e. we'll arrive in the morning and notice that there's ...
1
vote
1answer
28 views

Manage max table storage space in case of excess data (size in GB)

My scenario is that I am using sql server 2008 r2 on my end. I have created a database named testDB. I have a lot of tables with some log tables in this. some tables have contain lakhs of records in ...
0
votes
0answers
15 views

Problem running SSIS package remotely using PoSH

For various reasons I'm trying to run an SSIS package remotely using Powershell. I've enabled remote scripts on my server using the following command. Set-PSSessionConfiguration -Name ...
1
vote
2answers
47 views

Running a T-SQL job under another user

I cant find my proxy user to "Run as" that user !? I am confused which kind of proxy user is appropriate to run a job with a simple T-SQL command. (I have created a credential and proxy but cant find ...
1
vote
1answer
73 views

Index to filter a view before joining the underlying tables [on hold]

Using SQL Server 2008 R2 Suppose you have a query like the following select top 1 * from view_cms_user where UserId = 1234 or UserPasswordRequestHash = 'anxazno121o3n' view_cms_user is basically: ...
3
votes
1answer
303 views

Storage size of a bigint table

I am working with a table that has this format : CREATE TABLE dbo.ID_STORE ( WORKING_ID bigint PRIMARY KEY CLUSTERED ) The table stores around 2 millions rows, but the stored ids are not ...
5
votes
3answers
200 views

Check if any of the values is in a subquery result

I have a complicated subquery that returns a list of order IDs. I need to get a list of customers who have these orders. The problem is that there are two ways of assigning a customer to an order (one ...
2
votes
0answers
29 views

How to prevent misuse of rights in monitoring application?

I have a monitoring application that runs on the computer of each user in my organization. This application needs to insert some monitoring data in several tables of a database (MS SQL Server 2008 ...
-1
votes
0answers
26 views

Stored procedure [on hold]

I want to write a stored procedure that will insert data into two tables in SQL Server 2008 R2 but I am getting error. create table custlogin1 ( custid int primary key identity(1,1) not null, ...
0
votes
2answers
49 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
192 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 SQL Server 2008 R2 Enterprise to Standard edition. To kick off the above activity we were looking for available standard edition of SQL server. We ...
0
votes
2answers
39 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
32 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
21 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
13 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
22 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 ...
4
votes
3answers
419 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
24 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 ...
5
votes
2answers
97 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
47 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
36 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
28 views

Sudden Slow Reports [closed]

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
34 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
95 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 ...
1
vote
0answers
35 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
39 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
46 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> ...
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
47 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
12 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
135 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
12 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
125 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
79 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
2answers
294 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
33 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
33 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
45 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 ...