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

learn more… | top users | synonyms

0
votes
1answer
23 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
30 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
25 views

use outer apply to find for each row have a record based on first result from detail table

i have a two table there's PROBLEM for problem (as master) with group of problem and PROBLEM_LOG (as detail) PROBLEM PROBLEM_ID PROBLEM PGROUP 1 Line Down ...
0
votes
0answers
46 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
30 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
votes
1answer
24 views

Retrieve user Permissions on a database [on hold]

Please could you provide me query that shows user(John Felix) permissions on a server\database.
1
vote
2answers
32 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
43 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'') ...
1
vote
2answers
24 views

SQLOS Resource Monitor and QueryMemoryResourceNotification Win API

Here's some info about SQLOS and the Resource Monitor I found from Jonathan Kehayias: As a general rule, SQL Server will use as much memory as you can give it, and it will not release the memory ...
0
votes
1answer
14 views

Slow Full Text When using multiple full text searches

Thank you in advance for your help. I have been going bonkers. We recently made a change to our code by adding an additional contains to the below query. This has had a real negative impact on ...
3
votes
2answers
233 views

RAID10 vs. RAID5 for data files

We are trying to evaluate the potential performance improvements that could be gained by switching an existing applications .mdf files to a RAID10 LUN vs. the existing RAID5 LUN they are living on ...
0
votes
0answers
28 views

How many cores does my SQL Server need? [closed]

I have a SQL Server 2008r2 ("SQL1") running very well on a virtual machine with 8 cores. I have a license for 8 cores, that I could use for any version of SQL Server. Now, I want to setup a new server ...
0
votes
1answer
21 views

Clustering a heap by date in stead of unique composite key

I've been working on improving the performance of a large reporting database. This database is 2TB in size, and one of the larger tables is a heap with three non-clustered indexes on it. The ...
0
votes
1answer
26 views

Best practice to recover an CRUD statement to a linked server if connection is lost

I am looking for the best practice for the following scenario. We have a CRM in our company. When an employee updates the record of a company, there is trigger that fires a stored procedure which has ...
0
votes
1answer
59 views

Recommended number of index for a table

I've a table with many columns (~70) which contains computer's configuration. It contains approximately 50 000 rows. This table is very requested and all these column too. I use to run the following ...
0
votes
0answers
17 views

Load data into central database

We have 150 databases at different locations. These databases need to be move into central database. currently, i am using transactional replication, but facing lot of issues. are there any other ...
0
votes
2answers
29 views

connect to server with IP address running sql-express instance through sql-management studio

I have my VPS server in a remote location with ip address 172.16.11.2 (for example) having two instances of sql-server express running. one instance is Microsoft SQL Server 2008 R2 (SP2) where I ...
2
votes
1answer
63 views

Differentiate SQL Server Express from SQL Server installed in a server

I own a VPS server and I was told SQL Server 2008 R2 Express edition was installed on Windows OS 2008R2. When I opened the SQL Server configuration manager I saw this: I thought I should see only ...
1
vote
0answers
32 views

SQL Server 2008 R2 Cluster Service pack 3 fail to failover node

I have a SQL Server R2 cluster on Windows 2008 R2 boxes, and today i was to install SP3. I installed it without any errors and rebooted the passive node. When i then try to failover to the passive ...
0
votes
2answers
51 views

Regarding Reindexing [closed]

Can we find the performance stats pre and post reindexing, if yes, how? And does reindexing affect database size? If so how and why? We're using SQL Server 2008 R2.
0
votes
0answers
13 views

Disk space requirements for SSAS database backup

Can anyone advise how I can gauge the disk space required to backup a SSAS database? I have a database that is as per SSMS estimate 146GB in size. The contents of the data folder amount to 143GB and ...
0
votes
0answers
13 views

Oracle Linked Server on SQL partial insert

I am using OpenQuery to insert into OracleLinkedServer, inside a while loop from while ( @id <= @cnt) Begin INSERT INTO OPENQUERY ( MY_LINKED_SERVER,'SELECT COL1, ...
2
votes
1answer
56 views

Add linked server from SQL Server 11.0.5058 to SQL Server 10.50.4000 [closed]

I tried to add a linked server running on SQL Server 2008 R2 (10.50.4000) from SQL Server 2012 (11.0.5058). I keep getting this error: The linked server has been created but failed a connection ...
0
votes
0answers
26 views

BCP Errors: String data, right truncation; Unexpected EOF

OK... I give up. I have been struggling with trying to import a semicolon-separated file (field1;field2) with BCP for the past two days, but I only have been getting these errors: Starting copy... ...
0
votes
0answers
43 views

Why does this plan cost even though there are no rows?

I execute a Batch-Operation. The whole execution needs about 60s. The following statement needs 75.6% of the whole Batch-Operation: update WW_Pos set LieferantID=null where LieferantID in (select ...
0
votes
1answer
40 views

Joining two inline functions, slows considerably when filtering on second function

ok, So I have two inline functions that run quickly enough alone. When I left join them like this select * from Function1(-1) F1 left join Function2(-1) F2 on F1.key = F2.key When I run this I ...
7
votes
1answer
293 views

Sudden increase in Page Writes/s after patching / rebooting

I was given a SQL Server 2008R2 to run, but my DBA skills are rusty after some years away from the day-to-day ops, so please bear with my (somewhat) silly questions. This SQL Server is running in ...
3
votes
1answer
82 views

I can backup my SQL Server 2008 R2 but can't restore from the very same folder

I ran a backup into a folder. The Network Service has full control access to this folder. The backup process didn't work until I granted that account full control. I try to restore that same file but ...
0
votes
1answer
27 views

Enforce a column as unique based on another column value

I want to make a column unique, but only if a different column is a specific value. Consider the following table: CREATE TABLE [SampleTable] ( [Id] INTEGER NOT NULL IDENTITY(1,1) ...
2
votes
0answers
51 views

Log shipping and SIMPLE recovery mode

We have the need of implement the log shipping in our production environment, and we'll do this on the next weeks. In the other hand, we do monthly a "cleanup" of the database: we set the database in ...
2
votes
4answers
40 views

How can I compare the schema of two databases?

Is there a way to find the differences in two SQL Server databases (schema only). One is local and the second is at a customers site. We are experiencing problems with crystal reports running some ...
1
vote
1answer
24 views

How to use a variable for object's owner (schema)?

In Oracle we can use a variable instead of the object's owner. The value of this variable will be prompted by Oracle when the scripts starts. Something like CREATE TABLE **&owner.**MY_TABLE. I'm ...
0
votes
1answer
17 views

DELETE statement execution cancellation in SSMS

I ran a delete statement with wrong WHERE condition (which deletes all records from table instead of just 10 records) but during execution I found it and CANCELLED the execution in sql server ...
3
votes
2answers
418 views

Efficently Remove 90% of a table's data

I am working on a process to remove 90% of a table's data because only 10% is needed for testing. The best way I have found includes storing 10% of the table's rows into a temporary table. Current ...
0
votes
1answer
56 views

How To Migrate From MSDE 2000 to SQL Server 2008R2 Express

We need to migrate a MSDE 2000 database running on a Windows Server 2003 Standard to a Windows Server 2008 R2 running SQL Server 2008 R2 Express (fresh install). The database is small, about 300MB. ...
6
votes
1answer
98 views

Can SQL Server be configured to backup to a network share through a separate NIC?

We're in the process having our SQL Server instances backup to a network share, but our network admins want to try and divert the bandwidth from the backups through a different network segment. I was ...
2
votes
2answers
124 views

Insert/Update Stored Procedure

My database model is quite simple. I have the following tables: Monitor, Computer, and Monitor_Computer_Map as my mapping table for a many-to-many relationship between the other two tables. I have a ...
2
votes
0answers
77 views

Is it possible to have different authentication mode for SQL Server Database Engine and corresponding SQL Server instance?

I have installed the x64 SQL Server 2008 R2 Express with default settings and run MBSA 2.3 Microsoft analizer (using default settings too). Tried on clean Windows 8 installation (not 8.1) and Windows ...
0
votes
1answer
38 views

Converting date string to SQL DATETIME - hopefully without a udf

I am taking an Excel file that has dates in different formats but one of these formats is giving me some grief when I try converting it or casting it to a SQL DATETIME. For example: Thu Oct 16 ...
0
votes
1answer
35 views

UPDATE statement not consistent when including NULL fields

So I want to append Field B to C, then copy field A to B and set field A to "Awaiting update". I have written the following code UPDATE Notes SET /* append previous month to notes */ Notes=Notes + ...
2
votes
3answers
61 views

Bulk change Agent Jobs' definition to “Quit the job reporting failure” from “Go to the next step” On Failure

There are agent jobs with multiple steps in our servers and all their steps are defined as "go to the next step" "On Failure". So, even a job step fails, operator doesn't get notified because ...
5
votes
2answers
130 views

Sporadic execution time causing timeouts [closed]

We have a table with 100 million records holding 24 hour worth of data of our clients' customers actions (actions which are performed on 3rd party sites and replicated from there to our server) The ...
0
votes
1answer
57 views

How comes that login with no rights cam give himself db_creator?

I just created a new login using the GUI, which generates this script: USE [master] GO CREATE LOGIN [tester] WITH PASSWORD=N'tester', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF ...
1
vote
2answers
31 views

To what extent can we monitor jobs/suspended queries as DBO

Short Background: I work for company A, at company A we have a DBA that should not be. When we are tasked with items for troubleshooting which require quick turn around, it generally takes quite a ...
0
votes
1answer
73 views

More Best Practices To Updating Large Tables?

I know there are a number of topics on this question, but I'm always seeking more insights. I have a large table with a billion+ records. The amount of records could be reduced and archived, but the ...
0
votes
3answers
33 views

Move result of a query from one server to another table on another server

What are my options in moving result of a query in one server to another table on another server? Data contains ~400.000 rows so it won't be a quick one. (Both of them are SQL Server 2008 R2) ...
1
vote
1answer
59 views

Database backup issue in SQL Server

For security reason I always took back up of my database. I took full backup in each month. And differential in each week. I used to save each back up file in different name. I lost my latest full ...
0
votes
1answer
23 views

SQL Server: get meta-Info about LDF-File

I am trying to get the timestamp of the first entry in the .LDF file of a live database. Is there any way to do this? I already get the first LSN in the LDF using SELECT MIN([Current LSN]) FROM ...
1
vote
0answers
44 views

Trying to add a NULLable column to a table with over 90 million rows takes a very long time

I have been trying to add a NULLable column to a table with over 90 million rows. ALTER TABLE <TableName> ADD <FieldName> INT NULL; It is taking a very long time (been running for over ...
6
votes
1answer
341 views

SQL Server: Create default stored procedure as and when a new database is created

I am using SQL Server 2008 R2. I need one simple stored procedure to be created by default, as and when a new database is created in SQL Server. How can I achieve this? Assume the stored procedure to ...