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

Sql Server 2014 IO Resource Governor

I've have configured the resource governor for cpu, memory, and IO. I have my dbcc db checks running under a pool and workload that only allows 10% of memory and cpu, and only 100 IOPS. I have also ...
-3
votes
0answers
39 views

ERROR log file size is expanding very fast because of the “ GHOST CLEANUP ” command

When I access the root directory LOG folder I have noted that the ERRORLOG file is getting bigger very fast. I opened the error log(Log file viewer) from the SSMS, and I saw in the Source column the ...
-2
votes
1answer
29 views

The SQL server Log folder is expanding because of the SQL Dump files (what to do with it ?) [duplicate]

The "Log" folder SIZE in the SQL server root directory (X:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log) becomes too big , ~80 GB. When I checked it, I see that there are a lot of ...
0
votes
1answer
16 views

The SQL server Log folder is expanding because of the SQL Dump files (what to do with it ?)

The "Log" folder SIZE in the SQL server root directory (X:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log) becomes too big , ~80 GB. When I checked it, I see that there are a lot of ...
1
vote
2answers
36 views

Shrink logs in between user transaction in SQL Server

I have a database where there are like billions of rows and I need to delete the data based on some condition. Initially I was trying to delete the code in one transaction and log starts growing to ...
0
votes
1answer
23 views

How to know the problem when i make this Full Backup Scenario?

i'm working new on database administrator and i have some questions if i want to make SQL full backup database every Saturday at 6:00 AM and for some reasons the device was shutdown the questions are ...
-2
votes
0answers
32 views

SQL Server Complex Query help needed

Before I begin, I would like to say that I know I am asking a lot but I really really can't figure out any way for the last 3 days and I've been digging like crazy. I would like to start by explaining ...
1
vote
0answers
16 views

Can I revert to local logging in IIS 7.5 if ODBC fails?

Environment I have 3 Servers running instances of IIS 7.5 hosting different websites. 1 Server is on Domain A, 2 Servers are on Domain B. I have a one way trust setup from Domain A to Domain B. SQL ...
0
votes
0answers
30 views

Trigger For prevent inserting data [on hold]

i need a trigger that prevent some data from inserting in table According to a condition , before inserting any row in the table like this code create Trigger trigger_name on table_name for insert ...
1
vote
1answer
31 views

How to tune the below query

I am currently working on below table structure to pull the data/ generate any one time report. Let us consider the table name to be ABC. ID Field Value 1 Name Nagarjuna 1 Gender Male 1 ...
1
vote
2answers
99 views

Will a non-clustered index on a column with covering index on all the columns of table affect the Delete statement Records)?

I am trying to delete thousands of records say 35K from a table which consists like 10 million records. Delete * from Table where ID=859 I have also tried bulk deletion DECLARE @RowsDeleted ...
5
votes
2answers
89 views

Keeping iterator in consistent state

I was reading this post to understand how things are done in Sql Server: http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ If I understand it correctly, data is being sent ...
7
votes
1answer
47 views

Aggregation Operations on View Ignores Index

The Scenario Once upon a time there was a Staging database at a small company that was participating in an ETL process, acting as a receiving catalog for the various formats of files from a number of ...
-5
votes
1answer
57 views

how to Write a SQL Statement to display EmployeeID from Table1 and EmployeeName from Table2 a [on hold]

how to Write a SQL Statement to display Claim Number, EmployeeID from Table1 and EmployeeName from Table2 above. Write a SQL Statement to display all the Information from Table1 and Table2 for ...
2
votes
1answer
39 views

How to Identify Who or What is Restarting SQL services via Service Control?

I investigated an instance that experienced an unexpected restart and came across the usual service control event but no user login associated with it. Is it still possible that an authorized user ...
1
vote
0answers
20 views

Which is the best way for selecting dimension attributes while creating a dimension?

I'm a newbie to SSAS OLAP so please apologize me if it was a silly question but surely I need suggestions. I would like to make clear some concepts which was confusing for me. Let us consider five ...
1
vote
1answer
57 views

SQL Server : scheduled JOB issue

I have one issue in my live server ... Issue is: I created a job for log file shrink & I have scheduled it for every day run with sa user When I run this job manually from Management Studio, it ...
10
votes
5answers
1k views

Reasons for avoiding large ID values

We are working on a web application, not yet accessible to users. My boss noticed that newly created records get an ID of over 10 000, even though we only have under 100 records in the table. She ...
1
vote
1answer
52 views

Investigating specific SELECT queries

For a particular row in a table how can I determine the number of reads done to it such as SELECT * FROM MyTable WHERE ID = <something> and when and where the read query executed? I'm ...
3
votes
3answers
129 views

Login lifespan for password on SQL Server

What is the "lifespan" for a login with the option Enforce Password Expiration Enabled? Where can I find configuration/option to change the time?
-1
votes
2answers
44 views

Need help finding inactive users in my database

I am trying to figure out how to get this figured out. Problem: Users of inactive customers are receiving scheduled maintenance notifications Indicators: Organizations have a custom binary field ...
-3
votes
1answer
39 views

Finding users with database owner role in sql server 2005 or so [duplicate]

I need a script which will list out all the users with DataBase Owner persmission for a specific database. Thanks
-3
votes
0answers
50 views

Server CPU usage Issue [closed]

I have a Database on MS SQL SERVER, The MDF file size os near about 30 G We have web application where this database is used. & while monitoring Live server, I Seen when number of User increase on ...
3
votes
1answer
80 views

Effects of turning the transaction safety OFF

I am considering to turn off the transaction safety to maximize the performance. Before that i am interested in finding the current status of transaction safety. Is there any command that we can get ...
1
vote
0answers
31 views

Transactional Replication - Replication Order of Related Tables

** This was previously asked on Stackoverflow - I removed it from there and recreated here ** I have an issue with SQL Server Transactional Replication. My topology is as follows (and this cannot be ...
-5
votes
0answers
47 views

Incorrect syntax near the keyword 'AS' [closed]

string strQry = @"declare @state varchar(max) declare @query varchar(max) set @state=(Select State from CandidateInfo where Id=1501000040) set ...
0
votes
0answers
28 views

CodePlex: SQL Server Partition Management Tool [closed]

I have implemented partitioning on a table and now I want to use the CodePlex Partitioning Tool to create my staging/archive table, with the intentions of wrapping it all in a "Sliding Window" job. ...
1
vote
2answers
72 views

Can a temporary table be shared across sessions?

I have revised a procedure that builds a dynamic SQL statement to create and populate a temporary table. The syntax was something like this: ...'create #temp_' + CAST(GETGUID() AS VARCHAR(36)) ... ...
0
votes
2answers
36 views

How can i know the relationship in the database in sql server 2008? [closed]

I want to know how can I determine relationships between data which is not determined by the primary key in the design. For example, I have three tables in the database like this :- table 1: fields ...
0
votes
1answer
40 views

Run CDC Cleanup job at specified time

I have enabled cdc and using it , it works fine now the problem is that we have many tables in a database and also we have many databases so how to configure cdc cleanup job to run again and again ...
2
votes
0answers
49 views

Moving data from MS Access to MS SQL Server

I'm trying to migrate data into SQL Server from an existing legacy set of MS Access databases. Currently everything is working except a few core tables that are wide and contain a number of ...
0
votes
0answers
34 views

Data warehousing: data transfer process too slow with larger batches

I have two primary instances of SQL Server, one for OLTP and one for reporting. The data warehouse for reporting is basically a Type 2 SCD: every table has DWDateStart and DWDateEnd columns and the ...
0
votes
1answer
26 views

How to restart the distributor agent of transactional replication?

After troubleshooting query time out error I would like to restart my distributor agent. So I go to my distributor server, in my distributor DB (called distribution_SA) I run the following query: ...
1
vote
1answer
48 views

Deleting duplicate rows with condition [duplicate]

I have posted a similar question before, but this one is a little modified. I have a table with 4 columns as shown below. ITEMCHARGE CPT4 EFF_DATE CPT4MOD 326.8 29075 ...
0
votes
0answers
14 views

Powershell Restore Azure SQL Database to local with Restore-Database

I have written a powershell script that uses Start-AzureSqlDatabaseExport & Get-AzureStorageBlob to export my azure DB to a bacpac and download it locally, the next step is to restore the bacpac ...
3
votes
3answers
273 views

use an Index correctly to optimize queries

I have an SQL database with millions of records and when I'm querying the data like select * from ActCosts where ScenarioID= 456 The tables has 1,323,718 rows and it gives me like 50,000+ rows ...
-1
votes
0answers
25 views

SQL Mirroring Down between Principal / Mirror

Configured MS-SQL Mirroring between two servers Principal and Mirror. Some times the connection goes down and start synchrozie automatically. Need to know which end either Principal or Mirror which ...
5
votes
2answers
131 views

T-SQL brain teaser: find non-overlapping sets

I would like to ask for help coming up with a query, which can identify groups on non-overlapping records. Here is a sample scenario (admittedly contrived). Let's say I have employees who are ...
-1
votes
1answer
34 views

How to manage two tables in SQL Server [closed]

i have two tables offer1 and offer2 The two tables are Offer1 Offer2ID|OfferName|OfferExpiryDate Offer2 Offer2ID|OfferName|OfferExpiryDate now i have third table which keeps record ...
1
vote
2answers
53 views

Deleting duplicate rows with condition(Using SQL and LINQ)

I have a table with 5 columnsID,CPT4,CPT4Mod,ItemCharge,Eff_Date. Deletion Condition: When rows exists with duplicate CPT4and CPT4Mod field values but different ItemCharge and Eff_Date values, ...
0
votes
1answer
66 views

Corrupt DB for a noob

Please help me! I am not a DB admin, and I have been thrust into the role after taking a new job. I need as much step by step as you can give me... I've already done the dbcc ...
1
vote
1answer
34 views

database design for simple comment

I have a following given scenario. A user can have zero or more item. A user can comment on the item. (Just simple comment listing with name of people who comment, no need hierarchical structure for ...
3
votes
2answers
64 views

New Index on table cause table to be locked really often

Here are my tables : CREATE TABLE [dbo].[Trackers] ( [IdTracker] INT IDENTITY (1, 1) NOT NULL, [IMEI] NVARCHAR (16) NULL, [CreationDate] ...
1
vote
1answer
24 views

How to join fixed row table against mapping table and reveal unmapped records

I have two tables and I am having trouble figuring out how to join them to meet my projection needs. Here is a scenario that illustrates the problem 1. The first table has a fixed set of values/rows; ...
6
votes
2answers
174 views

Why doesn't a delete increase unused space in a table?

If I populate the following table: IF OBJECT_ID ('dbo.CleanTableTest', 'U') IS NOT NULL DROP TABLE dbo.CleanTableTest; GO CREATE TABLE dbo.CleanTableTest (FileName nvarchar(4000), ...
3
votes
1answer
123 views

How do I identify the program that called a stored procedure?

As part of an application database design spec, we've been asked to block execution of a set of stored procedures if they have been fired directly from SSMS / osql / sqlcmd and so on; that is, they ...
0
votes
0answers
14 views

SSIS Execute SQL Task fails to login

I want to execute a SQL query in SSIS but when I try to build the query it says "login failed for user user". I executed the query in SSMS and it works fine and it also parses successfully . the ...
0
votes
1answer
40 views

Turning multiple fields in column to row

I have an issue that has really stumped me in SQL Server. I have recently had the need to insert a row in to a table, made up from a number of columns. I want to make the one row up from something ...
2
votes
0answers
38 views

Exclude a User From an Audit

I need to set up a SQL Server audit to capture all database activity for all logins except one - the login our application runs under. In this case the login I want to exclude is CPSDOM\cpointedb. In ...
3
votes
2answers
86 views

How to identify unused databases on my sql server

I am looking for the best practices or analysis someone would have followed to identify the unused or inactive databases on my SQL Server. I went through many articles, which say possibly to go for ...