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

Report Server: (rsInternalError) Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

i'm trying to log into localhost/reports and whenever i do so, i get the following error on the screen. An internal error occurred on the report server. See the error log for more details. ...
0
votes
1answer
20 views

Recover data from corrupt .mdf and .ldf files

The server was crashed due to some hardware problems. I was able to recover .mdf and .ldf files but when I tried to attach them an error message appears that. I am running MS SQL Server 2000 SP4. ...
0
votes
1answer
13 views

SQL Server 2008R2 - how to install replication components

I am trying to install the Replication components for SQL Server 2008R2, on technet website it says: 1.On the computer that is running IIS, insert the SQL Server 2008 R2, SQL Server 2008, or SQL ...
1
vote
1answer
51 views

InnoDB inserts 100 times slower than SQL Server inserts

I have a simple table with two columns: id (autonumber) and name (char(255). When I use C# to insert 100 records in a loop it takes about 30 milliseconds per insert. This is way too slow. So I ...
0
votes
1answer
43 views

SELECT with lots of left join is very slow in SQL Server 2014

I've got a query with, more or less, this structure: SELECT MAINTABLE_ID FROM MAINTABLE WITH (NOLOCK) LEFT JOIN TABLE_1 WITH (NOLOCK) ON TABLE_1_FK_MAINTABLE_ID = MAINTABLE_ID LEFT JOIN ...
1
vote
0answers
11 views

How to create a “match result” data type?

I'm building a football match table which contains one column "match result", which should consist of data like "3-1","0-0"... I'm wondering what kind of data type is best appropriate for it, varchar ...
1
vote
1answer
145 views

Why is casting a string to DATETIME not accurate to the ms?

Why does SELECT CAST('2014-11-28 15:06:02.165' AS DATETIME) return: 2014-11-28 15:06:02.167
0
votes
0answers
22 views

How to find what is causing large transaction log backups in MS SQL Server? [duplicate]

Most questions, including Why Does the Transaction Log Keep Growing or Run Out of Space? and other articles deal with people who have a transaction log file that keeps growing, usually due to them ...
0
votes
0answers
19 views

SSIS cannot access the file

I have a SSIS package which performs a few tasks using SQL Server Agent. First it executes a script task, then accesses Excel files, executes a SQL query and moves files to another directory. The ...
0
votes
0answers
14 views

How can I copy a database from Sql Server to Azure Sql Database?

The local database has settings that Azure will not accept and that we must keep in the local copy. I tried using SSDT and with that I could publish to a new database on my local Sql Server a schema ...
2
votes
2answers
96 views

SQL Server doesn't use expected index

I have the following query (simplified from an Entity Framework query, I don't have direct control of the SQL): SELECT TOP 15 HouseHoldingRuns.Id, ( SELECT TOP 1 ManCoId FROM ( SELECT TOP ...
2
votes
2answers
47 views

Adding around 200 rows in a table grows size of the table by 400kb where avg row size is 0.2KB

We are running into an issue where if we look at the avg row size (0.2kb) x number of rows (200) inserted in one of our table, the size should grow by around 40 KB. However the total used space has ...
1
vote
1answer
34 views

Need to Send a formatted HTML Email via Database Mail in Sql Server 2008 R2

My requirement is to create the automated email as ( A formatted HTML Email via Database Mail) The basic requirement has been completed where when the Job is triggered it inserts the data into a Table ...
1
vote
1answer
13 views

Get trigger query using query analyzer

I have a server in which there is no SSMS installation, and only query analyzer is available. And all I need to do is find the trigger information (basically trying to find out what that trigger ...
0
votes
1answer
27 views

Columns count in SELECT query and SQL Server buffer cache

Let's assume that I have a table with 30-50 millions records. It has ~40 columns. Currently when I request data it always requests all columns because of legacy ORM that we use. I know that if we ...
0
votes
0answers
21 views

How to import data to a table with 14 columns via BCP if my data file has less than 13 delimiters? [on hold]

Sorry for the extremely awkward wording in that question. I'll explain. I have a table with 14 columns in which i'm trying to import data to via BCP. My data comes from a text file. This text file is ...
3
votes
1answer
38 views

Help with indexing narrow table with many millions of rows

I have a good amount of experience with SQL Server, but not much with indexes and I fear I'm a little bit out of my depth in trying to figure out how to correctly structure a table that has 100+ ...
0
votes
0answers
11 views

Getting new and updated data with an archive column

I am trying to optimize an SSIS package that retrieves data from a very large transaction table that gets millions of new records daily. The plan is this: Archive column, smallint - 0=new (default ...
0
votes
1answer
31 views

How to move data from SQL Server to MySQL database

Our MSSQL database has a table that has about 4 million rows of data. My original plan was to copy it over to a MySQL database and place it in a more optimized format. For some reason, the people ...
2
votes
1answer
66 views

Query shows SELECT 0

I'm looking through the queries being executed by a third party application. The application was flagged as being slow by some of our end-users. It seems to INSERT records into a HEAP, then DELETE ...
-1
votes
1answer
85 views

EXCEPT operator vs NOT IN

The EXCEPT operator was introduced in SQL Server 2005 but what is the difference between NOT IN and EXCEPT ? Does it do the same? I would like a simple explanation with an example.
1
vote
1answer
50 views

SQL Server 2012 Setup error Attempted to perform an unauthorized operation

Below is the detailed error message. I Can't proceed with installation for the last one week? I've given full rights to registry keys that are associated to SQL Server but nothing has worked out. For ...
0
votes
1answer
44 views

EXEC Multiple procedures in parallel?

SQL Server 2008. I have several stored procedures. I would like to execute them all in parallel, not serially. How can I do this?
2
votes
2answers
42 views

Changing SQL Server service account passwords enterprise-wide

In the event of a DBA leaving an organization, what options can the surviving team members pursue to change passwords for service accounts portfolio-wide? While using Configuration Manager appears to ...
3
votes
1answer
79 views

dbcc memorystatus - buffer pool target on VM higher than max memory

I'm doing some digging into potential memory/configuration problems on a sql server 2012 SP2. I stumbled upon something that seems a bit strange in the performance counters as well as the dbcc ...
0
votes
0answers
16 views

preventing FullTextSearch from using wildcards

I am using FTS in a sql2008 sql server and had a user complain about some searches breaking. after root cause analysis we found only searches like U.S.A. fail because FTS tries to run wildcard matches ...
2
votes
1answer
16 views

How to get the spatial index in CREATE TO script?

Is it possible to get the spatial index using the create to script using SQL Server 2012? When I write out a table using SCRIPT TABLE AS > CREATE TO in Microsoft SQL Server Management Studio 2012, I ...
0
votes
1answer
25 views

Forget login from connection drop down menu [duplicate]

Recently I logged myself as a different user (testUser) but now that user seems to be persisted in the drop-down menu of connection dialogue box and I couldn't find a way of getting rid of it. Even ...
3
votes
1answer
67 views

resource wait SQLCLR - wait_type CLR_SEMAPHORE by SPID 0

UPDATE In the comments under Aaron's post is an extensive explanation why I want to find this out, please read it if you want to know. The system is running some ETL, reporting services and a ...
0
votes
1answer
38 views

SQL Server - Error 3202 during Restore

While attempting to restore a 4 TB MDF/data database with a 1.8 TB LDF/log file, I'm receiving the following error: Write on '???' failed: 1117 (The request could not be performed because of an I/O ...
1
vote
2answers
56 views

PAGEIOLATCH_SH and LCK_M_IX wait type

I'm seeking for a resolution into wait types I observe on one of my servers. I've been keeping wait statistics for a long time and can positively say that the top two are PAGEIOLATCH_SH and LCK_M_IX ...
-1
votes
0answers
35 views

Performance issue when we directly insert into #temp table

It might be silly one but I am new to query optimization so I want to know the which query has the better performance select * into #temp from MYTable or Create table #temp ( \\same ...
0
votes
1answer
31 views

Move/Copy unique entries only from TableA to TableB, if it's not in the destination table

I'm required to move every unique entry from TableA to TableB, it the unique entry from TableA is not already in TableB. Both tables look the same, they don't have any keys, but the combination of to ...
0
votes
2answers
26 views

SQL Server De-duplication Trigger

I have a table that contains columns of Country, City, Location, Description. Due to the size of the description field it's not possible to bind the four fields into a composite key to prevent ...
0
votes
1answer
26 views

Restore back up strategy for history tables

I have historical/log tables which are: very large holds data that is not rarely queried only inserts are performed (constantly, very often) I want to either compressed them or move them to ...
0
votes
0answers
28 views

SQL Query to get the Sales Qty of the Item and the its Returned Quantity for past 6 Months

I want retrieve the Sales Qty and return qty of the Items in the following format for the past six months. From two different tables,I TxnInvoice Table :Invoice header TxnInvoiceLine Table :Invoice ...
-6
votes
0answers
27 views

sql server …plz reply me asap [on hold]

I got requirement below. the records in table id record_name record_value 1001 price1 12 1001 price2 1 1001 price3 8 1201 price1 ...
1
vote
0answers
38 views

How to determine next value to use in composite key in SQL Server?

I am trying to figure out how to determine the next value to use when adding a new record to a table that uses a composite/compound primary key in a system with concurrent users. Suppose I have an ...
1
vote
2answers
37 views

How to pass output of one stored procedure to the input of another

I have a stored procedure which outputs @billingInvoiceIDOut. I want to use it as input in my next stored procedure. Can I just do in my second stored procedure INSERT INTO table ( billingID ) VALUE ...
1
vote
1answer
17 views

SSRS (2008 R2 to 2014) Migration Issues Running Reports

This is my first ever StackExchange question, so sorry if I something is off...I searched and found a rather helpful article that got me this far, but nothing I found addressed what I am currently ...
0
votes
0answers
18 views

Error after moving FTData folder

I needed to move my system data files from one logical drive to another one, and I successfully did this on SQL Server 2008 R2 for everything but my Full Text data files. When I start up the SQL ...
0
votes
1answer
11 views

How to maintain database ownership restoring across domains?

I am working with a vendor who is developing a SQL Server database outside of our domain. Occasionally, they need to deploy a new copy of that database into our domain by backing up their database, ...
2
votes
0answers
17 views

Scripting Local Policy Perform Volume Maintenance Tasks

I am working on an automated SQL 2012 install process on Windows 2012 R2 and have everything complete except for one task. My process launches secpol.msc but I am still required to drill in and ...
0
votes
0answers
27 views

Performance decline function vs command window

I have a function that I first wrote as a serious of commands. In the SQL command window when executed, those steps take about 8 seconds to return the data set. When those same commands are turned ...
0
votes
1answer
45 views

Massive joins Vs Updating temp table

I'm working on a query that essentially aggregates a slew of tables together. The first method I tried was to inner join all of the tables into one nice big query that pretty much looked like this: ...
1
vote
2answers
48 views

Domain-Admins can't connect to MSSQL Server

I have a MS Server 2012 R2 domain controller and a database server (W2K12R2/SQLServer2012). As allowed usergroup I have set the group "domain-admins" with sysadmin right. But somehow any ...
1
vote
1answer
35 views

how to define trigger scope variable [on hold]

My trigger is meant to calcalute the grade of a student base on the column value for every insert.But if a column value for the column is modified it the corresponding Grade should change. Currently i ...
0
votes
2answers
62 views

How to save and then restore permissions after refreshing a database

A database in a STAGING environment is overwritten every N weeks with a PRODUCTION copy that is more recent. What is the proper way to save and then restore users, roles and explicitly granted ...
3
votes
1answer
188 views

Verify if user has read access to a table

I'm developing an ETL, whose extract step must read data from a table. There are times that my user's access to that table is revoked. So, to avoid the ETL failing, before reading the table I must ...
0
votes
0answers
17 views

SSIS - This error is thrown by Connections collection when the specific connection element is not found

I am writing a package to upload result of query to FTP as CSV file. Package is working fine on local machine, but after transferring .dtsConfig and .dtsx on another environment it throws following ...