This tag is for SQL Server 2008, major build version 10.00.xxxx.

learn more… | top users | synonyms (1)

2
votes
4answers
57 views

SQL Server 2008: how much RAM memory should SQL Server use in a 8GB RAM server?

We have SQL Server 2008 and 8GB RAM in a customer, hosted in a Windows 2008 R2 SP1, and consider the following amount of free memory: and consider the following running programs: Scenario: ...
1
vote
2answers
78 views

How to get statement which causes error 3609?

How to find out which statement causes error Msg 3609, Level 16, State 1, Line 4 The transaction ended in the trigger. The batch has been aborted.? The code seems very straight-forward: -- 1. Check ...
1
vote
1answer
16 views

Problem Getting Simple Replication to Work in SQL Server 2008/2012

I can't resolve a problem with replication. The publisher/distribution side seems just fine, but when I subscribe and view in the replication monitor I always get this error: "a required privilege is ...
5
votes
3answers
6k views

Get Job id OR Job name from within executing job

I have a central DB that I write job outcomes on all my servers back to. I pass 3 parameters via powershell in a SQL job back to a sp on the central server that verifies the job should be running at ...
0
votes
1answer
33 views

PAGEIOLATCH_SH and LCK_M_IX wait type

I'm seeking for a resolution into wait types I observe on one of my servers. I've been keeping wait statistics for a long time and can positively say that the top two are PAGEIOLATCH_SH and LCK_M_IX ...
0
votes
1answer
17 views

Forget login from connection drop down menu [duplicate]

Recently I logged myself as a different user (testUser) but now that user seems to be persisted in the drop-down menu of connection dialogue box and I couldn't find a way of getting rid of it. Even ...
2
votes
2answers
31 views

SQL Server Management Studio: how to parse stored procedure code and check if table columns exist?

I'm afraid that SSMS won't parse table columns within a stored procedure. When you click in Parse option SSMS says that parse is completed, even when a procedure is selecting a column that does ...
0
votes
1answer
59 views

unable to bring database online from recovery pending

I am trying to bring a SQL Server database online and accessible that is in Recovery Pending state. The SQL Server service uses an Active directory account that is a domain administrator and a ...
0
votes
1answer
6 views

Why different users from same login group can not access the database objects?

I have SQL login group as "SC_NT\xxxx" in server. There are multiple users using this login group to access database objects. User "A" can able to access db objects from .net application. But when ...
0
votes
1answer
33 views

self referencing tables with SQL and entity framework

I have many tables in a database and the tables are nearly identical. There are limitations currently on what objects reference other objects. For example I have company,contact and project. Contact ...
-1
votes
0answers
46 views

Stored procedure generating duplicate rows

I believe I have a logical error, poor coding or both in the handling the selection of user emails based on their User.ID and a replaceable config value of Mail+1234@domain.com where 1234 is the ...
-3
votes
0answers
20 views

Clearing log files

How to clear/Shrink the Log file of a database when the database is in stand by mode. How to make a database from recovery mode(normal mode/with recovery) to standby mode.
2
votes
1answer
125 views

Checkpoints and Logging

I'm working on getting full grasp of logging architecture. Please correct me if I'm wrong here: I understand that a checkpoint occurs (also lazywriter) to write the dirty pages in the memory to the ...
2
votes
2answers
80 views

Error on DDL statement never invokes CATCH

When I try to close the SS Management Studio window below is the error I understand that DDL statements are implicit COMMIT and the below WARNING message is because BEGIN TRAN never COMMIT or ...
1
vote
2answers
73 views

Auditing the View Server State permissions on Server

We noticed that one of our servers has permissions granted to "all" users for "view server state". I am wondering if there is a way to audit the DMV's used by the user(s) on a regular basis as this ...
1
vote
1answer
79 views

Print the execution time on messages Pane?

How I can print the execution time of each query on messages Pane? For example the Select * from tbl1 runs for 10 mins then Select * from tbl2 runs for 15mins and so on.. Select * from tbl1 Go Select ...
1
vote
2answers
349 views

Editing built-in templates in Management Studio

I'm running SQL Server Management Studio 2008 (10.0.5500.0) and was attempting to edit the built-in template "Create T-SQL Trigger (New Menu)". I open the Template Explorer, right-click the template, ...
0
votes
1answer
105 views

how service sid operate under the covers?

This question is out of curiosity and it left me in confusion whether service account as any role to play in sql server startup and shutdown? Can anybody explain how sql server 2008 Service Sids work ...
2
votes
2answers
291 views

Migration to databases Domain Users do not have access

I migrated databases to new servers, however the applications that were previously used with the databases are failing to load. I have changed the connections and etc. The jobs also seem to be ...
0
votes
0answers
42 views

Size of Table Now vs 2 Years ago [on hold]

I am trying to Analyze the growth of the data/tables within a database. I would like to analyze how much Data is currently present in a table and how much there was 2 years ago. There are date fields ...
1
vote
1answer
215 views

SQL Server replication conflicts after migration from 2000 to 2008

I got a suggestion over at Stackoverflow to post here....greatful for any and all help. Please bear with me I think this might take a while to explain. For many years now my company has hosted a ...
2
votes
2answers
41 views

Multiple Instance with different service packs in SQL Server

I would like to install a Default instance with SQL Server 2008 R2 RTM and I want to install another named instance with SQL Server 2008 R2 SP2. Is this possible?
0
votes
1answer
131 views

How to generate replication snapshot without locking tables

When I reinitialize subscription and generate new snapshot it locks all tables and makes the database unusable for a very long time (never waited it out). Is there anyway to do this without locking?
0
votes
2answers
176 views

can we transfer sql database backup from one server to another server directly?

I want to transfer sql database from one server to another server directly, instead taking back up of that database and copy that back up in another server and then restore it. Please tell me, Is ...
3
votes
2answers
1k views

SQL Server Restore DB from MDF file, lost LDF and DB was not cleanly shutdown

My dev DB server was formatted by some admin without my knowledge. Thankfully I had mdf file kept in some other drive but ldf was in its default location. Since I don’t have DB backup I am now left ...
0
votes
0answers
50 views

Two instances sharing same system database?

I have a situation that I encountered with one of my clients, that I have never seen before. They are running SQL Server Express 2008 R2. There are two instances of SQL Server installed - a default ...
0
votes
0answers
34 views

Any caveats using SQL Server 2008 CDC off replicated tables?

Main TRX System ---- Replicated to ---> "Archive" --- CDC/ETL --> Some NOSQL DB... For performance reasons we never run any ETL off the main transnational system only off the archive. I ...
0
votes
3answers
46 views

Login failed for user even though it has read access

I have a SharePoint server which is using service account "spsharepoint". For some reason this user has started giving 'Login failed for user DOMAIN\spsharepoint' when I checked SQL Server logs. ...
-1
votes
1answer
36 views

Use of MAX data types when over >8000 characters. (error exceeds the maximum allowed for any data type (8000) [closed]

I have a column in one of the table of my SQL Server database which can have more than 8000 characters. As maximum allowed character length for a column in SQL Server is 8000, how can I store the data ...
-1
votes
1answer
18 views

Protect SQL Server Express data file

I need to protect a Microsoft SQL Server 2008 data file (.mdf) against restoring/attaching on another machine. I'm aware of TDE or Transparent Data Encryption but unfortunately this option is not ...
0
votes
0answers
36 views

Secondary File Group is not online in SQL Server

In my database there are two file groups PRIMARY and SECONDARY. The .ndf file is in SECONDARY file group. I just wanted to backup only the secondary file group. So ran following T-SQL... BACKUP ...
0
votes
0answers
44 views

Table design for optimum performance

For example let's say I have to create a table called Employee with columns EmployeeID, Name, DOB, Address, DepartmentID[FK]. So I create the table as follows with a primary key and a nonclustered ...
4
votes
1answer
686 views

Windows native backups makes SQL Server think that databases backup has been done

community. I've Windows Server 2008 R2 which hosts few virtual machines. One of machines is Windows 2008 R2 server with SQL server 2008 R2 Express installed. Here's the thing: I wrote a script that ...
2
votes
4answers
8k views

No Maintenance Plans Folder in SQL Studio 2008 R2 [closed]

A client has SQL Server 2008 R2 installed on a Windows 2003 R2 32-bit server. Under Management in SQL Studio 2008 R2, there is no maintenance plans folder. It is not under Management --> Legacy ...
3
votes
1answer
3k views

SQL Server 2008 unable to backup due to Failed to flush the commit table to disk in dbid 11 due to error 2601

I tried to backup the SQL Server 2008 database using the following code: BACKUP DATABASE [DataStore] TO DISK ='E:\SQLServerDatabase\DataBasebackUpOct302012.bak' and I get the following error: ...
0
votes
0answers
35 views

Create a trigger to increment value before insert if duplicated [closed]

I want to create a trigger to increment value of my VisibleNo field if it gets duplicate value. My Application is my multiple users at same time . When at first suppose two users open application it ...
0
votes
0answers
17 views

Problem when querying audit file when audit is enabled

I'm trying to audit DML operations for a specific principle on a database. For this, I configured Audit under Server -> Security and Database -> Database Audit Specifications and enabled both of them. ...
0
votes
0answers
44 views

SQL Server : error 15208 Level 16, State 1, Line 1

Trying to Backup a certificate from SQL Server causes this error: Msg 15208, Level 16, State 1, Line 1 The certificate, asymmetric key, or private key file does not exist or has invalid format. ...
2
votes
1answer
53 views

Get a specific row from a TSQL common table expression

I have this tsql code to recursively get the whole workgroup hierarchy for a specific workgroup (WgID 283 here): WITH GroupList(WgID,WgParentWgID) AS ( SELECT WgID,WgParentWgID FROM ...
1
vote
2answers
168 views

Improving a search query

I have a query for search function. Basically search function allowed user to define what they "have" and "want". Then this query will filter out all the possible result which created by other user. ...
3
votes
1answer
167 views

Updateable Subscriptions: Rows do not match between Publisher and Subscriber

I have transactional replication with updatable subscribers set up in SQL Server 2008. It has 3 subscribers and 1 publisher. I had to setup replication again due to some errors related to the database ...
6
votes
1answer
4k views

How and when does SQL Agent update next_run_date/next_run_time values?

I've been working on code in T-SQL to add new schedules to a SQL Agent job using the sp_add_jobschedule proc in the msdb database. When I add a new schedule (typically a run-once at a specific ...
0
votes
2answers
41 views

RAM usage is increasing in database server with time [duplicate]

RAM usage is increasing in database server with time. When we restart the SQL services it take around 4 GB but after day or two it increases to 11-12 GB and even further. Application is hosted on ...
2
votes
3answers
3k views

SQL Server mirrored database is stuck in recovery mode

I have a database that is stuck in recovery mode for few days already. There are multiple threads about this, but the solutions there don't work for me. Here is what I tried already: RESTORE ...
1
vote
2answers
50 views

Deciding on a replication strategy

We have several dozen small-medium (<1Gb) databases on our SQL Server 2008R2 (Standard Edition) server, with one or two more being created every month. The server itself is a fairly well spec'd box ...
2
votes
1answer
77 views

Will FILLFACTOR = 99 slow down my SQL Server?

I have read this today: Closely related to index rebuilding is the fillfactor. When you create a new index, or rebuild an existing index, you can specify a fillfactor, which is the amount the ...
12
votes
3answers
4k views

When a previously-fast SQL query starts running slow, where do I look to find the source of the issue?

Background I have a query running against SQL Server 2008 R2 that joins and/or left-joins about 12 different "tables". The database is fairly large with many tables over 50 million rows and about 300 ...
0
votes
1answer
41 views

View permission to SQL Server logs on SSMS GUI

I would like to give a user see SQL Server logs from GUI, not through xp_readerrorlog. I was just wondering if this was possible? Thank you.
14
votes
5answers
49k views

Restore SQL Server 2012 backup to a SQL Server 2008 database?

Is there a way to restore a SQL Server 2012 database backup to a SQL Server 2008? I tried to attach file, it does not work.
1
vote
2answers
61 views

Defragmentation of Indexes - Higher value after defragmentaion

I am trying to defragment indexes on SQL Server 2008 using ALTER INDEX--REBUILD. After defragmentation some indexes have fragmentation percentage value greater than its before defragmentation value. ...