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
1answer
17 views

why does MS SQL Server return a result for empty string check when unicode string is not empty but has trailing space

select * from (select N'ግዜ ' as t) as t2 where t= '' the string 'ግዜ ' matches the above check, why is this?
0
votes
0answers
16 views

JDBC local MSSQL Server connection string

I have installed open source database management tool "dbeaver" and want to use it instead of Sql Server Management Studio. But there is a problem. I searched from the internet but somehow I could not ...
2
votes
1answer
26 views

How to archive a whole database?

I have a database that is not going to be used anymore but that needs to be kept around for a long time. I'd like to remove it from the production system. My goal is to save storage space when ...
0
votes
1answer
42 views

When Should You Shrink Your Database

I have read conflicting articles about shrinking a databases. Basically, our database grew 100% overnight from 150 gigs to 300 gigs b/c I believe it was with staging tables I put in. However, all the ...
1
vote
0answers
18 views

Uninstalling MS sql server 2012 issues

I'm trying to uninstall ms sql server 2012. But when I click Microsoft SQL Server 2012(64 bit) and choose remove option it shows like this. Then how can I remove the MS SQL Server 2012? Please help. ...
0
votes
1answer
20 views

Creating a global temp table in a SQL Agent job

I want to create a global temp table in a SQL Server Agent Job. Here is the code: CREATE TABLE ##TestEmployee(Id int, EmployeeName nvarchar(50)) When I execute in SSMS, all is well. I then put ...
0
votes
0answers
22 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 ...
-1
votes
0answers
18 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
33 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
44 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
45 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 ...
3
votes
2answers
69 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 ...
7
votes
1answer
102 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 ...
3
votes
2answers
40 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
14 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
41 views

How does RANK() work in this query? [on hold]

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
10 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
463 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 ...
-2
votes
0answers
29 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
22 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 ...
1
vote
1answer
24 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 ...
1
vote
1answer
33 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
18 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
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
28 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
102 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
12 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
17 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
29 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
39 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
48 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
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
55 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
117 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 ...