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)

2
votes
0answers
7 views

What effect will reducing the size of a varchar column have on the database file?

We have a number of tables in our database that have VARCHAR(MAX) columns where a VARCHAR(500) (or something much smaller than max) will suffice. Naturally I want to clean these up, and get the sizes ...
0
votes
0answers
3 views

Fencing a failed application node to isolate it from SQL Server

I have a multi-node server application that is backed by SQL Server 2012, often in a clustered or AlwaysOn AG/FCI HA configuration. My application monitors the health of the application nodes (not the ...
0
votes
2answers
10 views

Unable to find how a table is being populated

Using SSMS2014 w/ SQL Server 2008 R2. I have a table that I am trying to find out how and from where data inside it is coming from. (I didn't create the table and am unable to contact the person who ...
0
votes
0answers
7 views

How to sync two tables which are on different databases and servers using SSIS?

I am relatively new to SQL Server's tools. I am on the following situation: On several stored procedures on a database D1 on server S1, I need to use data that is stored on a database D2 on server ...
1
vote
0answers
6 views

How to get paged resultset from a table?

I am trying to get paged resultset from a table (Notes). So, I am passing the last offset id (@LastOffset) value along with the page size (@Count). My approach to achieving this is: Sort the table ...
0
votes
1answer
9 views

SQL Server Service's Log On As account

I just inherited a set of new servers and whoever set them up left the "Log On As" account as the default "NT Service\MSSQLSERVER". I'd like to change that over to an Active Directory service name. I ...
0
votes
0answers
27 views

Can I create a constraint to a subset of data?

Here's a simplified view of my database |---------------| |-----------| | ORGANIZATION | | CONTACT | |---------------| |-----------| | OrgId | | ContactId | | OrgName ...
0
votes
0answers
24 views

Rowversion column in every table - Bad practice?

I'm currently providing my application with concurrency checks. For that, I'm using Entity Framework combined with SQL Server's RowVersion / Timestamp column. Now I've thought about adding a ...
0
votes
0answers
24 views

SQL Server 2012: query to see queries that are consuming more resources

I'm trying to find/build a query to show me those queries that are consuming more resources in SQL Server so that I can optimize them or at least have a statistical idea of what is really happening. ...
1
vote
1answer
40 views

What is the query that updates the Column in a table

I have a column in a table that I don't know who is updating it . The table name is dbo.Events and the column name is [Status] and this column values are 1 or 2 . I am trying to find the query that ...
0
votes
0answers
15 views

Application is Hanging when database upgraded from MS SQL 2000 to SQL 2008 Server R2

Presently we are working with SQL Server 2000,the database is perfectly working with our software for retail sales counter application developed with VB 6.0. But after upgraded to SQL Server 2008 R2 ...
0
votes
0answers
7 views

Sql Server 2014 AppRole not able to create temptable in tempdb

we have created Application Roles in sql server 2014 and grant the "Execute" permission on the tables and stored procedures. when i execute sp_setAppRole and then the stroredprocedure. the simple ...
0
votes
1answer
22 views

Optimizing a DMV query

I have found a query that is a major performance issue in my environment. I looked at the actual execution plan for this query and found out the main problem is the remote scan (98%). Its remote ...
-1
votes
2answers
25 views

SQL Server Temp Database Monitor Tools [on hold]

Please suggest best tool to monitor temp db activity to find the objects which have excessive temp db usage.
-3
votes
0answers
28 views

Backup and Restore

What are the Negative Aspects backup and Recovery in sql server Over these points. Full Backup and Restoration Point in Time Restoration Restoration in Same Instance Restoration in Different ...
1
vote
0answers
9 views

Merge Replication: Updates to Schema

We have a main SQL Server which replicates to two backup servers via continuous merge replication. There are regular updates to the schema. Regular changes include: Adding new tables and ...
0
votes
1answer
18 views

SQL Server error log entry : Error: 17806, Severity: 20, State: 14

I have error in my log for a few weeks, I searched a lot but I couldn't found useful answer. I did closed SQL Server port for public IP, but I have problem yet. Error: 17806, Severity: 20, State: ...
2
votes
1answer
31 views

Best way to migrate a huge SQL Server database with low downtime over network

Problem definition Our database server needs to be transferred to an other datacenter. It runs on Microsoft SQL Server 2012 Enterprise (64-bit) and contains two databases of about 2TB and 1TB. ...
0
votes
1answer
38 views

SQL Server 2005 and Windows 8.1 - Getting error 1053 when trying to start sqlexpress service

We've been running SQL Server 2005 and Windows 8.1. Today for the first time we can't get sqlexpress running in services. It was running fine yesterday. Getting error 1053 - service did not ...
2
votes
2answers
41 views

Backup compression in SQL server 2008R2 and above

Recently we got a new server to take care of and found that there are two data drive: S: 1 TB where resides 10 databases(mdfs and ldf's, though they should be on different drives but that's how we ...
0
votes
0answers
16 views

How to setup a trigger for updated records

Prod database "Mother" Copy of database "Father" Here's my scenario I need help with: I have a database that has a table called User_Group table on our Production db "mother". The dev team wants me ...
2
votes
0answers
61 views

This Extended Events session works on Dev but not on Pro. Why?

I do have the following Extended Event session on my Dev and Pro boxes: CREATE EVENT SESSION [sp_showplan] ON SERVER ADD EVENT sqlserver.query_post_execution_showplan(SET collect_database_name=(1) ...
-3
votes
0answers
36 views

SQL Pivot by data [on hold]

I have this procedure : alter proc rel_manipula(@inicio datetime,@fim datetime) as select A.codigoins, b.nomeid ,sum(a.qtd), a.dtmov from com_InsusTrans A inner join com_insus B on b.codigoins = ...
1
vote
0answers
17 views

Severity 20 Error upon disconnecting Dedicated Administrator Connection

Starting working with Dedicated Administrator Connections on SQL Server 2008 R2 servers. All is working fine (once port 1434 was opened), but am getting severity 20 errors when I disconnect the admin ...
1
vote
1answer
38 views

SQL Server 2012 stored procedure runs very slow sometimes

I have a stored procedure with a single large query which takes an ID as a parameter and returns some counts. It has quite a few inner joins and left outer joins but they are all on indexes. The ...
0
votes
1answer
29 views

Sqllogship.exe: replace with powershell?

To get more control, and to enable another transport. Is there a direct replacement in powershell?
-2
votes
1answer
28 views

Sql server sqllogship.exe…full docs?

Are the internals and all the logic of sqllogship documented? Eg so i can manage it directly, without the wizard? Or replace it with my own tool? I find this syntax (which is real, from a live SQL ...
2
votes
1answer
48 views

SQL Server : Index Seek with very high Scan Count

I have a query that joins 2 tables: Documents table, that has DocID as Unique Clustered Index DocumentsRows table, that has DocID, RowID as Unique Clustered Index When I join those 2 tables, I ...
3
votes
2answers
417 views

Storing Japanese characters in a table

I am using SQL Server 2008 R2 and I want to store Japanese characters in one of the columns of my table. Say I want to store Japanese names, how can I achieve that? Is there an easy way?
1
vote
1answer
11 views

Syncing Uncontained Objects with AlwaysOn Availability Groups

In setting up our HA environment (AlwaysOn AG), I came across the add-in ssms_2012_ag_addin_setup.exe that I got from SQLSkills. ...
0
votes
1answer
34 views

What are the implications of upgrading statistics SQL Server [on hold]

I Have a SQL Server 2005 DB, with 500Gb of Data. The Statics do not upgrade from 2010 and this past saturday were updated. Yesterday the querys on DB were very slow and caused bad response times. ...
3
votes
0answers
44 views

Timestamp-based index

I have a big database (200GB+) that contains some log info. And I want to speed up SELECT queries and stored procedures. I have a table with a GeneratedOnUtc datetime column, and have a non-clustered ...
1
vote
1answer
26 views

SQL Server: Understanding log ship utility: sqllogship.exe

This is my first time using the stock SQL log shipping setup. The copy operation is failing. I think I see the issue. I need to change the unc: '\\Win-2ooc0jplr5k\sql\logbackup\', Backup ...
0
votes
0answers
3 views

Report snapshot with links to other reports

I have a report that I have just set up to create a weekly snapshot. This report has links on it to other reports in reporting services. When SSRS creates the snapshot, how does it treat these ...
1
vote
0answers
29 views

Renaming databases vs backing up and restoring

I am creating a copy of Database A, restoring as database b, executing a job on database b. Upon successful execution, I would like to delete the database A and rename the database B to what the ...
-4
votes
1answer
21 views

Find Longest Running Query [duplicate]

How I can find Longest Running Query and SPID on SQL Server 2008?
5
votes
2answers
240 views

What does Page Life Expectancy say about the instance?

I have installed monitoring software on a few SQL Server instances in the environment. I am trying to find bottlenecks and fix some performance issues. I want to find out if some servers need more ...
0
votes
1answer
31 views

Grouping UNION ALL

No matter how I try to group the record set generated by this query it just wont do it. Query works ok the problem is trying to Group by A SELECT CountryCode + + ProductNumber + + StockType AS A, ...
0
votes
1answer
30 views

SQL Server Import/Export: cannot copy geo columns

I'm trying to copy data from a SQL Server 2014 Express database to a SQL Server 2008R2 Express database. Compatibility level for the 2008R2 Express database is set to 100. As soon as I hit Next in ...
0
votes
0answers
26 views

Multiple subqueries performance issue

I have a query that collects customer data. I select a lot of correlated data from different tables. I want to have only ONE result row for each customer. The query looks like that: SELECT c.Id ...
0
votes
0answers
17 views

Need help on transferring data from a PostgreSQL database to a future (to be decided) database!

(English isn't my native language) I'm doing an internship for school and my task is to theoretically describe the best way to transfer the data from their current database (PostgreSQL) that they have ...
0
votes
0answers
27 views

Alternative to paying upfront for SQL server without using hosting provider's SPLA with Microsoft? [on hold]

Is it possible to pay monthly for SQL server through a third party in the same way you can via your hosting providers SPLA? For background, we're using AWS but they charge up to 2x more than ...
-3
votes
1answer
32 views

How to check table [on hold]

How to check which tables a user have access to on a server?
2
votes
1answer
73 views

Same query sometimes uses a Table Spool

I'm checking out a query which exhibits strangely inconsistent performance. Using SolarWinds DPA, I can see that the query sometimes uses a Table Spool, sometimes it doesn't. When it actually used a ...
4
votes
2answers
61 views

How to change default database to all logins?

I'm bit new to SQL Server and I'm trying to script out Microsoft SQL Server (2005-2014) post installation activities and I got bit stuck on altering logins. Corporate policy states that none login ...
2
votes
3answers
271 views

Is inserting multiple queries takes same time as that of single query?

I have a requirement where I have to insert a lots of rows.For inserting we use like this insert into emp(name,age) values('abc',12); This will insert only one row.For inserting multiple rows we ...
0
votes
1answer
41 views

Update a set of SQL statements

dbo.MatchFirstName(@FirstName) and dbo.MatchLastName(@LastName) are table Value Functions(TVFs). Problem: In my Update statement i.e Update #Temp after Insert, I want only those rows to be ...
1
vote
1answer
60 views

Query on 250 million records

I have a table with below structure CREATE TABLE [dbo].[ColumnValues]( [Id] [int] IDENTITY(1,1) NOT NULL, [ColumnId] [int] NOT NULL, [Value] [nvarchar](max) NULL, [OutputArea] ...
0
votes
2answers
41 views

SQL Server tuning: Disk queue to OS drive: How to optimize?

I expect to see the disk queue move on the data, tempdb, log and backup volumes. I do not expect to see the OS drive (C:) which has zero SQL files present, show disk queue impact. Assume it is to ...
0
votes
1answer
42 views

Exclusive access to edit rows [on hold]

I'm developing a program that allows users to view and edit data. My question: Is there tools (sql server tools, may be users/roles) to implement the following: There are two users: A and B. User A ...