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

Convert Teradata Database to SQL Server 2012

I am just wondering if anyone has any experience, knowledge, or recommendations on migrating a Teradata database to SQL Server 2012. I have never worked with Teradata before so I am unfamiliar with ...
2
votes
0answers
17 views

When does SQL Server acquire locks?

The list of isolation levels in SQL Server found here states that write locks acquired within a transaction are retained until the end of the transaction. However it doesn't mention anything about ...
1
vote
1answer
25 views

Cannot install SQL Server 2012

I'm trying to install SQL Server 2012 on Windows Server 2012 Standard and got this message: SQL Server Setup has encountered the following error: The resource ...
0
votes
1answer
14 views

Add linked server from SQL-Server to MySQL: “Data source name not found” (Error:7303)

I'm trying to link my SQL-Server 2005 on Windows Server 2008 R2 with MySQL 5.5.40 on a different computer. I have followed this guide: ...
0
votes
2answers
34 views

SQL Multiple JOINS Interpretation order

I have a big problem of using multiple joins in one SQL Statement. For example i have 10 Tables which they are tbl1,tbl2, tbl3,..,tbl10. I would like to select some columns from each table from tbl1 ...
0
votes
1answer
17 views

How to Audit 2 or more SQL Logins (server principals) using SQL Server Audit

I need to audit the few SQL Server Logins, I have used filters while creating Server Audit by using CREATE SERVER AUDIT [audit123] TO FILE ( FILEPATH = N'D:\' ,MAXSIZE = 2048 MB ...
0
votes
0answers
22 views

Can I optimize a left join for a single match?

Consider a join A LEFT JOIN B ON A.id = B.a_id: B.a_id is nullable -- most but not all B records point to an A record. A can, at most, only have one matching B record (business logic). Not all A ...
0
votes
1answer
28 views

Should I used varchar(max) or varchar(4000) SPARSE?

I have a "comment"-type column that is rarely used -- around 6% non-null in a population of 3 million records. The average length (when used) is 6 characters, and the max so far is around 3KB. A ...
0
votes
0answers
12 views

How to query against legacy data that needs to be cleaned up?

I have an existing SQL Server DB with 3 tables (note: this is a made up example, but modelled after a real problem). Artists : contains music artists MusicRecords : contains information on music ...
0
votes
1answer
21 views

Copy of a database with an existing database with schema and data in sql server

I have two databases one is having master kind of tables and other will have transaction data. I should create a new database with a structure of an existing database to my clients. Here is the ...
5
votes
2answers
297 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 ...
1
vote
1answer
22 views

Trigger AFTER INSERT on tables with different columns

I'm writing a trigger that works after an insert. This is what I have: create trigger trgInsereQuestao on tblquestaoOpcao after insert as begin set nocount on; insert into ...
0
votes
0answers
18 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
24 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
19 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
1answer
27 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
0answers
21 views

How to verify if a SQL Account is still used?

We have a SQL Server Login on a SQL Server 2008, and no one seems to know if the account is actually being used or not. It is assumed it is being used, as it is configured in a Linked_Server ...
0
votes
1answer
15 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
30 views

Can I create a constraint to a subset of data? [duplicate]

Here's a simplified view of my database |---------------| |-----------| | ORGANIZATION | | CONTACT | |---------------| |-----------| | OrgId | | ContactId | | OrgName ...
0
votes
0answers
30 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
28 views

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

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

Application is hanging when database upgraded from SQL Server 2000 to SQL Server 2008 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
12 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
27 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
30 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
10 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
22 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: ...
7
votes
3answers
82 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
42 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
62 views

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

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
41 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
30 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
29 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
52 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
423 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
12 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
45 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
30 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
22 views

Find Longest Running Query [duplicate]

How I can find Longest Running Query and SPID on SQL Server 2008?
5
votes
2answers
243 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, ...