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

SQL Server to Oracle migration

Converted model resulted into incomplete script generation as all stored procedures, triggers and views were missing, only table structures were generated and i did not get any error messages for it. ...
1
vote
1answer
14 views

Backup Specific days monthly Sql server

How to backup only specific days each month on Sql Server (I use both Sql server 2005 and 2008) using plan maintenance or Agent Job, I mean by that to Backup my databases from 28th of each month to ...
0
votes
0answers
11 views

Using previous (.mdf) datatabase with VS 2012

I have a previously created web site with aspx pages, a database and login page that was originally created in Microsoft VS Developer 2010 Express. The database has several hundred records and is ...
1
vote
1answer
22 views

Trace Flag 4199

Microsoft's KB article about Trace Flag 4199 is a bit confusing: ...any hotfix that could potentially affect the execution plan of a query must be controlled by a trace flag. Except for fixes ...
0
votes
0answers
9 views

Change Data Capture in a services environment

Change Data Capture looks to be exactly what I need... Except. All of my database actions come from users that system accounts. We have WCF service that is called by an application. The WCF Service ...
0
votes
0answers
13 views

Include LOCK_ESCALATION in CREATE Script in SQL Server 2012

Consider following T-SQL script: USE [DB1]; GO CREATE TABLE [T1] ( [C1] INT NOT NULL, [C2] TEXT NOT NULL ); GO ALTER TABLE [T1] SET (LOCK_ESCALATION = AUTO); GO When I explicitly set ...
2
votes
0answers
30 views

Case Statements, subqueries, and datediff

First time posting on this website so please let me know if you require any other information. This first section of code worked perfectly and resulted in correct information. [Field 1] = (CASE ...
1
vote
2answers
27 views

Applying Quotes Across Multiple Lines

In SQL Server Management Studio you can use the shortcut CTRL + K > C or CTRL + K > U to comment/uncomment lines in bulk. Is there a similar keyboard function that applies single quotes across ...
0
votes
0answers
21 views

Excel Data Connection to SQL Server using Windows Auth from untrusted machine

We have an Excel spreadsheet that uses a Data Connection to a SQL Server database. The database server is joined to our domain, and Windows Authentication is enabled. Here is a sample of the ...
1
vote
2answers
14 views

How can I map a login to a database using T-SQL (not SSMS)

I'm writing a program that requires me to assign all permissions and everything in code. I have gotten stuck in this part: I just want to do the equivalent of clicking the little box under "Map" ...
1
vote
1answer
18 views

Restore Database SET SINGLE_USER

I am in the process of writing a restore database script. I want to be able to connect as sa and run the restore script. When I run SET SINGLE_USER does this mean that my login is the only user ...
1
vote
3answers
29 views

Script to drop all databases except one not working

I'm trying to drop all databases but one on my test server. For this, I'm using the below script but it gives error: EXEC sp_MSforeachdb ' USE [?] IF (DB_ID(''?'') > 4 AND DB_NAME()!=''ABC'') ...
1
vote
1answer
29 views

CXPACKET SUSPENDED and NULL wait type

I was was running the query in this article: http://sqlity.net/en/708/why-cxpacket-waits-are-not-your-performance-problem/ To see what my threads were waiting on in regards to a suspended query with ...
0
votes
0answers
11 views

Timeout occurred while waiting for latch: class 'ACCESS_METHODS_HOBT_COUNT'

We have a big reporting database on production server, and we have several SSIS jobs running against it. Yesterday almost all this-database-related SSIS jobs stuck and running forever. Also the ...
2
votes
0answers
26 views

How to resolve RESOURCE_SEMAPHORE and RESOURCE_SEMAPHORE_QUERY_COMPILE wait types

We are trying to figure out root cause of slow running sql server queries hitting/fetching data from one of the database , size 300 GB, hosted on server with below configuration: Windows server ...
2
votes
0answers
68 views

How to handle to many inserts?

I have a database which are accessed from remote locations in the world wit very long delays and poor transfer speeds. I currently transfer the data using a transaction since either all or no data ...
0
votes
1answer
30 views

How can I decide Rebuilding Index with DETAILED or SAMPLED on SQL Server

I want to rebuild my indexes and statistics on DB. How can I select this option on production maintenance. SQL Server Version : Microsoft SQL Server 2012 - 11.0.2100.60 (X64) (Build 7601: Service ...
0
votes
1answer
32 views

How do you repair a 'Suspect' database?

My database has gone offline, it is highlighted as 'Suspect'. Foolishly, I haven't got a recent back up. Is there a way of quickly restoring the database? I'm using MS SQL-Server (2008).
1
vote
2answers
23 views

SQLOS Resource Monitor and QueryMemoryResourceNotification Win API

Here's some info about SQLOS and the Resource Monitor I found from Jonathan Kehayias: As a general rule, SQL Server will use as much memory as you can give it, and it will not release the memory ...
-3
votes
0answers
13 views

Upgrade from SQL database server To SQL Report Server [on hold]

I'm quite new in SSRS and I have a SQL Server database, until now every report was created at C# code level, with RDLC files implicit in the program. But now I want to move the reports to a report ...
3
votes
2answers
211 views

RAID10 vs. RAID5 for data files

We are trying to evaluate the potential performance improvements that could be gained by switching an existing applications .mdf files to a RAID10 LUN vs. the existing RAID5 LUN they are living on ...
1
vote
2answers
37 views

How can I get SQL Server restore start and end time information?

SQL Server error log reports only the end of the restore (ah doc restore) How can I get the start time? Is it stored somewhere?
0
votes
2answers
60 views

Is there a faster way of moving rows of data between SQL Server databases than using CTE's?

I use the following query on SQL Server 2012 Express to move data that is older than 4 days old out of one [primary] database and into another [secondary database] for archiving purposes. The only ...
0
votes
1answer
27 views

Prevent record from being inserted in the table in After Trigger

I have a scenario where I have to insert a record in TableA only if the RecordId exists in TableB. I have written an Instead of Trigger on TableA for Insert, in which I am checking if the RecordId ...
0
votes
0answers
27 views

How many cores does my SQL Server need? [on hold]

I have a SQL Server 2008r2 ("SQL1") running very well on a virtual machine with 8 cores. I have a license for 8 cores, that I could use for any version of SQL Server. Now, I want to setup a new server ...
-2
votes
0answers
10 views

What are Client Access Profiles and what are they used for?

Can someone please explain to me what Client Access Profiles are, and what they are used for? I have not able to find 1 single thing about them online in the past week.
-2
votes
0answers
30 views

Clean SQL Server database [on hold]

I have a database with one .mdf file of 3G and a log file. I moved two tables with 1.5G of data to a new file group and still the .mdf file is 3G in size What should I do to decrease the size of data ...
0
votes
0answers
16 views

Replicated databases across locations; delay in application

I have a replicated instance of database on different locations different SANs which is utilized for running a vendor supported application. However, I notice that there is a significant delay between ...
-3
votes
0answers
24 views

Monyog for SQL Sever [on hold]

I'm looking for a SQL Server Log Parser/Analyzer like Monyog for Mysql where I can load a log file and the parser can show me how often a query was executed (this is done by replacing literals so ...
2
votes
1answer
24 views

Implications of setting READ_Write

I am looking to update several users on READ_ONLY databases. As the databases are used 24/7 globally, and maintenance windows have just past, I would like to do this during a low-activity moment (to ...
0
votes
0answers
9 views

Azure Security for SQL Server Data

We are considering moving some of our database services to Azure but due to the kind of agreements we have with our customers having strict control over who can access the data is required. Based ...
0
votes
1answer
38 views

Search for first and lastname without order

maybe there is a simple answer to my problem: I have a mssql table ('Person') with a field for first and one for last name. I am coding a Program, where the User should be able to search for persons. ...
2
votes
0answers
70 views

Interpreting sys.dm_os_sys_memory

I try to figure out a way(using only TSQL) to determine if and how much the PAGEFILE (I will capitalize this term if I refer to the windows page file from now on) is used (like pagefileusage% ...
0
votes
1answer
58 views

Recommended number of index for a table

I've a table with many columns (~70) which contains computer's configuration. It contains approximately 50 000 rows. This table is very requested and all these column too. I use to run the following ...
0
votes
0answers
21 views

Grant permissions on stored procedure

I created a user in SQL Server 2012 database and revoked all permissions given by the public role. Then i granted exec permission on a stored procedure. The user can execute the procedure but cannot ...
0
votes
0answers
17 views

Load data into central database

We have 150 databases at different locations. These databases need to be move into central database. currently, i am using transactional replication, but facing lot of issues. are there any other ...
0
votes
0answers
19 views

Windows Server 2012 - Can't connect to database with PHP [on hold]

I have problems connecting to my database. We have bought a cheap used windows 2012 IBM Server which is hooked up in our network. It has PHP 5.6 installed as well as SQL. I've only worked with ...
0
votes
2answers
29 views

connect to server with IP address running sql-express instance through sql-management studio

I have my VPS server in a remote location with ip address 172.16.11.2 (for example) having two instances of sql-server express running. one instance is Microsoft SQL Server 2008 R2 (SP2) where I ...
1
vote
0answers
33 views

sys.dm_os_volume_stats problem

Today I have been having quite an interesting issue, which I can't seem to fix. I am getting drive information for a Failover Cluster Instance SQL Server 2012. These drives are Volume Mount Points. ...
0
votes
1answer
29 views

SQL Server Configuration Manager returns remote procedure call failed

I open the SQL Server Configuration Manager and it returns remote procedure call failed. This is Windows 7 Ultimate version, SQL Server 2008 R2 Express version with advanced services. Previously I ...
2
votes
1answer
61 views

Differentiate SQL Server Express from SQL Server installed in a server

I own a VPS server and I was told SQL Server 2008 R2 Express edition was installed on Windows OS 2008R2. When I opened the SQL Server configuration manager I saw this: I thought I should see only ...
0
votes
1answer
22 views

check if found specific record then find another record with the same group

I have a table Master table PROBLEM_ID PROBLEM PGROUP 1 Other Hardware Hardware 2 Error On hardware Hardware 3 PM Hardware 4 ...
0
votes
0answers
53 views

Efficient way to transpose large categorical column to one-hot table row

I have a varchar column containing ~ 8000 unique values and 500k rows. I need the column transposed so that the column headers are the unique values and the values in the rows are 1 where the row has ...
0
votes
1answer
18 views

Delayed transactional replication setup?

I will need to setup transactional replication for a big database. I use backup/restore to initialize the database because it's too big to use snapshot over slow network. So the following steps are ...
0
votes
0answers
7 views

Push all SQL Server changes to a non-SQL Server platform [on hold]

What is the best approach for capturing all the changes (all creates, inserts, updates, and deletes) and sending those into an external platform like Datomic for history/reporting/auditing? I'm ...
0
votes
1answer
17 views

What causes disk space growth from Informatica load onto SQL Server?

We've been dealing with huge disk growth on SQL Server from Informatica. After the load, the database grows to 2.4TB. After the database shrink, it goes to 1.05TB. What could likely cause this to ...
0
votes
1answer
27 views

SQL Server Full Text Search Engine is not returning consistent results

I'm working on an application that makes use of the Full Text Search Engine from SQL Server. In order to convert the user input into readable parameters for SQL, i'm using This very useful FTS query ...
1
vote
0answers
23 views

Inserts/updates are extremely slow with Merge Replication in SQL Server 2008

I got hired into a new company and they had merge replication already in place. They have had issues with it to the point I have to evaluate whether to keep it or replace it. The main issue is it ...
0
votes
0answers
12 views

maximum server memory setting in SQL Server [duplicate]

Just had a memory issue on a 64GB of RAM machine with SQL Server 2012 SP2. 3 running db engine instances, each limited to 16GB (16384). But noticed in Task manager that sqlservr.exe was at over 30GB ...
1
vote
1answer
23 views

SQL DATEDIFF coercion differences between databases on same SQL instance?

I have a data coercion mystery. I am seeing two different behaviors from DATEDIFF for the same query, and I cannot understand why. This is an extract of the relevant part of the query in question, ...