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)

1
vote
1answer
35 views

SQL Server Developer Edition 2012 or 2014 - Download

I've heard (I am pretty sure) that Developer Edition is free of charge and for downloading it registration is not required. But when I started looking for it today I could not find where to get it ...
1
vote
0answers
19 views

Calculate Num_Index_Pages for sizing design

I don't understand Step2 #8 Calculate the number of number of non-leaf pages in the index. I am not sure I understand the "Level". I have Num_Leaf_Pages=508 & Index_Rows_Per_Page=476 I don't ...
1
vote
2answers
42 views

Which method is better to drop all user connections before a restore Change to single user mode or Take offline the database?

When we restore a database from prod to dev which method is better to disconnect other connection accessing the database? I am on SQL Server 2008r2 1. Change to Single user mode use master Go ...
2
votes
2answers
34 views

The log in this backup set is too recent, but it's from before the last full backup!

I'm trying to restore a full database backup plus transaction logs to the most recent transaction log. I've set up transaction logs to ship out every 15 minutes. This setup was performed via the SMSS ...
0
votes
1answer
30 views

Is it possible to have a deadlock in this situation

I am working with SqlServer and Java. I have the following (pseudo) code : begin transaction For each item of a list select the row in db ... update the row End for end transaction ...
1
vote
1answer
110 views

Selecting rows from same name table from multiple databases in single result set

For some reason, I have a table Table_1 in n databases (same name and schema structure) instead of one single databases. The columns are like this: | Column_1 | Column_2 | I can select data from ...
2
votes
0answers
34 views

Merge row size overflow in SQL Server

The target table to which I'm trying to merge the data has ~900 columns. The code for the merge: MERGE TBL_BM_HSD_SUBJECT_AN_1 AS targetTable USING ( SELECT * FROM ...
1
vote
0answers
18 views

Trigger failing when called using sp_executesql

We have a recursive trigger on a table that executes AFTER INSERT. There is a check to ensure the trigger does not recurse more than 32 levels deep: IF(SELECT TRIGGER_NESTLEVEL()) >= 31 ...
3
votes
0answers
31 views

In Sql Server, is there a way to check if a selected group of rows are locked or not?

We are attempting to update/delete a large number of records in a multi-billion row table. Since this is a popular table, there is a lot of activity in different sections of this table. Any large ...
1
vote
1answer
40 views

In Sql Server what is the difference between VAS and Buffer Pool?

My understanding: In Sql Server, Buffer Pool is where all the Data/Proc/Log Cache, etc are located. Virtual Address Space is a logical location that refers to physical locations (either in RAM or ...
-1
votes
0answers
61 views

Connect to different databases on the same server [on hold]

I currently have two databases (SQL) on the same server, and I can connect to both of them locally. However, I cannot connect to one of them remotely, but the other works just fine. There's no SQL ...
0
votes
2answers
28 views

Insert data into table where 4 fields are the same and the fifth changes

I have a table with this structure: username varchar(35) startdate datetime enddate datetime saledate datetime packageid int for each username there are 5 packages, so one username has 5 records ...
-1
votes
1answer
23 views

Can I connect to default instance with computername\instanceid?

I create default instance on SQL Server 2012 Standard. When I set it up, I changed instance id from 'mssqlserver', which is a default value, to 'new_instance_id'. For some reason I want to connect ...
0
votes
1answer
27 views

Replication Configuration

I had a SQL Server 2008 Express edition as a Default instance and I am having SQL Server 2012 Evolution and SQL Server 2014 Evolution are my named instances. When I was trying to configure ...
1
vote
1answer
84 views

Slow Performance caused by Correlated Sub-queries & Clustered Index Seek

I'm running a query in which one of the tables (FIELDDATA) has nearly 400,000 records which is taking more than 2 minutes to execute. I ran the execution plan, and noticed that the clustered seek ...
2
votes
2answers
44 views

SQL-Server login-error of SQL-Server Agent Account

I have to manage a configured SQL-Server version 2005 and have setup Database Mail successfully - test mail works. Also I've changed the agent service to a domain user with (currently) domain admin ...
0
votes
0answers
14 views

Trigger copies history table: Will removing index lock options speed up the process?

I have a trigger applied to a table to write inserts and updates to a history table. That history table can grow pretty fast, and we want to see, if we can speed up insert operation a bit. The values ...
2
votes
0answers
29 views

Code required to make column not nullable

I have a table where I mistakenly allowed NULL values in a column: CREATE TABLE EXAMPLE ( EXAMPLE_ID INT IDENTITY(1, 1) NOT NULL, FOO_ID INT, CREATED_ON DATETIME DEFAULT ...
0
votes
1answer
23 views

querying a table to find minimum of average population across all cities [closed]

Consider the table (City) structure given below I need to query on this table: Query : the minimum of average population across all cities | Field | Type | +-------------+------+ | ID ...
-1
votes
1answer
14 views

Present Data in Presentation Layer after Removing the Temp Table [closed]

Inside of stored procedure you have the code create table #datatable (id int, name varchar(100), email varchar(10), phone ...
0
votes
0answers
25 views

Must declare the scalar variable “@Shopping” [closed]

DECLARE @Shopping xml; SET @Shopping = '<?xml version="1.0" encoding="UTF-8"?> <root> <row> <EmpID>1</EmpID> <EmpName>User1</EmpName> ...
5
votes
1answer
133 views

Sudden poor SELECT performance on a large table with existing indexes

My company uses a software suite in which the only thing I can truly modify is the database. We've always had performance issues (mostly hardware problems that we hope to resolve soon), but lately ...
2
votes
1answer
25 views

Determine which trace flags are set as a startup parameter vs. enabled globally?

Probably a quick question. We are looking to test out a couple trace flags as startup parameters in our environment, and while I know we can use DBCC TRACESTATUS to get global-scoped trace flags, it ...
0
votes
0answers
29 views

Retreive data EXEC SQL for temp table? [closed]

Is it possible to retrieve the data from usage of EXEC SQL and paste the data inside of a temp table? If yes, can you possible show me? I have a sample of data in this link ...
0
votes
1answer
34 views

Usage of ExecSQL in UDF?

Problem: is it possible to use sp_executesql or EXEC inside of a user defined function? Thanks!
0
votes
2answers
52 views

SQL Server 2008 R2 - Memory Allocation

We have a SQL Server 2008 R2 instance that is running on a Windows Server 2008 R2 Enterprise server that has been allocated 128GB of memory. However, it maxes out at 70GB. Can anyone tell me how I can ...
2
votes
2answers
43 views

migrate db's - best way to mirror or replicate a full database

I would like to mirror/replicate my databases to the cloud. The cloud is setup using VPN to my actual machine. I am a bit confused by the options I have and would like to get some light into it. My ...
0
votes
1answer
34 views

How to create a dummy Linked Server in SQL Server 2012

I have a database in two different production servers. I want to keep the schemas consistent between the two. One has jobs that call stored procedures that reference a Linked Server. The other does ...
4
votes
2answers
66 views

Shared connection pool in SQL Server and prevention of cross-database queries

Microsoft recommends that a shared connection pool should be used when running e.g. a SaaS software with one database per customer but with a shared codebase to prevent pool fragmentation: ...
0
votes
2answers
25 views

xml parameter to distributed query - difference between SQL2005 & SQL2012

I have inherited an old SQL2005 Enterprise database (on Windows 2003) that allows an xml parameter to a distributed query such as this: exec sp_executesql 'exec [server].[database].dbo.sproc ...
2
votes
2answers
110 views

Mixed SQL Server instances with static and dynamic ports

Let's assume someone has 5 different SQL Server instances running on a server. Initially all are using dynamic ports. Is it safe to restrict one of those instances to use the static port 1433 while ...
0
votes
1answer
31 views

SSRS email Subscription Not Working but local smtp is working

SQL SERVER EDITION- 2008 ENTERPRISE EVALUATION EDITION Operating System- Window Server 2008 R2 I've Created Local Smtp to use gmail id for Subscription of SSRS Report by Email as we don't have an ...
-4
votes
2answers
48 views

About Criteria in T-SQL Statement [closed]

Today the code is: select * from datatable where id is not null However, if I want to retrieve data of id I want to add another criteria in where statement I'm trying to improve the code below ...
0
votes
2answers
20 views

Unable to delete Log Shipping configuration

I need some help with my SQL 2005 server. I am trying to setup log shipping, I've successfully done so for all user-databases, except one. From the looks of it, it once had log shipping configured ...
1
vote
1answer
35 views

Migration from SQL Server 2012 Ent to SQL Server 2014 STD

We recently migrated from a traditional hosting environment with a back end of SQL Server 2012 ENT to an Azure VM running SQL Server 2014 STD. We did all the cool stuff with BPEs on SSD, etc. The ...
0
votes
0answers
38 views

Why does a table take more space in SQL server than in Teradata?

Is there any reason for a table to occupy significantly more space in SQL server than Teradata? The rows and data structure (columns, data types, data type length) are same, no extra objects like ...
0
votes
0answers
34 views

MSSQL Query table returned all rows but keep executing for long time

After database migration to a new server, my web application got many timeouts on particular table, I suspect there is some problem with the table. When I simply try a small table (of 3 thousand ...
-2
votes
1answer
36 views

Usage of COALESCE? [closed]

Today: table abc a b c d ---- ---- ---- ---- 1 null 2 3 null null null 7 null 5 null 4 1 = e 7 = b 5 = f 3 = i 2 = w 4 = o The Goal is to retrieve this ...
1
vote
1answer
40 views

CheckDB error 9003 SQL server 2014

Currently I am restoring SAN snapshots to another server nightly and running weekly checkdbs on that test server. The checkdb is throwing the following errors. The log scan number (105217:402:0) ...
1
vote
2answers
51 views

Unable to restore database backup becouse it is accessed by other connection

--first command use master Go -- second command ALTER DATABASE MyDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE Go -- Third command RESTORE DATABASE [MyDB] FROM DISK = ...
0
votes
1answer
21 views

SQL Server Express 2008 R2 Configuration Manager How To Find It

I run Windows 8.1. I installed SQL Express 2008 R2 over a year ago, but now need to access it from another machine. My problem is that the Configuration Manager (SQLServerManage10.msc) is not on my ...
2
votes
2answers
117 views

What is the recommended method to move databases?

I want to know the recommended method to move a database and data from dev to pre-prod to production in SQL Server. The databases are originally created in MS Access so some upsizing to SQL Server ...
0
votes
1answer
20 views

backup to NAS using sqlcmd

I've been searching for possible duplicates before asking but can't find anything. The closest was Backup SQL Server To Nas but not exactly my case. We have a brand new Synology NAS configured, due ...
2
votes
1answer
31 views

Is worth change databases collation from Latin1_General to Modern spanish, migrating to a new server

We are migrating 3 databases tables from Sql Server 2000 to a new sqlserver 2014. I know that for new databases the recommended Collation for spanish is Modern_Spanish. But what is the recommendation ...
7
votes
1answer
845 views

Why 0 is equal to empty string?

I need some help in finding why the following T-SQL statement returns 1 (true): SELECT IIF( 0 = '', 1, 0) I guess someone has change an ANSI option like SET ANSI_NULLS or something else that is ...
1
vote
1answer
23 views

AlwaysOn Listener and DNS

We have two DNS servers which replicate entried between them and we recently had a DNS issue where some of the listener addresses were removed from one of the servers only. At that point some of our ...
1
vote
2answers
35 views

Restore a newer filegroup backup

So this is my set up. In our data warehouse we have mostly tables that are filled with data from a ETL-process. We do not take backup of these tables since we have an option to do a full reset using ...
0
votes
1answer
43 views

Need to migrate a SQL Server 6.5 Prod to SQL Server 2012 in VM

We are planning to move our SQL Server shop to VM(VMware). We still have one SQL Server 6.5 in production. What would be my course of action/path to move/migrate 6.5 to virtualized SS 2012? It's the ...
0
votes
2answers
43 views

Database Engine vs. Database location

I'm a new user of SQL Server 2008 R2. We work in a Windows domain environment and I have access to multiple servers - by this I mean I have various drives mapped to various servers. I have SQL ...
0
votes
0answers
18 views

Timeout too long on SQL Server 2012 Linked Server to MySQL

We have a statement in a SQL Server 2012 stored procedure that is an INSERT into a temp table from SELECT using OpenQuery to pull data through a Linked Server from a remotely hosted MySQL database. ...