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

learn more… | top users | synonyms

0
votes
1answer
2k views

Permissions on sys.syslogins

I've got the following scenario: ( loggend in on SQL-Server with full admin-privileges ) Creating LogIn, User, Role and associate them. IF NOT EXISTS( SELECT "name" FROM "master"."dbo"."syslogins" ...
21
votes
2answers
20k views

What is the actual behavior of compatibility level 80?

Could somebody provide me with a better insight about the compatibility mode feature? It is behaving different than I expected. As far as I understand compatibility modes, it is about the ...
0
votes
2answers
2k views

How do I interpret the log when I run DBCC TRACEON (3502, 3504, 3605, -1)

I have been using DBCC Traceon (3502, 3504, 3605, -1) because it was recommended in a blog for discovering performance issues related to I/O. I'm running MS SQL Server 2008 R2 SP1 Results in my SQL ...
13
votes
1answer
16k views

SIMPLE or FULL recovery model for databases?

When should I use the full recovery model and when should I use the simple recovery model for databases? I always used the full recovery model because it is the default, but today i encountered this ...
0
votes
1answer
65 views

Give access to view or table?

I want to give an external user (new login) read access to part of the data model from my Database. The user will copy the data model and content from my Database, and then integrate that into their ...
16
votes
6answers
3k views

Trying to find the last time that a value has changed

I have a table that has an ID, a value, and a date. There are many IDs, Values, and dates in this table. Records are inserted into this table periodically. The ID will always stay the same but ...
2
votes
3answers
3k views

Nonclustered index is faster than clustered index?

Both tables have same structure and 19972 rows in each table. for practicing indexing, i created both tables having same structure and created clustered index on persontb(BusinessEntityID) and ...
3
votes
1answer
2k views

How to take partitions or filegroups out of service

I'm an experienced SQL Server DBA but new to partitioning, and I have a couple of questions. Using SQL Server 2008 R2 Enterprise Edition. I've inherited a large customer metrics database that grows ...
8
votes
1answer
702 views

How to make trigger code execute only for a specific application?

I was wondering if it is possible to enable a trigger just for my current application and not for any sql executed against the table. The situation: There are two applications working on the same ...
1
vote
0answers
18 views

How to take partitions or filegroups out of service [migration] [duplicate]

I'm an experienced SQL Server DBA but new to partitioning, and a had a couple of questions. Using SQL Server 2008 R2 Enterprise Edition. I've inherited a large customer metrics database that grows by ...
7
votes
1answer
872 views

Does Detach/Attach or Offline/Online Clear the Buffer Cache for a Particular Database?

A buddy of mine told me today that instead of bouncing SQL Server, I could simply detach and then re-attach a database and this action would clear the given database's pages and plans from cache. I ...
0
votes
1answer
171 views

Configure SQL Server Database for High Availability & Warehousing

I have 3 DB servers (DB1, DB2 & DB3 - all on Win 2008 R2 with SQL Standard 2008 R2 in the same datacenter). Let's assume AdventureWorks as an example database. My goal: - Setup DB mirroring with ...
5
votes
2answers
297 views

Given two known statements, how can I replicate deadlock?

I have two statements (an update against every row in one table (call it table A) and a delete on another table that looks up rows in table A) that I know are causing occasional deadlocks. It seems ...
1
vote
1answer
622 views

Does SQL Server check disk space before allocating a new page?

I have a bet with my old boss. I bet her that SQL Server, when allocating a new extent, always allocates from the buffer pool and never checks to see whether there is some place on disk where the ...
-2
votes
1answer
357 views

Errors keeping stored procedures through restore from backup [closed]

We are running SQL Server 2008 R2 on two identical servers. One, called LIVE, is our production environment. The other, called QA, is our dev enivornment. In order to check backup integrity and run ...
5
votes
2answers
3k views

How to run an exe file exists on a different server from SQL Server Job

We have an exe file on a server, say Server1 which should be run from a SQL job exists on a different server, e.g.: Server2. How can it be done? I know if it's a local file, I can use xp_cmdshell in ...
1
vote
2answers
1k views

How to count number of consecutive events matching status of last event?

In MS-SQL Server 2008, I have a table of events in the following format: Controller | ExecutionTime | Result 1 | 2012-09-24 09:00:00 | 0 1 | 2012-09-24 09:01:00 | ...
5
votes
2answers
2k views

Recommended distributor architecture for transactional replication?

We are planning to create a Transactional replication on 2 nodes of SQL Server 2008 R2, each node will be a publisher and a subscriber. What is the best practice in order to have this scenario done? ...
1
vote
0answers
40 views

dbo.M7_* objects (stored procs) in my production database. What product are these from?

I have inherited a database from a predecessor who is long gone... There are about a hundred stored procs in the database that all start with dbo.M7_ They appear to be something to do with source ...
6
votes
2answers
673 views

Is there a limit to how many credentials SSMS can remember?

Using SQL Server Management Studio that came with SQL Server 2008 R2, I make connections to the same server using a number of different sets of SQL Server Authentication credentials. On my development ...
1
vote
0answers
349 views

Auditing access to a linked server

I have a linked server with SQL Server configured with the security option "For a login not defined in the above list, connections will: Be made using the login's current security context". What I ...
1
vote
3answers
473 views

Will performance be better if I specify a filter multiple times?

Do I gain more performance if I repeat the filter in the WHERE clause on both sides of an OUTER JOIN? To clarify using code: select * from #main_select left outer join ( select main_id ...
3
votes
3answers
1k views

Running a DELETE stored procedure but finding degradation in performance in WHILE loop as iterations increase

Have a quick general question. I have a table I'm trying to purge a table. I'm deleting using a WHILE loop with WAITFOR DELAY time of 50ms between batches and 2000 records per batch. The real issue is ...
3
votes
1answer
2k views

SQL Server Many-to-One replication

I have 8 individual SQL Server 2008 R2 machines, each hosting 1 database. Each database has an identical table structure and schema, and entirely unique data. I would like to establish a reporting ...
4
votes
2answers
1k views

What is the best way to migrate multiple databases?

I want to migrate my database server to a new server. Right now I have a database server with Windows Server 2008 and now I am migrating to a new, separate server with Windows Server 2012. There are ...
5
votes
2answers
16k views

Can I install SQL Server 2012 on a machine with 2008 R2 already?

I have been using SQL Server 2008 R2 for quite a while, and it is working great. Now I need to use SQL Server 2012. Will this effect my existing databases? How much risk is involved in installing SQL ...
4
votes
1answer
2k views

Import Data replaces NULL with 0

I am using sql server 2008 r2 express. I am getting some problems when i use import data feature to import data from one database to another. I am using SSMS to do it. While using the wizard i choose ...
4
votes
2answers
461 views

If I update a column record in a table, will indexes that do NOT have this column in it be affected?

In terms of performance if I have a table like so: CREATE TABLE [TESTDATA].[TableA]( [Col1] [nchar](5) NOT NULL, [Col2] [nchar](2) NULL, [Col3] [float] NULL CONSTRAINT [TableA_PK] PRIMARY ...
3
votes
1answer
2k views

SQL Agent embedded PowerShell script in CmdExec step fails with import-module sqlps

SQL Server 2008R2 PowerShell 2.1 I am trying to create a SQL Agent job that dynamically backs up all non-corrupted SSAS databases on an instance without the use of SSIS. In my SQL Agent job, when I ...
5
votes
4answers
11k views

How to block user access to perform database application update?

Where I work we have a SQL Server database (Microsoft SQL Server 2008 R2) that serves as the back-end with two different user interfaces, a .NET web interface and a FoxPro interface. Every month we ...
7
votes
3answers
2k views

How should I best handle a rapidly growing database?

I have a database that I need to maintain. Sadly, the setup and use of that database I can't change, much (thanks to some internal politics). It's running on SQL Server 2008r2. Its only been live ...
8
votes
1answer
231 views

-E startup option and SSDs

Has anybody seen evidence of the effect of -E when using SSDs? The effect on 'spinning rust' drives is not disputed - but SSDs aren't really flustered by random I/O. I wonder if the -E option might ...
1
vote
2answers
890 views

Does a database restore remove existing stored procedures

I have a PROD and NON-PROD system NON-PROD already has a copy of an application PROD database I have also created new stored procedures on the NON-PROD application database and made changes to a ...
2
votes
1answer
515 views

SSIS - How do I execute a single OLE DB Command for mutiple paths?

I have an SSIS package (2008 R2) that I'm working on and I find myself duplicating the same OLE DB commands repeatedly and whenever there is a change its a nightmare to go back through and update all ...
0
votes
1answer
71 views

Merge subscription behaviour

I have a merge subscription with the ExchangeType parameter set to 1 (upload only). Rows are transferred to the publisher as expected. If I delete a row at the subscriber, the corresponding row at ...
11
votes
1answer
13k views

Parent-Child Tree Hierarchical ORDER

I have to following data in SQL Server 2008 R2. SQLFiddle Schema: CREATE TABLE [dbo].[ICFilters]( [ICFilterID] [int] IDENTITY(1,1) NOT NULL, [ParentID] [int] NOT NULL DEFAULT 0, ...
5
votes
3answers
1k 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 ...
4
votes
2answers
136 views

Partitioned Views - Storage of Indexes

I have a single table that contains 4 billions rows that I plan on splitting up in to separate tables for each Quarter of the year. Then I want to create a partitioned view across all tables. At the ...
0
votes
1answer
2k views

SSIS Adding column to excel sheet template destination when importing from SQL Table Source

I have an excel sheet template that has 3 columns. I also have a SQL server table that has the same 3 columns plus an additional 4th column. I need to import all 4 columns from the SQL table into the ...
0
votes
1answer
141 views

Efficient way to fetch records since a given criteria

I'm trying to implement a logic where the user can say give me n records since a given id#. E.g. SELECT TOP (100) col1, col2, ... colN FROM Table1 WHERE ID > @id ORDER BY ID Performance is the ...
2
votes
1answer
846 views

Evaluation edition expired

I have a client that has a recently expired SQL Server 2008 R2 Enterprise Evaluation Edition. I've been tasked to get it licensed and running SQL Server 2008 R2 Standard. How can I achieve this?
-2
votes
1answer
101 views

Handle vast amount of data in DB [closed]

Now my current database is working in SQL Server 2008 R2 and we are uploaded its only in 1 server. How can I migrate my existing database in to Hyper Table ? (My current database has huge amounts of ...
2
votes
0answers
104 views

os_buffer_descriptors blocking problem SQL Server 2008 R2

The following query : select (buffer_descriptors.datacache) as 'Data Cache (MB)', case when buffer_descriptors.datacache > 4096 then (((buffer_descriptors.datacache)/4096)*300) else ...
2
votes
2answers
759 views

Can I open a SQL Server 2008 R2 database in SQL Server 2008 R2 Express?

This question has probably been asked a dozen times but I couldn't find them here or at SO. Can I attach/restore a SQL Server 2008 R2 database to my local SQL 2008 R2 Express instance?
2
votes
1answer
461 views

SQL Server Memory for Backup Buffer

In SQL Server 2012 memory for backup buffer comes from buffer pool or non buffer pool (VAS)? Is this behavior changed between SQL server 2008 R2 and SQL 2012? EDIT: Does MAX Server Memory ...
1
vote
1answer
67 views

Is there any way to Restore a Database from newer version to an Older Version of SQL Server? [duplicate]

I am having a database backup file from SQL SERVER 2012 and i wanted to restore it on SQL SERVER 2008R2 . If we can’t restore a SQL Server 2012 database to earlier version what is the next best ...
1
vote
1answer
262 views

How to repair Microsoft.SqlServer.Types assembly

When I run a checkdb('mydb') this is the only error message printed. Msg 8992, Level 16, State 1, Line 1 Check Catalog Msg 3857, State 1: The attribute (clr_name=NULL) is required but is missing for ...
2
votes
1answer
942 views

Can you grant an Active Directory Group rights on a linked server?

I am trying to grant rights to an Active Directory Group on a Linked Server. I am unable to do it; it only allows me to grant rights to individual active directory users. Does anyone know how to ...
2
votes
2answers
170 views

Record versioning and promotion

Let's say we have this hierarchy: -World --USA ---WA ----Seattle -----Downtown ------1st Ave -------945 1st ave ------3rd Ave ...
1
vote
0answers
119 views

How can I generate a usage log? [closed]

I'm trying to automatically generate an events log report in SQL Server that records events including successful login, Create/Delete Account, An Account was Unlocked, Account locked due to maximum ...