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)

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
0answers
20 views

Windows Server 2012 - Can't connect to database with PHP [on hold]

I have problems connecting to my database. We have bought a cheap used windows 2012 IBM Server which is hooked up in our network. It has PHP 5.6 installed as well as SQL. I've only worked with ...
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 ...
1
vote
0answers
48 views

sys.dm_os_volume_stats problem

Today I have been having quite an interesting issue, which I can't seem to fix. I am getting drive information for a Failover Cluster Instance SQL Server 2012. These drives are Volume Mount Points. ...
0
votes
1answer
29 views

SQL Server Configuration Manager returns remote procedure call failed

I open the SQL Server Configuration Manager and it returns remote procedure call failed. This is Windows 7 Ultimate version, SQL Server 2008 R2 Express version with advanced services. Previously I ...
2
votes
1answer
62 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 ...
0
votes
1answer
23 views

check if found specific record then find another record with the same group

I have a table Master table PROBLEM_ID PROBLEM PGROUP 1 Other Hardware Hardware 2 Error On hardware Hardware 3 PM Hardware 4 ...
0
votes
0answers
55 views

Efficient way to transpose large categorical column to one-hot table row

I have a varchar column containing ~ 8000 unique values and 500k rows. I need the column transposed so that the column headers are the unique values and the values in the rows are 1 where the row has ...
0
votes
1answer
18 views

Delayed transactional replication setup?

I will need to setup transactional replication for a big database. I use backup/restore to initialize the database because it's too big to use snapshot over slow network. So the following steps are ...
0
votes
0answers
7 views

Push all SQL Server changes to a non-SQL Server platform [on hold]

What is the best approach for capturing all the changes (all creates, inserts, updates, and deletes) and sending those into an external platform like Datomic for history/reporting/auditing? I'm ...
0
votes
1answer
17 views

What causes disk space growth from Informatica load onto SQL Server?

We've been dealing with huge disk growth on SQL Server from Informatica. After the load, the database grows to 2.4TB. After the database shrink, it goes to 1.05TB. What could likely cause this to ...
0
votes
1answer
28 views

SQL Server Full Text Search Engine is not returning consistent results

I'm working on an application that makes use of the Full Text Search Engine from SQL Server. In order to convert the user input into readable parameters for SQL, i'm using This very useful FTS query ...
1
vote
0answers
23 views

Inserts/updates are extremely slow with Merge Replication in SQL Server 2008

I got hired into a new company and they had merge replication already in place. They have had issues with it to the point I have to evaluate whether to keep it or replace it. The main issue is it ...
0
votes
0answers
12 views

maximum server memory setting in SQL Server [duplicate]

Just had a memory issue on a 64GB of RAM machine with SQL Server 2012 SP2. 3 running db engine instances, each limited to 16GB (16384). But noticed in Task manager that sqlservr.exe was at over 30GB ...
1
vote
1answer
28 views

SQL DATEDIFF coercion differences between databases on same SQL instance?

I have a data coercion mystery. I am seeing two different behaviors from DATEDIFF for the same query, and I cannot understand why. This is an extract of the relevant part of the query in question, ...
3
votes
1answer
46 views

SQL Server Differential Backup Bloat

I perform daily full backups of all databases. Differential backups are performed every hour. The issue I am having is that around the same time each morning, a few hours after the full backup, the ...
0
votes
0answers
22 views

Database in transition

I have a database that has been locked in transition for over 24 hours. I found a similar thread that discusses how to find the commands that are running but I do not know how to unlock the database. ...
-4
votes
0answers
35 views

Help on the pivot query [on hold]

I have created this with northwind database for test before I incorporate it with main database but I the pivot to get my column data which I use quotename function to get all ProductName which works ...
0
votes
0answers
27 views

When I can DROP an index safely? [duplicate]

I would like to get rid of unused indexes in my database. I have identified many indexes that are never used (seeks, scans and lookups are 0), and are being updated during DML operations. I used ...
0
votes
1answer
84 views

SQL server not using the memory allocated

We have noticed that for one of our SQL server with below configuration ,memory is not getting availed as allocated. SQL server 2005 SP4, 32 bit Windows server 2003 R2 SP2, 32 bit with 16 GB ...
0
votes
1answer
45 views

MS SQL Server 2012 enlarge database space

I tried to enlarge a database size of database instance on my MSSQL server 2012 . I manually added a new MDF file under database instance After restart on shrink database dialog I can see ...
0
votes
0answers
7 views

Moving Replicated & Partitioned SQL2005 Enterprise to SQL 2008R2 Enterprise

Our SQL2005 Enterprise has 4 databases which are all partitioned, each have 5 files and a handful of tables replicated, compatibility mode is 90. They are on an old Windows Server 2003 32bit machine ...
1
vote
1answer
169 views

How to set IN values on an update (SQL Server)? [closed]

Quick question, I did try to google but couldn't find an answer. I have 3 separate queries here, I want to do SET IN ('price1', 'price2', 'price3') but when I tried I got an error. How would I do ...
3
votes
1answer
26 views

Determine the server that sent a query

For the distributed queries, is it possible to determine the server that sent a query? For example, I have stats: SELECT DB_NAME(st.dbid), text, request_time, query_plan, ...
0
votes
1answer
27 views

What is the most efficient way to concat strings in declared table

I have this code: DECLARE @MyTableAS TABLE ( [Month] INT, Salary INT ); INSERT INTO @MyTable VALUES (1,2000), (1,3100); SELECT [Month], Salary FROM @MyTable; Output: I want to concat the ...
1
vote
1answer
21 views

What to do when Sql Server Agent refuses to run a Job Step that references a missing database snapshot

I have a SQL Server Agent Job creating a snapshot of my main database every minute: -- delete snapshot if it exists if exists (select * from sys.databases where name = 'mydb_snapshot' ) begin ...
0
votes
0answers
10 views

Control locking behavior for Snapshot Replication

I want to have snapshot replication of several databases into single one for reporting purposes. I choose replication because i need to publish just certain columns. I don't need transnational ...
0
votes
1answer
35 views

Processors: E5-4620 v2 vs E5-2620 v3 [closed]

We're debating between: R820 - E5-4620 v2 - 2.6GHz - 8 cores, 20MB Cache, 1333MHz max memory speed - max of 768GB ram - 8 core R730 - E5-2620 v3 - 2.4GHz - 6 cores, 15MB Cache, 1866MHz max memory ...
2
votes
2answers
50 views

How to query readonly replica in Always On cluster

We have an Always On "cluster" that consists of 2 servers (there will be more), so one is PRIMARY and other(s) is(are) SECONDARY. The idea was to dedicate SECONDARY as a readonly replica, so it would ...
0
votes
1answer
18 views

Scheduled Database Backup job fails due to lack of disk space

Two of my scheduled SQL Server backups failed over the weekend because of a lack of space. The C: drive has 25.3 GB of free space out of 400 GB. The primary space taker is SQL. 149.9 GB C:\Program ...
0
votes
0answers
26 views

SQL Server Function For Calculating Average Excluding Outliers

I'm looking for a function that will let me take an average and exclude outliers. Basically something where: 1, 2, 1, 2, 7 Would average out to 1.5. I'm going to implement this in a financial ...
0
votes
0answers
21 views

Estimating file growth when compressing tables

I have some databases that I will compress these days with the compression feature in SQL Server. I did this in a local environment with a 1GB database, and the MDF file grows 10%. In the production ...
0
votes
0answers
7 views

A transaction has been utilizing the version store for X minutes

For one of our servers we are getting below critical alert from Idera Diagnostic manager saying: A transaction has been utilizing the version store for 93 minutes on ABCKP1. The current version ...
0
votes
1answer
45 views

SQL query to return a columns with given range

I have a table tblItems with records having the same UniqueID and Description but with different dates and amount. Now I want to show the records by grouping them together using the UniqueIDs and ...
0
votes
1answer
32 views

Why/when does the SQL Server query optimizer use EQ_ROWS?

I'm trying to understand how exactly the statistics work. I've got a clustered index on my date. I can see a convert_implicit is executed when I run the following query. Don't know why it's doing ...
0
votes
1answer
18 views

Sql Server audit could not write to the security log

I am following the training kit for 70-462(Administering Microsoft SQL Server 2012 Databases), and stuck on Auditing SQL Server instances lesson. I have created new user in domain controller, assign ...
1
vote
2answers
182 views

Is it a good idea to include a value column (e.g. from measurements) in an index?

Is it a good idea to include a value column into an index for a table which has many million rows? For example a measurement table which looks kind of like this: CREATE TABLE measurements ( id ...
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.
1
vote
0answers
19 views

Replication throw an error after failover mirror partner is down in SQL Server

Received an error mentioned below after failover when mirror partner is down. Error : to fail over to a database which is not configured for database mirroring. code: 22037, text: 'Invalid ...
0
votes
1answer
31 views

Remove db_denydatawriter, db_denydatareader role from admin user

I have an AWS SQL Server instance, and I have accidentally given my user (and the only user I have access to) db_denydatawriter and db_denydatareader role on our primary database, which stops me from ...
0
votes
0answers
32 views

Public Role Access For All Users in SQL Server

If I'm not mistaken this comes configured like this by default. Our new DBA stripped this permission and broke ownership chaining. In my mind "public" means "everyone" and hence the permission and ...
0
votes
0answers
12 views

SSAS, Last Non empty broken

I have a straight-forward account fact table containing dimensions for Date, AccountOwner In SQL my fact table has column bookings (that can be negative for outgoing money and positive for incoming ...
1
vote
3answers
64 views

Excluding particular words from a string on a WHERE clause

I have a table that stores invoices and I'm trying to get stats out of it, unfortunately the table is poorly build and some crucial information is all mixed up on a nvarchar field, information such as ...
2
votes
1answer
51 views

sqlcmd -b doesn't exit on error

I'm confused how should I use -b parameter of sqlcmd. I'm trying to write simple automation script for my DB and wanted to stop execution in case of any errors. I'm using SQLServer 2008r2. For ...
0
votes
1answer
50 views

Best way to rank all the columns in a table and store those ranks in another table

I have SQL Server 2008 and a table w/ hundreds of thousands of records and about 50 columns. I run a sql statement like: Select rank() over(order by col1 desc) as Col1Rank, rank() over(order by ...
1
vote
2answers
68 views

How to enforce data consistency across one-to-one relationship in an inheritance hierarchy

Consider this design for a typical school database: Person: ----------------- FirstName LastName SocialSecurityNumber Phone Email Student: ----------------- Grade Teacher: ----------------- ...
1
vote
2answers
42 views

DAC connection error

I'm having a problem connecting using my dedicated admin connection in SQL Server 2014. I just wanted to test it out. I have DAC enabled in sp_configure. I have performed RECONFIGURE. I have ...
0
votes
2answers
36 views

Is it possible to connect to Oracle 9i data source in SSIS?

We're doing a migration from Oracle 9i to SQL Server 2008. So I'm thinking of a way to move the data from Oracle and I thought about SSIS. I'm new to this Microsoft's technology and I would like to ...
0
votes
2answers
65 views

Best way to automatically reset sequence/identity once a year

I need to have a identity/sequence/counter of some sort reset annually. What is the best way of doing this automatically (i.e. I don't want the front end application calling a stored procedure or ...
1
vote
1answer
71 views

SQL Server Availability Group Design Question/RFC

We are in the early stages of planning an upgrade/redesign of our SQL environment and I am seeking advice/feedback. The scenario: Current SQL Server 2008R2 EE on Windows Server 2008 R2, blade ...