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
2answers
43 views

Identical SQL Server databases hosted in the same physical DB server

We have hosted similar SQL Server 2014 databases TestDB and TESTDB_Copy on the same physical server. The two databases are almost the same and there may be minor differences in the number of records ...
1
vote
2answers
26 views

Dynamically changing an order number to end in _ERR

I'm trying to update multiple orders at once instead of doing them one at a time. Is there a way to dynamically update them all at once? For example: I have 5 orders ABC, BCD, CDE, DEF, EFG. I need ...
2
votes
0answers
12 views

TDE prep: key/certificate backup for restores

I am working in a dev environment to better understand TDE encryption. I have it working along with backups and restores on another server. Had a few questions, I know I need to backup the certificate ...
1
vote
1answer
28 views

Query to get yesterdays data only for a specific time interval

Here is my where condition which I use for daily data but I've got to change the date everyday. WHERE X.stage = 'Approval' AND X.T_ExitTime between '2015-08-06 06:00:00:000' and '2015-08-06 ...
1
vote
1answer
24 views

Temporary permissions for DDL

I was hoping to use user impersonation to setup a user that has permissions to modify DDL, and only when I need to deploy DDL changes would I impersonate that user. This way I can use my windows ...
2
votes
1answer
59 views

Can't upgrade a SQL Express to SQL Standard

I have a 64 bit SQL Server 2008 Express R2 installed and I cannot upgrade it to a fully licensed 2014 Standard. When I try to update to SP 4, I get this issue: If I try to run the upgrade edition, ...
1
vote
1answer
17 views

use fulltext formsof inflectional to generate terms

Is there a way to use the FullText query components to generate the list of words in the FullText dictionary that are the inflectional formsof a word? This query would give me matches based on the ...
3
votes
2answers
303 views

Database Schema for Blank Database is large. 20MB

Is it normal for blank databases with just schema to be large? Or is there a way that I can reduce the size of the initial database?
0
votes
0answers
30 views

Tools to insert data faster in MySql database

I am trying to insert data from a flat file which is around 9 GB with about 15 million rows, I used SQl-server 2012 for that. I noticed data insert is much faster with sql server and it took around 30 ...
1
vote
0answers
10 views

Indexing AppFabric Monitoring Database

AppFabric is killing the page life expectancy and disk read metrics on my SQL Server. Does anyone know if I can add indexes to the AsStaging table or will that break things? There are some very ...
0
votes
1answer
25 views

Database structure for object with dynamic attributes

I am developing a proof of concept for a personalized email sending web application (like MailChimp, but with premade dynamic templates). The general structure is that I have my templates (different ...
-1
votes
2answers
34 views

error18470 when i try to connect to Database Engine

I am new in SQL Server. Wrongly I disabled my instance when I'd worked with Logins. Now I can not connect to Database Engine. Could you please help me?
0
votes
3answers
62 views

Sql Script takes much longer than estimated

In order to clean up a very large table holding binary Files in IMAGE Cols, I created the following sequence (based on this: Article) to get rid of a part of those image Bloby quickly: Select * into ...
0
votes
1answer
52 views

SQL Jobs Running - How to Kill

I ran the below query and it shows list of currently running jobs. However, in Activity Monitor none of these are running. How do I verify that these are/are not running? And how do I kill them? ...
1
vote
1answer
80 views

SQL get row based on condition [closed]

Hi all please see attached data below. I'm trying to get a row based on various conditions. scenario 1 - get highest row if no hours exist against it that has (setup + processtime > 0). scenario 2 ...
5
votes
2answers
60 views

Catch event of auto_shrink in SQL Server Log? [duplicate]

I am aware of the disadvantages of AUTO_SHRINK being configured on SQL Server databases. Recently, in a new environment, I discovered several production servers with the Auto Shrink option turned on. ...
1
vote
0answers
19 views

CDC and datamodel updates, best methodology?

We're about to start using CDC to track changes to a large number of tables in our db's. But since our datamodel is rather frequently updated, I'm wondering what is the best method for easily keeping ...
0
votes
1answer
33 views

SQL Server 2014 - Replica Server not available

I'm new to Sql Server and want to install SQL server alwayson clustering on my test environment. I followed the steps by this site: On each node I can connect to SQL Server but why my 2nd node is not ...
0
votes
1answer
29 views

sync many databases instance to one central database

I have four different SQL database instances which are installed on different servers. I want to sync all the databases into one central SQL instance i.e on (backup) instance which is on DR site and ...
3
votes
1answer
82 views

Is it possible to validate more than one parameter simultaneously into a Stored Procedure in sql?

On Microsoft SQL Server 2008 I realized a stored procedure which contains more than 20 parameters, in this SP I update or insert data into table which does not accept null values. I need to evaluate ...
13
votes
2answers
228 views

How are these two SQL Server rollbacks different?

In SQL Server 2008 R2, how are these two rollbacks different: Run an ALTER statement, for a few minutes, and then hit 'Cancel Executing'. It takes a few minutes to rollback completely. Run the same ...
3
votes
0answers
70 views

Very High wait time?

We currently have one production SQL Server 2012 Standard Edition , running on Windows server 2008R2 standard ( 32 GB RAM , 16 cpu). there are around 22,000 connection. the Max worker thread is ...
2
votes
1answer
60 views

Can Indexes mitigate untrusted Constraint

I using sp_blitz and found two tables that have foreign keys that is untrusted. tried to enable the trust with: ALTER TABLE MyTableName WITH CHECK CHECK CONSTRAINT MyConstraintName; GO But got this ...
0
votes
1answer
32 views

How do I drop the TIME portion from DATEADD?

I am trying to create some test data where each Employee has a random birthdate. I accomplished the randomizing part but it did not return result in the format that I want.. NOTE: the DateOfBirth ...
0
votes
0answers
39 views

SQL Server Profiler performance

I was wondering if I set a filter for just a particular user does it limit the amount of resource consumption used by sql server and does using a filter(depending on the filter) limit the performance ...
2
votes
3answers
51 views

SQL Server restore database with active connections [duplicate]

I am trying to run this SQL script on a SQL Server instance to restore a test database to a newer copy of the live database. RESTORE FILELISTONLY FROM disk = ...
3
votes
1answer
65 views

SQL server restore readonly file group without backup from .ndf file

We have SQl Server database with ReadOnly file group. Common file groups except readonly are backuped regulary. We restore the database from backup but readonly file group has not restored, its *.ndf ...
3
votes
4answers
140 views

Creating one stored procedure for all CRUD operations

I'm very inexperienced at writing stored procedures with conditional logic and I could really use some help. I have a data model with 7 tables and I'm trying to write a stored procedure for each table ...
3
votes
1answer
42 views

Remove mixed extents in SQL Server

In SQL Server you can make sure that the engine uses the whole extent for a single object (i.e. a table). I know how to enable the trace 1118, but that only applies to newly written data as I recall. ...
0
votes
1answer
52 views

Subquery returned more than 1 value. please help. i beg for mercy

This is may table. In one column there are daily dates and in the other is a classification. I use this query to count how many registers are in a month and which ones are C or D, but the subquery ...
-1
votes
1answer
61 views

Advanced SQL Database Administration Training Class [closed]

Can someone please suggest a good in-class (4-5 days) advanced SQL database administration training class? For example, below is the link for beginner or intermediate SQL administration training. I ...
7
votes
1answer
90 views

Low CPU Utilization but High Signal Waits

I have a server with 16 CPUs that is configured with a max degree of parallelism of 8 and a max worker threads setting of zero. For a given hour, my signal waits were 20% yet my OS CPU utilization ...
0
votes
1answer
54 views

Granting access to the Job Activity Monitor

I'm trying to grant access to the Job Activity Monitor. On my model office server I can create a new login and add it to the SQLAgentReaderRole role in msdb, and the id has access to the monitor. ...
1
vote
0answers
27 views

Why do Statistic recommendations disappear from DB Tuning Advisor after implementing recommended indexes?

Why is it, when analyzing a query through Database Engine Tuning Advisor, statistic recommendations disappear after some or all of the suggested indexes are implemented? For example, Query X suggests ...
0
votes
1answer
40 views

Import a sample database into SQL Server on AWS RDS free tier

I asked this on stack overflow but someone there suggested I try here as I might get better answers. So here goes... I'm signed up to Amazon Web Service (AWS) free tier, which allows you to run some ...
5
votes
3answers
630 views

If you don't rollback a transaction will the change still be made?

Say I am running a query begin tran update users set name = 'Jimmy' where name = 'john' If I DON'T rollback the transaction, will these changes still be made, will it throw an error or will it act ...
0
votes
4answers
53 views

Synonym with same name as linked server

I have a database that is used for reporting services. This database was created by a contractor who is no longer around. Buried all throughout the database are references to a single table on a ...
1
vote
1answer
244 views

Which version of SQL Server supports R

Microsoft buying REvolution results (amongst other things) in the integration of R in SQL Server 2016. Looking through the features supported by the SQL Server 2016 I cannot find R-Support. Does ...
1
vote
1answer
18 views

How can I insert procedure results from server 1 into table in server 2?

The goal is to link our website to the database. The database the website will connect to will be different then our production db. In fact, a separate instance of SQL. How can this be structure to ...
1
vote
4answers
154 views

WHERE NAME LIKE ( A SET OF NAMES )

I would like to drop all the jobs related to a set of specific databases. So I have added all the names into a table variable and I was trying to generate the scripts to drop the jobs. how can I ...
3
votes
2answers
42 views

Bitemporal Table with changing schema

I have to design a database covering business assumptions using MS SQL-Server 2008 R2. The current data of the tables will be exported to text files and used as input for a certain application. I ...
0
votes
3answers
68 views

Min(date) in sum case statement [closed]

I'm trying to write a statement where the settled date is less than the min(duedate) but I'm getting this error: Msg 130, Level 15, State 1, Line 32 Cannot perform an aggregate function on an ...
2
votes
1answer
52 views

Any SQL where clause performance similar to where 1=0

(i'm using SQL Server 2008R2 or later) For centralize manage and consistent, there is a view definition as follow: CREATE VIEW view_all_situation ( select null as src, tf.col1, sum(col2) as fee, ...
0
votes
0answers
34 views

Cluster Failure

Earlier this evening we received notice of failures in regard to the availability groups. Our plan is to fail it back over tonight, but we'd like to know the possible root cause of the initial ...
1
vote
1answer
285 views

How to resolve “the specified account already exists” error during SQL Server 2008 R2 installation

I recently had a problem while installing Visual Studio 2012 and SQL Server 2008 R2 on a new development machine. My installation sequence was Visual Studio 2012 then install SQL Server 2008 R2. An ...
0
votes
1answer
86 views

How to change the login for a database's dbo user?

I just finished a successful install of SQL Server 2014 Express, onto a domain-joined VM instance of Win8.1. During setup which I ran under DOMAIN\Admin I accepted the default configuration of adding ...
3
votes
1answer
51 views

dm_exec_describe_first_result_set_for_object for multiple result sets

Does a procedure exist to return metadata for all result sets in a stored procedure? Something like sys.dm_exec_describe_first_result_set_for_object, but for all result sets?
3
votes
3answers
109 views

Proper way to store a value that could be multiple different types

I have an Answers table and a Questions table. The Answers table has a value, but depending on the question, this value could be a bit, nvarchar, or number (so far.) The Question has a notion of what ...
2
votes
1answer
47 views

How can I optimize searching a column for a sub-string in SQL Server?

I have a very basic table: CREATE TABLE [obj_local] ( [obj_id] INT NOT NULL, [value] NVARCHAR (1000) NOT NULL ); This table stores a lot of data, and I need to search ...
2
votes
0answers
16 views

Does SQLBackup2Azure deletes the blobs as well?

I am not sure if this questions belongs here or in server fault, apologies if it belongs there. I am using MS SQL 2012 on an azure VM, and am planning on utilizing the SQLbackup2Azure tool to store ...