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

learn more… | top users | synonyms

0
votes
0answers
3 views

JDE Enterprise: How to grant a user role to use statistics on the remote server

I'm using Linked Server to query to JDE Enterprise Database. My problem is the query is too slow, it lingers on for a long while. Then I checked the roles of the login user. It doesn't contain any of ...
2
votes
2answers
54 views

String that contains letters representing a negative number

I would like for every string that has a letter on the end make it a negative value. <field> = '00000000014545p';--Varchar(15) <field> = '00000000012645x';--Varchar(15) <field> = ...
0
votes
0answers
19 views

How do I tell what roles a Windows Domain Login is in in SQL Server [duplicate]

The following question answers what roles is a user in in SQL Server: http://stackoverflow.com/questions/3609318/listing-users-and-their-roles-in-sql-server That only works for SQL Users, it doesn't ...
-5
votes
0answers
26 views

I want this in Sql select Statement [on hold]

Stock Value issue Result 2000 10 1990 30 1960 55 1905 75 1830 Sum 170 Now Stock ...
1
vote
1answer
58 views

Question about the UNION operator and its implicit data type conversions

Is there a limit to the number of UNION operators to combine query results? I have an odd situation where I have a table called TransmittalSheet TS that have a double (1 to Many) relationships with ...
0
votes
0answers
14 views

Restricting SQL Server access for Azure

I have SQL Server 2008 R2 running on a dedicated server together with a web site hosted on that same server. We now wish to access the SQL Server databases from an Azure Web API, however for security ...
1
vote
1answer
27 views

What does: SET @Variable1 = (Select field1 From INSERTED) mean?

I'm trying to understand an existing Trigger on one of my tables (DocumentDistribution), that it seems is the bridge table between DocumentInfo and DocumentSource tables. I don’t understand how this ...
0
votes
0answers
41 views

Standby Database mirroring/user read only/back up [closed]

I have a SQL Server 2008 R2 database in standby read only mode which retrieves transaction logs every 15 minutes. I'd like make the data available for read only to other users but am unable to do that ...
0
votes
1answer
22 views

The SQL Server Network Interface library could not deregister the Service Principal Name

After windows patching (windows 2008 R2 , SQL Server 2012 Sp2). I could not start SQL Server Service . I get error 1067 and this from the error log* The SQL Server Network Interface library could not ...
2
votes
0answers
30 views

Output in SQL Profiler has results with Database ID as NULL

I ran profiler to filter out certain applications connecting an environment but the results has application for Database_id "NULL".. Am I missing anything ? Also another question , does all the ...
1
vote
0answers
22 views

SQL Server 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 ...
1
vote
0answers
22 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
22 views

Cannot connect to SQL Server 2008 R2 database [closed]

I installed SQL Server 2008 R2 but when I try to connect to the instance with any application (SQL Server Management Studio, Sharepoint ecc) I get a message that cannot find any SQL Server. Every ...
2
votes
2answers
82 views

How to backup full transaction logs for SQL Server 2008 R2

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 ...
1
vote
2answers
39 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
27 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 ...
2
votes
1answer
38 views

SSIS Packages get stuck in SQL Agent jobs [closed]

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
29 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
1answer
25 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
53 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
75 views

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

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
312 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
211 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 ...
0
votes
2answers
61 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 ...
6
votes
1answer
202 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
40 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
34 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
24 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
15 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 ...
6
votes
3answers
435 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
26 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
103 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
48 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
30 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
37 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
108 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
48 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
49 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
15 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
27 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
148 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
129 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 ...