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

learn more… | top users | synonyms

0
votes
0answers
4 views

Recursive cte addition in sql

Root ACCCODE='00001' Root ACCPARENTCODE='0' 118 records are there and 1-8 levels I need to add the total value to the parent nodes.(totaling the total value to base to top levels). Can anyone help ...
7
votes
1answer
90 views

Purpose of owning a schema in SQL Server

I've been spending the last few days cleaning up database permissions, grouping them all into AD groups and removing orphaned users. This has lead me to a recurring scenario: Find a user that owns ...
2
votes
1answer
12 views

Searching SSIS packages for the use of specific tables

I have a number of SSIS packages, how can I search them to find the use of specific tables? I need to make tables changes and I am trying to assess the impact of these.
2
votes
2answers
5k views

Cannot use SQLCMD

I have started SQL Server in single user mode like this: c:\....\sqlservr -m When I try to connect to it with SQLCMD -E, I get the following error: Msg 18461, Level 14, State 1, Server SERVERNAME, ...
2
votes
2answers
76 views

SQL Server 2008 R2 Memory Pressure

My SQL Server has a weird problem. It seems it happens with the same matter. It always restarts after running a period of time(about one month long). And I used dbcc memorystatus to check the problem. ...
1
vote
1answer
25 views

SQL Server 2008 R2 copy Schema with all user security permissions

I have a prod support request from a high value user to adjust the settings on a company-wide dashboard so that he can manage a section of his workflow currently being excluded from these reports. ...
1
vote
1answer
58 views

What is the best option to easily fix fragmented heap indexes?

I have SQL Server 2008 R2 SP2 and also SQL Server 2012 SP2 on these servers. I have a database in which there is a lot of heap indexes which are more than 90% fragmented. What is the best option ...
0
votes
2answers
117 views

Sql server 2008 - server name changed

I have changed the computer name of the server where sql server 2008 r2 is installed. Old name was WIN-OUJEKRMGXXX and new server name is KASURDYYY When i configure replication following error ...
5
votes
1answer
3k views

SQL Server not starting at Windows startup but starts manually

My SQL Server instance's (SQL Server 2008 R2 Express) service has Startup Type = Automatic. The past couple of times I've restarted my computer the service has failed to start on its own, but it ...
1
vote
1answer
351 views

SQL Server 2008 R2, error creating file for FileStream

I'm trying to create a file to add to a filestream file group and I get the error: Msg 5120, Level 16, State 106, Line 1 Unable to open the physical file "d:\data\filestreamstore.mdf". Operating ...
0
votes
1answer
122 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
2answers
21k views

Cannot connect to my local instance

When I connect to my local server, I get this message A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not ...
0
votes
0answers
23 views

Re-installing SQL Server 2008 R2

I uninstalled SQL Server 2008 R2 and I am trying to re-install. I get this error. Here is the part of the Detail Landing Page.txt: 2015-06-26 13:07:42 Slp: Running Action: ...
0
votes
0answers
32 views

SQL Server Management Studio greyed out

We have an issue where Object Explorer will not display. When we choose View > Object Explorer, New Query, or press F8, we get: A generic error occured in GDI+.
0
votes
2answers
132 views

how to select top ID from join operation and staging tables

I have this inner join from staging and operations table jobsCode I want to select the top surrogate key ID and get the Start_Date from this join my problem is my Query rerunning 2 records original ...
1
vote
1answer
49 views

Alternatives to SQL Server TDE

Due to the high cost of SQL Server Enterprise Edition which includes the Transparent Data Encryption feature I am looking for an alternative product and have only found a couple of options: ...
0
votes
0answers
13 views

SSMS SQL Server 2014 - Selecting BackupSets for a Restore takes a long time

I'm having an issue with SSMS SQL Server 2014 (before and after SP1). When I go and select 'restore database' from the server and select a database, it just sits there and spin and spins. More than ...
2
votes
1answer
248 views

How to speed up looped INSERT INTO statements?

I currently use the following statement, for 10,000 rows it takes about 150 seconds. I tried removing the index on the target table, but this didn't help. Running the loop without the INSERT INTO ...
1
vote
1answer
614 views

Where is sp_MSrepl_getpublisherinfo in SQL Server?

In learning about replication in SQL Server and having problems creating a subscription, I looked at the definition for sp_addsubscription. It calls sys.sp_MSrepl_getpublisherinfo, which I cannot find ...
2
votes
2answers
5k views

Reducing database size to restore to SQL Server Express

I have a SQL Server 2008 R2 database, about 15 GB. I want to copy it for a partner, who is using SQL Server 2008 R2 Express. I deleted many tables and rows, and now I am sure that the data is ...
1
vote
1answer
49 views

SQL errors Microsoft.ACE.OLEDB.12.0 on dev box, but works on server

I'm inserting into a .xls spreadsheet from TSql code. Runs fine as an Agent job and on command from the server, but not on my dev box. Both complex and simple commands like: Insert into ...
1
vote
1answer
551 views

SQL Server connection failed for domain user from Mac OS machine

I have SQL Server 2008 R2 SP1. I am using connection string to connect to SQL Server. In connection string I am passing the driver path, server name, TCP port number, user name with which I want to ...
0
votes
4answers
438 views

Reading CSV files located on LINUX server and updating the tables in SQL Server Database

I was wondering how do we ingest CSV files located on a Red Hat LINUX server into SQL Server Database Table. I know we can write a Stored Procedure/Bulk Insert to read the files that are located on ...
-3
votes
0answers
67 views

How to recover a database? [closed]

I have a dead database. I looked at the backups but the last backup was made three weeks ago, then the operation was executed with an error and I didn't notice: - (mdf and ldf aren't copied by the ...
-1
votes
0answers
42 views

Need Review - Index Rebuild and Index Reorganize strategy?

I've written a block of code to design Index Reorganize and Index Rebuild strategy based on following recommendation. I'm considering only Clustered and Non-clustered index, not Heap. Does anything ...
0
votes
1answer
342 views

Configuring Reporting Services - ExecutionLogDaysKept

Is it possible to set Reporting Services options when Reporting Services is not installed on a server? Is this how a SQL Server instance used by SharePoint works? I'm a new DBA (very junior...), and ...
1
vote
2answers
87 views

How get the sum of two tables value using inner join

There are there tables the below image. My question is retrieve from each customers and get the sum of Invoice total due, Invoice Total balance in invoice table and return cheque total due and ...
4
votes
1answer
47 views

Understanding DBCC CHECKDB, Snapshots, and SQL Server Standard Edition

Understanding the circumstances under which SQL Server creates a snapshot when running CHECKDB, I followed a link to this KB that states: Database snapshots are available only in SQL Server ...
6
votes
7answers
45k views

Download SQL Server profiler for SQL Server Management Studio

How can I profile a SQL Server 2008 database to see code that's being executed on a particular database? I remember using the SQL Server profiler, but I don't see it in SQL Server Management Studio ...
14
votes
3answers
4k views

How can I add a rowversion column to a large table with minimal downtime

Using SQL Server 2008 and later, I want to add a rowversion column to a large table however when I simply ALTER TABLE [Tablename] ADD Rowversion [Rowversion] NOT NULL Then the table is unavailable ...
2
votes
4answers
1k views

Working Linked Server Query fails in sp_send_dbmail

Take the following example: EXEC msdb.dbo.sp_send_dbmail @recipients = 'me@whatever.co.uk' , @query = 'SELECT TOP 10 * FROM LINKEDSERVERA.DATABASE.dbo.TABLE' , @attach_query_result_as_file = N'True' ...
1
vote
1answer
40 views

MS-SQL: unique constraint case-insensitive

How do I add a case-insensitive constraint without altering the column collation? I've tried CONSTRAINT [AK_User_Username_UserType] UNIQUE (LOWER([Username]) [UserType]) and CREATE UNIQUE INDEX ...
1
vote
2answers
268 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 ...
1
vote
1answer
69 views

How do I determine the cause of a very small table responding to queries slowly?

I have a table that stores less than 3 registers, but the queries on it are very slow. This table has only a single Primary Key with 0% fragmentation. > DBCC SHOWCONTIG scanning 'MYTABLE' ...
1
vote
0answers
24 views

SSIS - The value could not be converted because of a potential loss of data, runs fine in BIDS, not on the server

The value could not be converted because of a potential loss of data I'm getting this error when running an SSIS package from a server job. Normally this is some sort of type error, but I can't ...
1
vote
1answer
24 views

When I implement database mirroring in SQL server it shows an error

When I click the start mirroring button it shows the below error message. When I try to connect the mirror and witness server through management studio it's connecting and working fine. The user I am ...
9
votes
2answers
99 views

Why isn't the primary (clustered) key being used in this query?

I have a SQL Server 2008 R2 table whose schema structure looks as follows: CREATE TABLE [dbo].[CDSIM_BE] ( [ID] [bigint] NOT NULL, [EquipmentID] [varchar](50) NOT NULL, [SerialNumber] ...
1
vote
1answer
128 views

Rerunning query in the same connection takes significantly longer

I am having a weird issue when a running a query that joins some semi-large tables (one table is about 2 million rows and the other about 21 million) together. What happens is the query does not run ...
-3
votes
3answers
197 views

SQL Server - Transaction Slowness [closed]

I'm seeing some behavior right now in SQL Server 2008 R2, and I can't decide if the server is underperforming or not. I've set up a test to insert an integer into a table, as defined below, 75,000 ...
3
votes
1answer
2k views

error in Execute SQL Task with parameter

I have an Execute SQL Task object in the Error handlers section of a SSIS package. What it does is inserting a record to a table using OLE DB connection. There is a value in the insert statement that ...
1
vote
2answers
38 views

Looking for application which will provide to determine project database growth and cost per day or month

I am using SQL Server 2008 for product development Currently application is live with 20 users now if I want to check how my database is growing and how much it will grow in month or year projection ...
5
votes
0answers
113 views

Identical query slower when searching for `T` rather than `F`

I have a legacy database that uses char(1) with 'T' and 'F' for boolean values. The only values in the field are T and F, of the following queries, the first is instantaneous, the second takes 30 ...
1
vote
3answers
57 views

Can't connect to remote SQL server from some machines

Our web server uses SQL Server 2008 R2. I have one development machine that connects to it with the IP address through SSMS and when testing my aspx website. I have several other machines though that ...
1
vote
2answers
26 views

Error creating database on new storage in SQL Server 2008 R2 Failover Cluster

Via the Failover Cluster Manager, I recently added a new disk to an existing SQL Server 2008 R2 Cluster, running on Windows Server 2012 R2. When attempting to create a database on this new storage, I ...
3
votes
2answers
44 views

Is there a less manual way of changing database properties for all databases in an instance?

I've recently audited a SharePoint server and found configurations that are against best practice. I'm hoping there is better and quicker way than right-clicking and changing these settings manually ...
4
votes
2answers
899 views

Right Trimming Binary Data in SQL Server

Scenario: I am inserting a string into a binary field (CONTEXT_INFO) and then later attempting to pull it out and convert it back to a string. When I do, the resulting string has a length of 128 ...
2
votes
2answers
25 views

Shreded system_health ExEvent not returning all node information

SQL Server is not returning all node information when I shred the deadlock XML from the 2012 system_health Extended event. When I run the following query SELECT ...
0
votes
0answers
47 views

Adding a second database to the same instance of a server

I already have a multi user software program running on Windows 7 work stations and the server is running Windows Server 2008 R2. I am trying to setup another program using the same server. The code ...
2
votes
1answer
1k views

SQL Server 2008 R2 cluster installation error

I was trying to install SQL Server Cluster (Launch wiard to install single node SQL Server 2008 R2 faliover cluster) .. The setup checks displayed no error and the installation started after all the ...
2
votes
2answers
115 views

Log Sequence Numbers in Full BackUp and Log Backup

My full back-up starts daily at 02:00 AM. It takes about 3 hours. I also take T-Log back-ups every 15 minutes (at 15,30,45 and 00 hours). I can verify the LSN sequences of T-log backups when I ...