All versions of Microsoft SQL Server (not MySQL). Please also add a version-specific tag like sql-server-2016 if that is relevant to the question.

learn more… | top users | synonyms (2)

0
votes
0answers
5 views

Why we can not individually get SQL-server web edition licence?

The SQL server web edition is only provided by server providers Why we can not individually get this licence subscription? I would prefer to subscribe directly from Microsoft's website by monthly ...
0
votes
0answers
7 views

Failed to create, join or add replica to availability group in SQL 2014

I have a 2 node FCI and a standalone SQL Server installation on a non FCI node. I have been automating the configuration/installation of FCIs, AGs, and DB Replicas which has worked fine up to now in ...
1
vote
0answers
7 views

SQL Server Table Design for Report - Is OLAP Schema Suitable

A work colleague is developing SQL Server database tables for a reporting project. Basically, the only activity on the table will be populating it from a ETL process (SSIS). He insists on creating a ...
0
votes
0answers
18 views

Calculate the current storage of a row

Is there any way to calculate the current storage of a row automatically ? I have calculated the average storage of a row doing: table size / number of rows. But this is the average. I need ...
1
vote
0answers
9 views

Mysql to MS SQL Migration and synchronization

Database migration from MySQL to MS SQL using SSMA tool is very nifty, however, I have one question around this. I have 2 MySQL Db's want to migrate to MS SQL, one sizes around 850 GB and another one ...
2
votes
2answers
109 views

Recommended memory configuration for many SQL Server instances per server

I am currently managing a server cluster for a SaaS system. We currently have 6 SQL servers running MSSQL 2008 R2. Each server is a quad core virtual machine with 16GB of RAM provisioned on a server ...
1
vote
0answers
24 views

SQL Server 2012 database stuck restoring

I'm trying to restore my development database DEV with a backup of my production database PROD. Every time I go through this process, the DEV database gets stuck in a Restoring state. Using the SQL "...
1
vote
1answer
17 views

Configuration.ini file feature codes

I have searched but not been able to find a list of the codes and descriptions available when using the configuration.ini file. Is anyone able to link me some information?
8
votes
2answers
694 views

If positive, sum all items. If negative, return each one

I am needing to find a way to SUM() all of the positive values for num and return the SUM() of all positive numbers and an individual row for each negative number. Below is a sample DDL: Create ...
-2
votes
0answers
27 views

SQL features and analytical tools backwards compatibility [on hold]

Is it possible to use the extra installed features and analytical tools that come installed with a more recent version of SQL Server 2012/14 such as SSRS and SSAS on data which is held on an old 2005 ...
-2
votes
1answer
42 views

Get all the queries executed in the last week in SQL Server [on hold]

How can I get all the queries executed on a SQL Server in last week.
1
vote
1answer
23 views

SQL Backup with Mirror option in maintenance plan

I need to do backup ALL databases on an instance and put them in 3 different locations on our network, so i found that you can use backup with mirror, so I set that up. I have a maintenance plan ...
0
votes
0answers
14 views

How to ensure NULLed encryption key columns are permanently erased

We are storing BLOB data (call recordings) in commodity cloud storage. These are encrypted and the keys stored in an SQL Server database. I am working on a project to implement "Retention", i.e. ...
1
vote
0answers
12 views

Retrieve data from OLTP MySQL to SQL Server DWH using SSIS

I'm running a BI solution currently reading data from an OLTP SQL Server 2008 to a SQL Server 2012 data warehouse. The ETL phase is implemented with SSIS and runs twice a day. This phase relies on a ...
-1
votes
1answer
29 views

SQL Server mirroring / failover alternative [on hold]

I am looking at building at reliable database with Microsoft SQL Server, with mirroring and automatic failover. The SQL Server here is standard version, not enterprise one so High Availability ...
0
votes
0answers
14 views

How to get the procedure names which has its underlying view missing in a database?

I need to identify procedures with broken dependency along with the list of view/ views or tables underlying under that procedure
2
votes
1answer
48 views

Sql Server: Two identical queries, one times out, one is quickly done

I see a very strange behavior on Sql Server I need assistance for from people who know a bit more about it than I do. For the first time I used the Sql Server Profiler which confirmed that it is ...
1
vote
0answers
35 views

Installing SQL Server version 10.50.4000 is failing

I am attempting to install SQL Server 2008 R2 version 10.50.4000 on a virtual machine running Microsoft Windows Server 2008 R2. When I try to install SQL Server, I get an error that, when I look it ...
1
vote
0answers
27 views

How can I have SQL Server send Job Notification alerts to an API

I am trying to get the notifications for a job out of my email and into a chat client(HipChat). So far my googling has been less than successful so I will put the question to the community: Is there ...
2
votes
2answers
50 views

Applying Transaction Logs to an existing Database

I am wondering if this possible, I can not seem to apply another transaction log. I have restored the Full database backup, the differential backup and my last Transaction Log WITH RECOVERY. If later ...
0
votes
0answers
41 views

Why can't a user in a group with the sysadmin role see any stored procs in SSMS?

A developer who is in a "Developers" group granted the server fixed role "sysadmin" on the development SQL Server installation is unable to see any stored procedures in a database - only the "System ...
1
vote
1answer
42 views

SQL Server - Timestamp datatype

I need some information on SQL Server timestamp. I found all the required information here. The article says The timestamp syntax is deprecated. This feature will be removed in a future ...
-1
votes
1answer
46 views

RESTORE DATABASE execution continues restore completed

Today, I faced a strange problem which didn't cause any error or downtime. I executed a query to restore a database. RESTORE DATABASE Database_Name FROM DISK='PATH\FILE1.BAK', ...
0
votes
1answer
23 views

Hash Match in Query has high cost and high number of excecutions

I have the following query: declare @jobID NVARCHAR(20) declare @dataGroup BIGINT declare @lastSyncVer BIGINT set @jobid='P-0001' set @dataGroup= 5637144576 set @...
1
vote
2answers
121 views

Choosing the right storage block size for sql server

There are many articles on what storage blocks size should be used for sql server e.g. Disk Partition Alignment Best Practices for SQL Server. The right blocks size should improve the performance of a ...
2
votes
1answer
48 views

Concurrent reads and updates

Let's say I have a table with 50,000 transactions that need to be processed in the background in the same order they were received. I have a Windows service that polls for transactions, picks them up, ...
3
votes
0answers
34 views

How to manage primary key value while multiple secondary server sync with primary server?

we have three secondary database server in different cities and one primary server. my question is i want asynchronous transaction commit to all three database but primary key data conflict occur ...
0
votes
0answers
14 views

Retrieve Subscription Data on subscriber

I would like to retrieve the subscription data from a SQL server subscriber. The data that I am looking for is the same data that is displayed under the Local Subscriptions folder under Replication ...
1
vote
1answer
34 views

Log and Data Drive Configuration in VM environment

Anyone have any good feeling on how to arrange the underlying disk configuration for a VM (Hyper-V) implementation of SQL Server vs installing straight up on the hardware? For a native Install, best ...
-2
votes
2answers
65 views

SQL Text data type deprecated?

I have read that Microsoft SQL Server has deprecated the text data type in favour of varchar(max). PostGreSQL already allows varchar (without a length) as an alternative for text. The question is, ...
4
votes
0answers
38 views

Horizontally scaling SQLSERVER, distributing the database with Sharding

I wanted to know if there is any way to distribute a SQLServer (I'm using 2012 version) database accross multiple nodes. I'm trying to compare READ queries performance between SQLServer and Mongodb. ...
-1
votes
1answer
24 views

How to list all the views and its base object which has unresolved table or other object referece in a paricular database

I want to list all the views which are made up of base objects. That base object is no longer available.Thanks
0
votes
0answers
35 views

DBMS comparison [on hold]

I am interested in getting to know differences in some of the DBM systems. I am mainly thinking of MS SQL, PostgreSQL and mySQL, but am also willing to dig into some other DBM systems, like Oracle. ...
3
votes
1answer
69 views

Why are Column Defaults on my User-Defined Table Type (UDTT) not being honored?

I create a table type in SQL: CREATE TYPE [dbo].[MyObject_TableType] AS TABLE ( [Name] VARCHAR(MAX) DEFAULT '', [Index] VARCHAR(MAX) DEFAULT '' ) I build a DataTable and populate it with ...
0
votes
1answer
31 views

sqlserver 2008r2 service pack incompletely applied on shared features

I have installed sqlserver 2008R2 service pack 3 on my instance. The installation went through successfully but the instance still shows version number of SP1 in management studio. When I start the ...
1
vote
1answer
35 views

When you drop or truncate tables in SQL Server do old data pages get overwritten with new data?

When you drop tables, does the empty space get automatically reused, or do you need to do some sort of maintenance to allow that space to get reused? Consider a situation where you drop and recreate ...
1
vote
0answers
26 views

Inserting rows into a temporary variable causes plan cache pollution in SQL Server

In my database I use stored procedures to insert multiple rows from a temporary table variable. Inserting data into the temporary table variable causes a new adhoc plan to be created prior to each ...
3
votes
0answers
78 views

.Net CLR Assembly not working in SQL Server 2016

I am migrating a database application from Windows 2008 R2/SQL Server 2008 R2 to Windows 2012 R2/SQL Server 2016 that uses a third party .Net CLR assembly to parse strings. The error I get is: An ...
1
vote
1answer
36 views

How to search by text in SSIS packages? [duplicate]

Is there a way to search by text in SQL Server Integration Services packages using T-SQL statement (or other language)? I want to check if certain table is used in any package as I am going to drop ...
1
vote
2answers
30 views

Access to folder is denied (log shipping)

i am trying to log ship from server A to B.I have done everything to configure log shipping but i try to run the job then at Server B while coping backup from server A gives me an error (can not ...
1
vote
1answer
44 views

Can't “Script Database As -> CREATE TO” with SSMS 2008R2 and 2016

I created a SQL Login (Login01), mapped to DB user (User01), member of db_owner database role. When connected locally with this user in SSMS, i try to script out the database (Script Database As -> ...
1
vote
0answers
35 views

Modify data using trigger

I have the following requirements in SQL server. I want to get updated/inserted values, edit it save to one column using SQL trigger. Say I have column named customer_name, when someone updates/...
1
vote
1answer
31 views

Expanding AlwaysOn Availability Groups with Replication Subscribers

I have query regarding "AlwaysOn Availability Groups with Replication Subscribers"... Can I add multiple publishers to a subscriber(which is part of availability group as a primary server)? In which ...
3
votes
2answers
59 views

Group by multiple columns with different members of the same hierarchy?

I have customer data in a table structure like this: customerID | productLine1 | productLine2 | productLine3 1 | 1 | null | null 2 | 2 | 1 | ...
-3
votes
0answers
13 views

Collect statistics for whole SQL

I am quite new to SQL Server. I would like to collect some SQL statistics for the SQL Server, including Compilation/sec, Recompilations/sec and Batch Requests/sec. However, I have no idea how to ...
1
vote
0answers
25 views

Master-master replication, is it viable? [on hold]

I'm trying to think of an architecture for my game server. Here is how it would work for two regions: A server instance runs on one machine For each machine there is a slave database to speed up SQL ...
1
vote
1answer
49 views

Subtract TotalExpense from BudgetAmount In Budget Table for a specific date

I have a Budget table which has the following columns: BudgetId, BudgetDate, BudgetAmount and a table Expense which has the following columns: ExpenseID, Date, ExDescrip, Category_fk, ExAMount ...
0
votes
0answers
36 views

Is there a way to prevent an key from ever being changed or dropped?

I worked with a dev once that loved to do this. Every so often he would de-fragment the primary key so that there was no gaps, I think he was a little too OCD. I need to map Microsoft SQL rows to ...
2
votes
4answers
193 views
+50

Database design for an exam

I am designing database for an exam, and I am stuck. I do not know how to do it. Here is the relevant information: Student answers 10 questions. Each question has 3 options (answers) and student ...