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

How do I include nulls during comparisons in SQLServer? [duplicate]

So basically in SQLServer a NULL means there is no value and thus can't be compared which returns some unexpected results. For example, the following query doesn't return rows where value IS NULL but ...
0
votes
0answers
22 views

Errors in the metadata manager. The process type specified for the Effect dimension is not valid since it is not processed

Trying to hunt down an issue with an SSIS package we have and I don't know what to look for to help correct this issue. Error: Errors in the metadata manager. The process type specified for the ...
1
vote
2answers
62 views

How to find usage of each object in other objects from a database?

I am with the task of taking an old SQL Server database and identify all of it's objects and their relationships, because the one who made it did not bother to use any foreign key, he just made all ...
2
votes
1answer
45 views

SQL server Index rebuild and restore not working

Hey everyone I am having an issue with my database. Below is a copy of CHECKDB. When I attempted to do a restore from a backup the restore had the same errors. It appears that my details table is ...
0
votes
2answers
49 views

SQL Server Backup Proposal

Our current system setup sees each server backed up by 3rd party software(Veeam). The backup for our Database server occurs once each night. Alongside this, there is another 3rd party tool that ...
0
votes
1answer
61 views

What should I consider before I upgrade my SQL Server memory? [on hold]

I want to upgrade the memory in my SQL Server. What should I check first? Version: SQL Server 2012 64-bit Standard edition
5
votes
1answer
244 views

Why are U locks required when using Read Committed Snapshot Isolation

I consider myself a beginner at Sql Server locking. My understanding is that when using RCSI, Sql Server doesn't need to issue S locks because it uses row versioning (in most cases). From ...
0
votes
0answers
27 views

How do I view my database once I connect it to my website? [on hold]

I'm creating my first website. I'm connecting a SQL Server database to my website to connect to forms that users will fill out. I need to see the information that the users input. I am using ...
0
votes
0answers
12 views

How can I import a Microsoft SQL database using Plesk Panel 9.5? [on hold]

I created a database in SQL Server Management studio. How can I import this database (all tables, settings) to a server using Plesk Panel? I heard there is a script; how can I find it?
0
votes
2answers
75 views

SQL Server 2008 R2 memory issue

I have read many posts regarding the memory but still its not clear. I have dedicated server SQL Server 2008 R2 with Windows 2008 R2, 32 GB RAM, 2 6 core processor and a database of around 60 GB on ...
-2
votes
2answers
59 views

Recovery from lost SQL Server data file [on hold]

I am wondering what the process would be to recover data from a lost data file in SQL Server. Up front this is a hypothetical situation but let's say that there is no backups available and a data ...
0
votes
2answers
103 views

Long running simple query SQL Server 2008 R2 [on hold]

I have a very simple query running in a SQL Server 2008 R2 instance: SELECT TOP 10 * FROM messages m INNER JOIN recipients r ON m.id = r.id WHERE m.timeStamp > '2014-07-14T00:00:00.000' AND ...
4
votes
1answer
87 views

FULL recovery and differential backups

I am going to begin transitioning several of our databases to FULL recovery from SIMPLE. I asked a question last week regarding deployment strategies and I have one additional question. Consider ...
0
votes
1answer
36 views

Is there a better way to filter error logs?

I find it hard to believe that there aren't better native tools to filter SQL Server Error Logs. Even Windows Logs have better filtering capabilities. I'd like the ability to remove certain events ...
2
votes
3answers
122 views

Collecting Wait Stats

We currently use a monitoring tool which shows us our top wait stats either by number of waiting tasks or total wait time. Below are the wait stats by number of tasks waiting and also wait time per ...
0
votes
1answer
87 views

Database revision needed for sports events database

This is not a code review but more of a database schema review. I have a sports events website that I am doing in my spare time. I need assistance with the database design. I am about 80% completed. ...
1
vote
1answer
44 views

DBCC Results: page ID contains an incorrect page ID in its page header

DBCC results for 'tablename' Msg 8909, Level 16, State 1, Line 1 Table error: Object ID 1637580872, index ID 1, partition ID 72057596516040704, alloc unit ID 72057594048020480 (type LOB data), page ...
2
votes
1answer
93 views

Where is SQLCMD.EXE in SQL Server 2014 Express?

Using "SQLCMD.EXE" to back up my SQL Server Express databases for years I just discovered that after installing the 2014 version, I found no SQLCMD.EXE anymore. In previous versions it was located at ...
6
votes
2answers
358 views

Explanation requested for slow DELETE with SQL Server

I would like to get some extra insights/reasoning for SQL Server delete behavior. We have a fairly large database of over 1800 GB. In there are some very shallow tables (only a few integer columns) ...
0
votes
1answer
41 views

select multiple columns group by one with inner join

I have a problem with group by, i wanna select multiple column but group by only one column these below code which is i am used but its given a error. SELECT ...
2
votes
0answers
36 views

How do I pass a parameter in a stored procedure to call a DTS package

I have created a DTS package which fetches data from a text file into a database table. I want to pass the file name dynamically from which it fetches data. Can I pass the filename dynamically?
0
votes
2answers
64 views

Open Transaction that won't go away SPID Ns

There is a transaction that has been open on this instance since it was restarted and is preventing us from clearing the ldf. Here is the transaction information: Transaction information for ...
1
vote
1answer
42 views

Single row to multiple rows with column combination

I have a table like this: ╔═════╦═══════╦════╦════╦═════╦═════╦═════╦═════╦════╦════╗ ║ ZIP ║ STATE ║ F ║ C ║ F1 ║ c1 ║ f2 ║ c2 ║ f3 ║ c3 ║ ...
2
votes
2answers
79 views

Way to do MERGE with update source when target not match?

I am trying to write a stored procedure that will take new values from a temp table, merge them into an actual table, giving me the ids of the inserted rows, and the rows that already exist matching ...
2
votes
1answer
46 views

Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes

I try installing SQL2008R2 - SQL2012 - sql2014 2014-07-17 16:31:16.00 spid14s Error: 17190, Severity: 16, State: 1. 2014-07-17 16:31:16.00 spid14s Initializing the FallBack certificate failed ...
0
votes
2answers
44 views

How to provision the SQL Server Agent service after SQL Server Edition upgrade

I have upgraded SQL Server 2008 R2 Express to SQL Server Standard Edition. After I have upgraded it, the SQL Server Agent was stopped. I have tried to start but it fails. Only when I have changed ...
0
votes
2answers
80 views

Upgraded from SQL Server Express to standard but CPU usage is maximum 50% on dual core [closed]

I have upgraded SQL Server Express 2008 r2 to SQL Standard Edition on amazon EC2 with a Intel Xeon E5-2670 v2 (Ivy Bridge) Processors with 2 vCPU. I have verified the edition by running this: SELECT ...
2
votes
2answers
100 views

Table with 4 million records - different size and performance in development and production

At my company we use SQL Express 2008 R2, which supports databases up to 10GB. We have 2 databases with almost the same number of rows in all tables. But, one of them is 4.5 GB in size (which is in ...
-5
votes
0answers
35 views

Microsoft SQL Server 2008 error 29 [closed]

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and ...
0
votes
1answer
23 views

SQL Server 2012 Vs PDW [closed]

We are migrating to SQL server 2012 to PDW. Any SQL script for Comparing the data between SQL server 2012 and Parallel dataware house or any tools to compare.
0
votes
0answers
24 views

Logical read count varies

In this post the writer runs a query several times. I notice the logical reads vary a little across executions. There is a difference of about 2 pages in a total of a few thousand pages read. It ...
0
votes
2answers
78 views

Query Optimization required - Subquery using Inner Join

Could anybody advise how can I optimize this query below please? SELECT IT.[iInternalTransactionID] , IT.[iInternalAccountID] , C.[iContractID] , IT.[dtTransactionDate] AS TransactionDate , ...
6
votes
1answer
53 views

Why Does UNPIVOT Work on Compatibility Level 80 DB?

I'm trying to pull data using UNPIVOT on a SQL Server 2008 SP3 database running at Compatibility Level 80. This should mean UNPIVOT doesn't work, but in my case it does under certain circumstances... ...
2
votes
1answer
52 views

SQL Server 2012: NUMA node shown as offline without special affinity settings

My main production server has four NUMA nodes with two SQL Server 2012 instances on it. One of the instances has the CPU affinity set to use only one NUMA node, and sys.dm_os_nodes reflects that ...
0
votes
0answers
32 views

The fulltext catalog upgrade failed because of an inconsistency in metadata between sys.master_files and sys.fulltext_catalogs

I am using sql server 2008 and when trying to restore .bak file I'm getting this error: The fulltext catalog upgrade failed because of an inconsistency in metadata between sys.master_files and ...
0
votes
2answers
77 views

How did my databases shrink?

I have a nightly job that monitors database and log file sizes. Over time the databases grow. Last night some databases actually shrank in size. The logs show no SHRINKFILE OR SHRINKDATABASE ...
0
votes
1answer
33 views

Batch converting indexes to keys [closed]

I have a legacy MS SQL Server database where all the primary and foreign keys were created as indexes. I am developing the new version of our software with Entity Frameworks, which I have learned ...
0
votes
0answers
37 views

Database design for large incoming data

I've been tasked to design a database to handle a large volume of incoming traffic from sensor readings, possibly 1,000s an hour when it's at full strength. Each reading will be relatively short - ...
0
votes
0answers
43 views

SQL Server 2000 Named Instance cannot connect remotely

To facilitate a migration I installed SQL Server 2000 Standard Edition and Service Pack 4 as a named instance on server with an existing instance of SQL Server 2008R2 RTM. The issue I have is ...
2
votes
0answers
57 views

Stored Procedure slow after weekend

When I come to work on monday some stored procedures take several minutes to execute and STATISTICS IO shows a lot of PHYSICAL READS and READ AHEADS going on. However, after running the procedures ...
0
votes
0answers
24 views

The OLE DB provider “SQLNCLI10” for linked server “(null)” indicates that either the object has no columns or

When I run the following script its run fine merge RDW_RRR_MAIN_ST.dbo.tmps AS dest USING (select * from RDW_RRR_MAIN_ST.dbo.tmprole cross join RDW_RRR_MAIN_ST.dbo.tmpscreen) as src1 on ...
1
vote
3answers
99 views

Preventing SQL Injection

I know that this is very dangerous: EXEC sp_executesql 'SELECT * FROM ' + @Table But, is this safe from SQL injection? IF EXISTS(SELECT * FROM information_schema.tables WHERE TABLE_NAME = @Table) ...
21
votes
8answers
2k views

Security implications of restoring a backup from an unknown source?

Scenario: You're handed a database backup and told to restore it to a server (that's already hosting other databases), but are given no useful information about what the backup contains or whether the ...
1
vote
0answers
16 views

Update Only Rows With Shared/Similar Value [migrated]

OK - I have a simple table - below - what I am trying to do is to identify only those rows that have a shared value - so anything that has a shared "apc" value - DO x else Do Y CREATE TABLE #test ...
0
votes
0answers
55 views

A working view now starts timing out

I have 2 identical databases (one larger, one smaller) with identical views. Recently a view on the smaller DB started timing out. Google searches seems to point to deadlocking of some sorts. If I ...
4
votes
1answer
65 views

Symmetric difference operation in Transact-SQL?

I have always known about the UNION operator in SQL, but only recently discovered that there were other set operators, INTERSECT and EXCEPT. I haven't been able to find an operator that does the ...
-4
votes
0answers
20 views

confused to implement condition in stored procedure [duplicate]

I want to prove two condition in my stored procedure as follows: if I found the same record in database, it should not save the record and return 1. if I found more than 4 records for the same ...
-3
votes
1answer
47 views

Getting number of errors in stored procedure [closed]

I am getting an error in stored procedure as follows: Msg 156, Level 15, State 1, Procedure K2_CHECKENTRYINFILELOG, Line 27 Incorrect syntax near the keyword 'if'. Msg 102, Level 15, State ...
0
votes
1answer
36 views

Sql Server sys.Traces log

Working with traces on production server I found some mysterious entries to me in sys.Traces, When I run below query it shows me status of all traces as ‘Paused’ along with entries in ...
-2
votes
0answers
68 views

Writing a Condition in a Stored Procedure Using If Exists

I have a stored procedure which is working. I want to check two condition in my stored procedure: If I found the same record in database it should not save the Record, it will return 1. If I found ...