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
0answers
10 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
6 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 ...
6
votes
2answers
145 views

AlwaysOn Availability Groups log_send_rate

On all our AlwaysOn setups, running Windows 2012 and SQL Server 2012 in virtual machines and on bare-metal, I find that the log_send_rate in sys.dm_hadr_database_replica_states is consistently ...
0
votes
1answer
23 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
56 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 ...
3
votes
1answer
48 views

resource wait SQLCLR - wait_type CLR_SEMAPHORE by SPID 0

UPDATE The system is running some ETL, reporting services and a replication subscription. SQL engine is 2012. The situation described below is continues, after a reboot it start within 5 minutes it ...
1
vote
3answers
262 views

AlwaysOn Availability Groups Delayed Replica

With AO SQL 2012, is it possible to configure one of the member as delayed replica? I know ideally we would like this to be synced but in case of human error, it would give us the ability to check on ...
3
votes
1answer
104 views

SQL Server SSL connection

Is it possible if I wanted to set up SQL Server 2008 R2 instance so that it only accepts SSL Connection? I am getting different answers and based on my testing, it will accept non-SSL connection even ...
-1
votes
1answer
64 views

EXCEPT operator vs NOT IN

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
0answers
18 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 ...
3
votes
2answers
4k views

Reduce Clustered Index seek cost SQL Server 2008 R2

I am running a query and it has records in the hundreds of thousands, it takes more than 20 mins to fetch data. After running the execution plan i noticed that clustered index seek cost can be be the ...
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 ...
0
votes
1answer
38 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?
5
votes
2answers
264 views

Why Do Replication Deletes Require sysadmin Access

I am running merge replication with SQL 2012. There seems to be a nasty consequence of the delete triggers added for replication in SQL 2012. Inside the delete triggers are this, select @xe_message ...
0
votes
1answer
36 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 ...
3
votes
1answer
5k views

SQL Server 2008 R2 on Windows 7 x64 Professional - what are the downsides?

I need to minimize the cost of the platform, that will run SQL Server 2008 R2 Standard Edition. I have a special licensed version of this SQL server to work with like 20 users (it's an 1C special ...
2
votes
1answer
52 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 ...
1
vote
4answers
191 views

Execute permission denied on object sp_start_job

I need to allow a user to kick of a specific agent job without having any ability to start other ones. To accomplish this, I've created the following procedure (simplified): ALTER PROCEDURE ...
2
votes
1answer
162 views

Listener pointing to incorrect AlwaysOn Availability Group

All, Thanks in advance I have two instances of SQL Server 2012 SP1 on a three node WSFC with a HAdr group on each instance with a corresponding listener. Instance 1's listener points to Instance 1, ...
1
vote
1answer
559 views

Troubleshooting Mirroring Configuration

I am configuring database mirroring on SQL Server 2012. After configuration I am getting the following error when attempting to start the mirroring session: tcp server cannot be reached or does ...
4
votes
1answer
373 views

SQL Server 2005 Replication

I am in the process of creating Replication between 2 Remote Servers, server 1 is the Distributor and Publisher and server 2 is the Subscription. server 1 windows 2003 server 192.168.10.1 connected ...
1
vote
2answers
80 views

How to get statement which causes error 3609?

How to find out which statement causes error Msg 3609, Level 16, State 1, Line 4 The transaction ended in the trigger. The batch has been aborted.? The code seems very straight-forward: -- 1. Check ...
1
vote
1answer
39 views

Should I add it as an additional column or a seperate table?

I have a table in my SQL Server that's called "Regions", it has information about 9 regions and the 10th row holds the info about our Division. Now that we will be merging another 2 divisions with its ...
5
votes
1answer
421 views

Build a three table join with a recusive table in the middle?

I have three relevant tables: Parts, PartGroup, and MarkupGroup. Parts is simple. PartID artificial primary key Part part number PartGroupID Foreign key sample data: 1 ...
6
votes
1answer
1k views

SQL-08S01 error in FreeTDS/Azure when executing stored proc for a few minutes from Linux (but not from Windows)

I get this error on Linux (Ubuntu and CentOS) when executing a stored proc from Perl/DBI/ODBC/FreeTDS to SQL Azure: [unixODBC][FreeTDS][SQL Server]Read from the server failed (SQL-08S01) I don't ...
2
votes
2answers
96 views

Logical problem with a database model

Beforehand the table names and columns are in Spanish, my native language is Spanish. (table names have been now edited to English) I've got a database to manage the tickets sales of a trip that is ...
2
votes
2answers
38 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 ...
1
vote
0answers
81 views
+100

How to recursively find gaps where 90 days passed, between rows

This is a kind of trivial task in my C# homeworld, but I don't yet make it in SQL and would prefer to solve it set-based (without cursors). A resultset should come from a query like this. SELECT ...
3
votes
1answer
1k views

what is difference between last_worker_time and last_elapsed_time in DMV sys.dm_exec_query_stats?

what is meaning of last_worker_time and last_elapsed_time in DMV sys.dm_exec_query_stats and what is differnce between them? when I fire below query SELECT TOP 20 qs.last_worker_time, ...
2
votes
1answer
15 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
2answers
1k views

Help with SQL Server Error “ad Hoc access to OLE DB Provider 'Microsoft.ACE.OLEDB.12.0'”

So we have an interesting issue where users are receiving the following error when attempting to query a view in SQL Server 2008 R2: Msg 7415, Level 16, State 1, Line 1 Ad hoc access to OLE DB ...
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 ...
0
votes
1answer
73 views

How to perform same DML statements on two different servers (Oracle and SQL-Server) simultaneously

I have two servers, Oracle and SQL-Server. I have same database on both the servers. I want to perform DML (insert,update,delete). How can I perform same DML statements on both the servers ...
0
votes
1answer
36 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 ...
0
votes
1answer
23 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 ...
2
votes
2answers
32 views

Sqlserver: Get Meta-Info about TRN file

Is there any way to get the timespan of the data contained in a TRN-File? What I have: A backup of a transaction-log What I need: The timestamp of the first and the last entry inside the log ...
0
votes
1answer
433 views

date wise report and order by date [on hold]

I have a table where I need to get this report format like this in datewise totals. I have 3 columns which are t_reference,t_pa_number,t_pa_name,t_date_time_issued from tickets table. date 17 ...
2
votes
0answers
42 views

How to UPDATE/DELETE/INSERT with Microsoft.ACE.OLEDB.12.0 as Linked Server in SQL Server 2012?

I need to update an Access 2003 database from SQL Server 2012 with the Microsoft.ACE.OLEDB.12.0 provider. As an administrator, everything works great. I can do Select, Insert, Update and Delete ...
1
vote
1answer
364 views

Optimising a query of an SSRS dataset

Consider the query given below: SELECT * FROM ((SELECT c.cust_id , c.username , REPLACE(qs.seg_type_ref_key_02, 'N/A', 'Non Vip') casino_group, ...
0
votes
0answers
17 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 ...
-1
votes
0answers
33 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
30 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
25 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
1answer
51 views

Job showing the running sign but not currently running

I have a script to get the currently running jobs: -- get the running jobs --marcelo miorelli -- 10-dec-2013 SELECT sj.name ,DATEDIFF(SECOND,aj.start_execution_date,GetDate()) AS Seconds FROM ...
4
votes
0answers
136 views

There is insufficient system memory in resource pool 'internal' to run this query

One of our production servers is reporting an error in the log Error: 701, Severity: 17, State: 123. There is insufficient system memory in resource pool 'internal' to run this query. I ...
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 ...
0
votes
0answers
11 views

Best way to profile SQL Server [on hold]

We are developing an email campaign web application for my company. The application is in .Net and we are using Microsoft SQL Server 2012 Web Edition (64-bit). When a big campaign is going out we ...
0
votes
1answer
6 views

Why different users from same login group can not access the database objects?

I have SQL login group as "SC_NT\xxxx" in server. There are multiple users using this login group to access database objects. User "A" can able to access db objects from .net application. But when ...
-6
votes
0answers
25 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 ...