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
4 views

Intermittent RESOURCE_SEMAPHORE_QUERY_COMPILE Wait Stats

I'm trying to troubleshoot some intermittent CPU spikes that we're witnessing on one of our production SQL Servers. We're running SQL Server 2008 R2 Standard Edition with 28 GB RAM and 4 CPU cores. ...
0
votes
0answers
6 views

How can I find which records of `Data Warehouse` must be updated according to CDC captured changes?

I use SQL Server 2012 for OLTP Database and created a Data Warehouse in SQL Server 2012. I design Facts and Dimensions inside Data Warehouse with several Views. Some of my Fact table are made by ...
1
vote
2answers
29 views

Creating Clustered Index uses all my tempdb space. Why?

Table size = 44GB (no clustered index) Row Count = 122016576 Disk space allocated to tempdb = 200MB I wanted to create a clustered index for the table due to slow query times so I ran the ...
3
votes
0answers
27 views

Restoring differential backup creates DEFUNCT log file?

Here is my problem. I'm trying to move a database to a new server via a full restore, then cutover with a quick differential backup/restore. I can do a full restore without a problem, but when ...
0
votes
1answer
6 views

Oprhaned entries in msdb..sysjobactivity

In this question: http://stackoverflow.com/questions/18445825/how-to-know-status-of-currently-running-jobs This answer was proposed: SELECT sj.name , sja.* FROM msdb.dbo.sysjobactivity AS sja ...
0
votes
0answers
14 views

ODBC Crash try add a DSN System connection

I get the following error: odbc administrator a problem caused the program to stop working correctly. The windows will close the program and notifies you if there is a possible solution I get ...
1
vote
1answer
26 views

How Automatic Failover Works (AlwaysOn)

I'm going to use AlwaysOn technology on my servers, but it's some unclear points in the documentation: Automatic failover looks like Primary replica (A) unaccessable Secondary replica (B) becomes ...
0
votes
2answers
35 views

Index is not used with same Query on two Servers

I have two notebooks with same specs (same model, only ram is 24GB/32GB, same ssd) and exact same database and same sql server version. SQLIO is 3300 and 3600. Now I run a query on one notebook and ...
0
votes
1answer
12 views

Why can't I access IIS Manager on my server with Reporting Services installed?

I have a Windows Server 2008 Server running SQL Server 2012 (including SSRS). I've noticed that the site is intermittently slow on first run, and found this blog post about the cause and how to fix ...
0
votes
0answers
14 views

Optimistic Paging and separate query for COUNT?

I am using SQL SERVER 2012 FETCH/OFFSET after searching a lot that this will give me the best performance. But for paging to work, I need a Total count. There are 2 ways to achieve this. 1) Paging ...
1
vote
2answers
33 views

Order of maintenance plan tasks

Please could you tell me the correct order of maintenance plan operations in SQL Server? Check integrity Update statistics Rebuild indexes Is correct this order?
1
vote
2answers
38 views

Casting fails on subquery result

I'm in a bit of a pickle, I have to perform a query on a database with rather poor data quality. I am trying to evaluate a field which contains a date, but which was defined as a nvarchar. I thought I ...
0
votes
4answers
18 views

SQL Server 2005 database log size increasing drastically?

My friend works in a company (pretty small in size) that is running SagePro ERP which has a SQL server 2005 database. Now the problem is, the database size (over the period of 7 years) has increased ...
1
vote
1answer
34 views

SQL Server query disk write/sec limit

I am facing an issue which it looks like the server is hitting disk write limit. But after some test, I realize it wasn't. I was running the following query: DECLARE @MyCounter int; SET @MyCounter = ...
0
votes
0answers
13 views

Adding a new partition to the partitioned table is skipping the last filegroup

I have created one partitioned table and trying to add a new partition to that. I ran the following scripts to create a new filegroup and add a new partition to the table. But when I run the alter ...
0
votes
0answers
20 views

Table with multiple lookups

I bet this may be a duplicate and I'm not forming the question correctly, so feel free to point me in the right direction. Background We have a SQL Server with some legacy data. They're all ...
1
vote
1answer
37 views

Use of NOLOCK with CDC capture tables

In using SQL Server's Change Data Capture, I notice that the fn_cdc_get_all_changes_... table valued functions all use NOLOCK when querying against the capture tables. Is this a recommended practice ...
1
vote
1answer
26 views

Database cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery

I have received a database file and the instructions for loading it is to install SQL Server 2005 and then attach it using SQL Server Management Studio. After installing everything, I tried to attach ...
1
vote
3answers
39 views

Programatically copying data from table from offline database to online database

I have a local database and an online database. When i make an entry into my local database, it should also automatically make an entry in the online database. Can anybody tell me how I can do that?
1
vote
2answers
39 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
1answer
46 views

Clustered composite key high fragmentation and fill factor

I've recently made a table to hold the language preferences of my users as follow: CREATE TABLE [dbo].[systemUserLangPreference]( [systemUserID] [int] NOT NULL, [langID] [int] NOT NULL, ...
1
vote
1answer
26 views

Translating a query from MS Access to SQL Server

I have a legacy query from years ago that was written for an MS Access backend: DELETE category.* FROM category LEFT JOIN product_category ON category.id = product_category.categoryid ...
0
votes
0answers
19 views

sql server 2000: no longer able to expand jobs in sql server agent

In SSMS on a Windows 7 machine, while connecting to a server running SQL Server 2000, I am no longer able to click on the Jobs to see the Object Explorer Details. Previously, this was not an issue, ...
0
votes
3answers
64 views

Get first login-Hit on huge table

I have table like this in my database : ID (pk,int,not null) UserID (int,null) HitDate (datetime,null) Every time a user has any transacation in my application one hit inserted in this table. ...
0
votes
1answer
50 views

data warehouse design help

I'm struggling with the design phase for a data warehouse. It's not the traditional sales example you find on MSDN or all books etc. I've been tasked with creating an education data warehouse, that ...
1
vote
2answers
29 views

Location of #th iteration of a character or a word in a sql text field

How can I get the location for the #th iteration of a character or a word in a sql server text field?
2
votes
3answers
67 views

Listing indexes and constraints

I am looking at a SQL Server database for an application I have inherited. I have not looked into SQL Server for approximately 10 years, so please bear with me. The database table I am looking at has ...
0
votes
1answer
30 views

Slow performance of remote restore

Over the weekend, I was participating in a DR test. On the database side, that meant restoring backups from the production system to the DR system. What struck me as odd about the performance of the ...
1
vote
3answers
48 views

Inserting Serbian Latin and Cyrillic characters

I am using SQL Server 2012 Express as part of my asp.net development workstation. Database and table collation is set to Latin1_General_CI_AI. Attribute types are nvarchar(max) and varchar(max). ...
1
vote
1answer
34 views

Spy sql queries generated by an application

I need to know what SQL queries is generating some application. It is possible to see it in some kind of sniffer or what? I tried look in Management studio, but it shows only most expensivie queries.
-3
votes
0answers
36 views

SQL Server 2014 v/s NoSQL(MongoDb, RavenDb, CouchDb) [on hold]

Now SQL Server 2014 is out and there is lot of excitement regarding SQL Server 2014. How can we compare SQL Server 2014 v/s NoSQL(MongoDb, RavenDb, CouchDb)?
5
votes
2answers
182 views

Why do Indexed Views not permit non-unique clustered indexes?

I've been looking into using Indexed Views to increase performance on a few of our most commonly used views. However Indexed Views do not support non-unique clustered indexes which goes a little ...
1
vote
1answer
35 views

Full text index search returns an unexpected result

When I search TaxIdentityNumber using contains an unexpected result is returned; the result contains numbers that are not matched to query. For example, I search using '"5689523657*"' and get ...
0
votes
1answer
14 views

SQL Server distrb.exe & Logread.exe using huge SQL.txt file in C:\Users\sqlsrvacct\AppData\Local\Temp folder

I have the following situation: SQL server 2008 R2 SP2 I have both the Distribution and Subscription database in this server. LogReader agent and Distribution agent are running in continuous mode the ...
0
votes
1answer
38 views

TSQL change column constraint between null and not null

I am doing a exercise to change a column's constraint between null to not null. Table name: Production.categoriesTest. Please review my question and give me suggestion on what I did wrong and how to ...
2
votes
2answers
44 views

Running query progress indication

I have a query: SELECT * FROM OPENQUERY ( oracle, 'SELECT * FROM [some_table]' ) It runs for about 7 hours. I only need to run this query once to import data into a new system when we ...
0
votes
1answer
34 views

Execute stored procedure in another server from sql agent job

I am trying execute stored procedure in remote server in sql agent job using sqlserver 2008 r2 select * from openquery([1.1.1.1],'exec [DB_Name].[dbo].[sp_ProcName]') Or EXEC ...
0
votes
0answers
22 views

Can't connect SQL Server through firewall [duplicate]

I know this has been asked before however I've tried all the solutions presented and it still does not work. I am attempting to connect to a SQL Server 2008 running on a Windows8.1 machine through ...
1
vote
2answers
28 views

Can I get OSQL if I install SQL Server Client Tools?

We have some legacy .bat scripts full of osql commands to existing SQL Server instances / dbs on our network. We've tried running the .bat scripts from our app server (Win Server 2008) but get the ...
0
votes
0answers
21 views

SQL Server DTC: is it possible to automatically replicate data that is created on Oracle DB?

I have a SQL server with a table that is spec'd exactly like a table in an Oracle database. What I would like to do is automatically copy the data from the Oracle table to the SQL server table... Is ...
0
votes
0answers
13 views

MS Access: ODBC Err 3146 - Timeout related?

I have an AccessDB that queries that appears to function as expected under light loading (i.e., 1-2 users), no errors, SQL Server returns the desired results. We tried to test using 8 concurrent ...
0
votes
0answers
13 views

What is the best way to backup and restore a subset of data within a subset of tables in a sql server database?

I need to be able to periodically backup & restore a subset of data in a sql server database. I only want to backup data in the tables which contain a specific column name - column1 (for example) ...
2
votes
1answer
45 views

Making a recursive CTE like query, but for many records

I have a table with a hierarchy ( with a recursive parentID column), for one record, I know how to get the last parent record, with the following code : declare @Id integer ;WITH CTE AS ( SELECT ...
5
votes
1answer
70 views

SMS Suggesting covering all columns in an index?

I'm still a bit newer to indexes and database works, so I may very well be missing something obvious. SMS suggested adding a covered index to one of my tables that Indexes on the column I believe ...
4
votes
1answer
40 views

Reference assembly in sqlproj not being deployed to server

I have a Visual Studio 2013 Database Project which takes a modified version of fastJSON as a reference. I selected Generate DDL in the reference properties as shown in this screenshot: And in the ...
1
vote
0answers
39 views

RETURNING syntax with multiple columns

Again, another question related to the answer of the one there: Insert with OUTPUT correlated to sub query table So I ended up with this query, written for SQL Server: CREATE TABLE tempIDs ( ...
0
votes
1answer
71 views

Sort Totals By Months

I need to show the count of all rows grouped by month and then pivot it Appreciate an easy solution for that Or alternatively if someone can help me fix this I've used dynamic pivot query DECLARE ...
0
votes
1answer
20 views

Create a certificate with a private key

Reading this answer I have a question about it: How can I create a certificate with a private key in my app database?
-3
votes
0answers
53 views

Fastest way to Restore 50TB DB [closed]

I am trying to find out if there other ideas as what the fastest way is to restore a 50TB DB.
2
votes
2answers
575 views

“Cannot insert the value NULL”, but there is no NULL values!

This question follows the answer of my other question there: Insert with OUTPUT correlated to sub query table The Person.LastName column has a NOT NULL constraint. When I execute this code: CREATE ...