Microsoft's SQL Server is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. It originated from the Sybase SQL Server codebase, which is why both products use the extension of SQL called Transact-SQL (T-SQL).

learn more… | top users | synonyms (2)

6
votes
2answers
870 views

SSRS appears to be ignoring Permissions set using Report Manager

I have setup SSRS on SQL Server 2008 in native mode. As an administrator I can login to report manager, upload reports and run them, and also use the Web Service URL to generate reports. I have also ...
5
votes
2answers
518 views

“Arithmetic overflow” when initializing SQL Server 2012 replication from backup

I'm initializing SQL Server replication from a backup, by following instructions from here: http://www.mssqltips.com/sqlservertip/2386/initialize-sql-server-replication-using-a-database-backup/ ...
4
votes
2answers
725 views

How to setup SQL active/active cluster to achieve Blue / Green instance switching?

I am wondering if anyone has ever used a multi-instance cluster (nee 'Active/Active') to achieve blue/green (or A/B) deployment scenarios, and what the best way of configuring it is (using SQL 2012 / ...
4
votes
2answers
513 views

Slow SSRS Report in production

I have an SSRS report which gets its data by firing a series of stored procedures. Now the report is timing out big time when run in production, yet when I pull down the prod database and restore to ...
3
votes
2answers
228 views

Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes

I try installing SQL2008R2 - SQL2012 - sql2014 2014-07-17 16:31:16.00 spid14s Error: 17190, Severity: 16, State: 1. 2014-07-17 16:31:16.00 spid14s Initializing the FallBack certificate failed ...
3
votes
2answers
216 views

SQL agent job, why is the job history showing that a step is still running even though the job has completed

I have a sql agent job that runs Powershell as its first step (there are 3 steps in total). I have set this step to have 2 retries, with a 3 minute retry interval. When I look into the job history, ...
3
votes
2answers
97 views

Replication with FileStream

I need to setup database replication (for high availability) on a database that uses FileStream. This is on SQL Server 2012 Standard Edition, so Always On or Peer-to-Peer replication is not an option. ...
3
votes
2answers
146 views

Enhance performance of update query

I have a query that is running against a table with 50 million rows. The phone number is stored as a CHAR(10) and an ETL process is changing the phone number if it has certain values. We are seeing ...
3
votes
2answers
97 views

Perform admin tasks (e.g. create database, add diagram support) in SQL Server when not connected to domain

My situation: I have installed SQL Express on my machine, while logged in as a domain user. I work remotely so I need to connect to a VPN to be on the domain, but I often prefer not to work while ...
2
votes
2answers
139 views

Table with 4 million records - different size and performance in development and production

At my company we use SQL Express 2008 R2, which supports databases up to 10GB. We have 2 databases with almost the same number of rows in all tables. But, one of them is 4.5 GB in size (which is in ...
2
votes
2answers
64 views

best possible index on this situation

create table #testing(id int, name varchar(50)) go Insert Into #testing Values(231, 'fasd') Insert Into #testing Values(232, 'dsffd') Insert Into #testing Values(233, 'xas') Insert Into #testing ...
2
votes
2answers
227 views

SQL server query is slow *without* including execution plan

I have just set up fresh installation of SQL Server 2012 on a new server and I'm experiencing very strange performance problems. Long story short, for some reason not including execution plan makes my ...
2
votes
2answers
251 views

What is the best way to get all data for a date range, plus the last event just before the range?

For this question assume the following: There is a table of events [Event] There is a table of employees [Employee] There is a table that relates the two [EventEmployee] (EventID + EmployeeID) Each ...
2
votes
2answers
549 views

Loop through all databases and remove all users

We are doing a conversion from one system to another which is requiring backup/restores. I am trying to create a process that will remove all users after the restore on the new servers as no user ...
2
votes
2answers
1k views

How do I add a MySQL linked server to SQL Server?

I am trying to add a linked server on SQL Server to MySQL Server. Note the SQL Server is installed on a separate machine with a different domain name. The SQL Server is 10.0.1.1 on old_domain.com. ...
2
votes
2answers
246 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 ...
2
votes
2answers
905 views

SQL Server Replication: “ALTER TABLE ALTER COLUMN” is not propagated to subscribers

We are running SQL Server 2008 R2 SP1 as publisher & distributor, and SQL Server 2005 SP3 as subscriber. The replication of schema changes is activated, and the replication has been running for ...
2
votes
2answers
576 views

Twice job results in sql server, last one is left in progress

I have the job MP - Create CSV which execute a package SSIS in sql server 2008, when I check for the job history I see the result at step 0, I expand and I have 2 results for the step 1. Fist result ...
1
vote
2answers
67 views

Proper Shutdown of SQL Servers in a Cluster

I was just wondering what the best approach should be for shutting down an Active/Active Cluster where both nodes need to be shutdown for disk maintenance. I was thinking of this process: Open ...
1
vote
2answers
28 views

Analysis Service Connection String

I use sql server 2012, and have multi cube. I can connect to my created cube from Excel (Data Tab\Connections) with windows authentication. How can set permission to SQL Server user on my cube. and ...
1
vote
2answers
152 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. ...
1
vote
2answers
261 views

SQL Server 2005 upgrade service pack via command line

I have been wracking my brain over upgrading sql server 2005 to sql server 2005 sp4. I have a script for installing new instances of sql servers for all versions and they all work wonderfully. Problem ...
0
votes
2answers
42 views

“WITH REPLACE” Restore failing with same logical filenames

Does using WITH REPLACE when the logical filenames match (to avoid using WITH MOVE) fail when the backup is from a different version of SQL? I have a backup from SQL 2008 but when I attempted to ...
0
votes
2answers
28 views

Build replication from backup not publication source

I have an interesting scenario I am trying to find a solution to. We currently have the current setup. ProductionDatabase (publisher) is the publication for transnational replication to the ...
0
votes
2answers
34 views

Get the table affected by the query

How I can get the table which is affected by the query? Example Update cust Set name = 'john' Where custid = '4001' Output: cust ___________________________ Insert into emp(fname, lname) ...
0
votes
2answers
74 views

View with left joins are very slow

I have a view based on join of 3 tables and and query on view is taking 10 mins to fetch the results. Can anybody help me in reducing the time taken to fetch results? VIEW CREATE view ...
0
votes
2answers
58 views

How to provision the SQL Server Agent service after SQL Server Edition upgrade

I have upgraded SQL Server 2008 R2 Express to SQL Server Standard Edition. After I have upgraded it, the SQL Server Agent was stopped. I have tried to start but it fails. Only when I have changed ...
0
votes
2answers
258 views

Problems during installation with Database Engine Service

Overall summary: Final result: Failed: see details below Exit code (Decimal): -2061893606 Start time: 2014-07-04 13:40:51 End time: ...
0
votes
2answers
160 views

Best way to Design Key,value pairs in relational database?

I have a table which has a list of all attributes that any object can have: attr_id attr_name attr_data_type ------ ----- -------------- I have a table [object_key] in which each ...
0
votes
2answers
187 views

New database server hardware and software inserts slower than old setup

We are upgrading our database hardware and software. The previous server is about 5 years old and is running SQL Server 2005 while the new one is SQL Server 2012. Every hardware component is faster in ...
0
votes
1answer
121 views

Database Mirroring and Snapshotting

AS part of a SQL-Server deployment we are doing it was proposed to use Database mirroring as a redundancy option as well as allowing for Reporting and MI to be detached from the Operational DB. the ...
0
votes
1answer
66 views

Best way set clustered primary key on a partitioned table?

I have the following table. create table T (K1 date, K2 int, K3 varchar(10), C1 int, C2....) The table will be partitioned by K1 (K1 has low selective. the data will be appended in the order by ...
0
votes
1answer
2k views

Error on changing ownership of database from Files Page in database properties dialog box

I've restored a database and created a new user(same user from which I've logged in) as db_owner. Now when I wanted to see database diagram got an error Database Diagram support objects cannot be ...
0
votes
1answer
347 views

Easy replication for SQL Server: Can it be set up like mongodb or Oracle?

This might look like a noob question... but it isn't. (I have 18 years of SQL Server experience, and three years of MongoDB experience.) The basic scenario is: -- Data Center has big, primary SQL ...
0
votes
1answer
308 views

Troubleshooting Mirroring Configuration

I am configuring database mirroring on SQL Server 2012. After configuration I am getting the following error when attempting to start the mirroring session: tcp server cannot be reached or does ...
0
votes
1answer
100 views

Implicitly (or proxy) convert to Nvarchar on incoming queries from legacy or 3rd party applications

We have a 3rd party application of which we don't have the source code. This application executes queries on our database without using the "N" prefix before literal strings. It does this in inserts ...
0
votes
1answer
84 views

Can scheduled and continous replication configurations exist side-by-side on the same master/slave servers?

Environment We have a core sql server cluster. This cluster contains some databases that get replicated to a load-balanced sql cluster of currently 3 servers. These databases are replicated each 12 ...
0
votes
1answer
1k views

Cannot create an instance of OLE DB provider “OraOLEDB.Oracle” for linked server

i am having a bit of a linked server problem . I created a sql server linked server and it's been working fine for last 2 years and suddenly not working . SQL Server Microsoft SQL Server 2005 - ...
0
votes
1answer
440 views

Selecting from an excel spreadsheet into SQL Server table

This question has been asked before but I tried giving full admin rights to the SQL Server user on C:\temp\ folder location (I am using Windows authentication into SQL Server Express). So for the ...
0
votes
1answer
573 views

What's a good way to model user authorization to hierarchical data?

I'm wanting to implement something that's basically an ACL in SQL Server (2008, we'll be moving to 2012). We're working with farm production information. We will have users who need to be authorized ...
0
votes
1answer
574 views

SQL Server: subscriber as publisher and hierarchical replication

In Oracle Streams one way replication from one DB to another is a basic block for many replication topologies (N-way, hierarchical, combined and so on), and changes could be captured and applied for ...
0
votes
1answer
183 views

Validate each parent intermediary is also a parent to itself

I want to validate where each parent intermediary is also a parent to itself. So this query should return invalid parents in SELECT if table has any. I need to do is first of all get all parents ...
-1
votes
1answer
2k views

Operating system error code 3(failed to retrieve text for this error. Reason: 15105)

I tried the following code to try and bulk load into a table in my SQL Server. BULK INSERT dbo.CentralRepository_Associate_Details FROM '/1CAAP/1413/data/csvtest1.csv' WITH (FIELDTERMINATOR = ';') ...
-1
votes
1answer
118 views

Stack overflow when parsing a lengthy query

I have a lengthy T-SQL Script. When SQL Server attempts to parse the script, it raises this error: Msg 565, Level 18, State 1, Line 106620 A stack overflow occurred in the server while compiling the ...
-1
votes
1answer
136 views

Change server name for SQLLocalDB instance

Is there any way to change the instance name of LocalDB of SQL Server 2012 from (LocalDB)\xxxx to just xxxx? I need it for an application that needs SQL Server DB instance name to be MSSQLDEFAULT.
-1
votes
1answer
779 views

Conditionally INSERTING columns into Table

using SQL Azure and like to insert a data to a table using dynamic Query. No of columns in select statment is dynamic. It will be based on some conditions. Ex: Salary, Code. How can I create a ...
-1
votes
1answer
509 views

FETCH API_CURSOR causing open transaction in tempDB

A select statement run from Oracle 11gR1 to SQL Server 2005 using Gateway leaves an open transaction in tempdb. The user is a datareader in Database XYZ. Not sure why the open tran is in tempDB when ...
-1
votes
1answer
514 views

In the domain of SQL Server backup, what is a backup set, backup device, backup media, backup media set, backup media family

I'm not a native English speaker and I've read the descriptions in BOL but still can't understand what exactly are they. Can anyone explain in an easy understand way? Thanks.
-1
votes
1answer
149 views

Tutorial in performance tuning

Where can I find about tutorial of performance tuning in SQL server 2012 or 2008 R2? The purpose is to improve my knowledge in performance tuning.
-2
votes
1answer
44 views

how to select column3 from rec1 value which is matched to column1 val in rec2

i am having following scenario : col1 col2 col3 10 2 13 13 4 14 14 5 15 15 6 16 form the above given table col3 value(13) in row1 is seen in col1 value(13) in ...