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

Performance impact of IF @@TRANCOUNT > 0 COMMIT TRAN

I'm dealing with some performance issues on SQL Server 2012. The client application indicates that the SQL time to load a page is over 2.5 seconds with a total loading time of more than 3 seconds. For ...
0
votes
0answers
10 views

TCP Provider: The semaphore timeout period has expired

In Sql Server2008 R2 and Windows Server 2008R2, when I start Replication I have this error: TCP Provider: The semaphore timeout period has expired Please help me to solve it... Thanks!
1
vote
0answers
23 views

SQL Server 2008R2 to SQL Server 2012 Install

I'm trying to upgrade one of my SQL servers from 2008R2 to 2012 and I'm getting an error popup within a couple of seconds from starting the setup The Error is TITLE: SQL Server Setup failure. ...
0
votes
0answers
13 views

SQL Server: Importing snapshot of tables from linked server

I need to import 2 tables from a linked SQL server. So far, the following code has been successful: SELECT * INTO MyTable1 FROM MyLinkedServer.MyDb.dbo.MyTable1; SELECT * INTO MyTable2 FROM ...
2
votes
1answer
40 views

Several Foreign Key and Cascade Delete SQL Server

In SQL Server 2014, I'm trying to add CASCADE DELETING (I want to set field to null actually, but is the same ) on 3 FK. If I add a Cascade Delete in one relationship, it works fine. If I add more ...
-1
votes
0answers
36 views

What is the implication of restoring Multiple Diff backups on SQL Server

As I know now, if I do a differential backup with SQL Server I am supposed to restore the full backup with NO RECOVERY and just the last diff with RECOVERY. I had a full backup, and 4 diffs, each from ...
2
votes
1answer
48 views

Split database to fit on SSDs

I have a database that's about 3TB in size and want to upgrade to SSDs. The SSDs I found that are reasonably priced are only 512GB so I'll need to purchase multiple drives. What are some ways to ...
6
votes
1answer
98 views

Trace Flag 4199 - Enable globally?

This may fall under the category of opinion, but I'm curious if people are using trace flag 4199 as a startup parameter for SQL Server. For those that have used it, under what circumstances did you ...
2
votes
2answers
31 views

Which Log should I start backups with?

We have log backups running every 15 minutes and nightly fulls/diffs (fulls are once a week per DB, but they are spread across the whole week for load balancing). Lets say for a particular DB I have a ...
0
votes
0answers
13 views

Data Sources are not visible through browser or through SSMS when connect to reporting server but are visible in SSMS

As above I have a reporting server and currently when I browse to bizvm01/reports Data Sources are not visible through the browser. Reports are visible and they work. When I connect to bizvm01 using ...
1
vote
0answers
21 views

Find all tables that are related to a view recursively sql server

I have a view-A that is comprised of other views (View-B View-C) and I would like to list all the tables that used by View-A (which would include the tables used in View-B and View-C). When I use ...
1
vote
1answer
40 views

How does RANK() work in this query?

I want to delete duplicate rows from a table. I have searched for the query online, and found the following sample: DELETE FROM dbo.LeadsContacts WHERE Sr_No IN ( SELECT Sr_No FROM ( ...
0
votes
1answer
9 views

Where to look for Agent history in Replication?

In SQL server 2008R2 replication configuration, "agent history cleanup distribution" job by default runs every 10 minutes and deletes any historical data older the 48hrs. If I increase the retention ...
0
votes
1answer
13 views

Periodically update a table with new records from another server

I have databases on two different servers. I need to regularly retrieve new records from a table on server A, and process them in order to use them to update a table on server B (with a different ...
-1
votes
2answers
27 views

database Compatibility 90 to 100 changing causes any problem

We are planning to change Compatibility level of databases from 90 to 100. Would this cause any impact on application side? If yes then please guide me, what steps or measures we need to look upon ...
2
votes
2answers
457 views

Why is it truncate table, and not simply truncate?

Upon reviewing some of our code a colleague posited that he was annoyed at always having to write TRUNCATE TABLE when there is no real other usage for TRUNCATE. Googling this, I indeed can not find a ...
-3
votes
1answer
42 views

how to insert into tables in sql server? [on hold]

I have a query to create "governorate table" like this: CREATE TABLE governorate ( ID int IDENTITY(1,1) PRIMARY KEY not null , name varchar(50) UNIQUE , ); then I want to insert data in ...
-3
votes
0answers
27 views

sharepoint DBA. [on hold]

What exactly makes a 'Sharepoint DBA' different from a normal SQL DBA. What are the differences in competency and responsibility? What are the differences is daily database support?
1
vote
0answers
21 views

Installing instances of older versions of SQL Server

Are there any issues to be aware of when installing an instance of previous version of SQL Server AFTER installation of a newer version? e.g. Installing 2008 to a server with an existing 2012 ...
0
votes
1answer
23 views

Database Role seemingly lost permission

I have a windows application that accesses a SQLServer database. Sometime within the last week or so it stopped working on other peoples machines with an exception thrown indicating they did not have ...
0
votes
1answer
31 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
17 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
41 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
33 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
26 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
100 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 ...
1
vote
0answers
16 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
28 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
37 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
46 views

Connect to different databases on the same server

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
23 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
0answers
23 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
54 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
41 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
28 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 [on hold]

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 [on hold]

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

Must declare the scalar variable “@Shopping” [on hold]

DECLARE @Shopping xml; SET @Shopping = '<?xml version="1.0" encoding="UTF-8"?> <root> <row> <EmpID>1</EmpID> <EmpName>User1</EmpName> ...
5
votes
1answer
115 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
23 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
27 views

Retreive data EXEC SQL for temp table? [on hold]

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
33 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
49 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
39 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
30 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
50 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
24 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
105 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 ...