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
1answer
5 views

How can I detect the availability of sp_addextendedproperty on sql server

How can I find out if sp_addextendedproperty is available before trying to use it in a sql script? I gather it's not available on Azure. (I'm working on this bug, if you're interested).
0
votes
0answers
10 views

Output in SQL Profiler has results with Database ID as NULL

I ran profiler to filter out certain applications connecting an environment but the results has application for Database_id "NULL".. Am I missing anything ? Also another question , does all the ...
0
votes
0answers
26 views

When there is a composite index and those columns are in query, does it use index seek?

I have a table staff having columns, name, year,month and date. I have a composite index on year,month and date. If I have a query like below, will it use index seek scan? select * from staff where ...
0
votes
0answers
11 views

Auditing database administrator actions with SQL Server 2014 Standard

We have a requirement to audit database administrator access to customer databases - at a minimum, knowing which customer database they were accessing (and ideally why). Without upgrading to SQL ...
1
vote
0answers
27 views

Performance impact in orders of magnitude with Dynamic SQL

This started as a problem debugging a SSRS performance problem where I found reports were timing out when they previously weren't. Finally I traced down the SQL the report server was submitting, and ...
0
votes
0answers
6 views

SQL 2005 Cluster Service pack 4 upgrade failure at remote user account

I built SQL Server 2005 ENT Cluster on Windows Server 2008 R2. I need to upgrade it to SQL Server 2005 SP4. However, I get this error at the Remote User Account screen" "Enter the remote user account ...
3
votes
0answers
16 views

Launching SQL Agent Job from stored procedure not on [msdb] database, or, How Necessary is SET TRUSTWORTHY ON?

(With apologies in advance since I've been asked to pick up a project written by someone with more skills than me but who I can no longer ping for questions. If it sounds like I may be using ...
1
vote
0answers
14 views

SQL Agent AD account gets permission denied for ODBC connections in SSIS packages

We have an AD account specifically created for the agent service and when running SSIS packages that connect to databases we get permission denied even though we have granted that account access to ...
1
vote
0answers
20 views

Unable to install SQL named instance as it says RS feature exist, even after dropping it

We are trying to Un-install a named instance from one of our servers. But, don't know why it did not un-installed the reporting services even after proper selection was made during uni-install. ...
-3
votes
0answers
19 views

Cannot connect to database server 2008-r2 [on hold]

I installed SQL Server 2008 r2 but when I try to connect to Db instance with any application, (Sql management, Sharepoint ecc) I got the message that cannot find any Sql database Server. Every SQL ...
0
votes
0answers
45 views

Table-valued Function XML Reader [on hold]

What makes the Table-valued Function XML Reader so slow? We are using SQL Server 2012 Standard to shred XML columns into tables and find it to be unacceptably slow for our business environment. The ...
1
vote
1answer
20 views

removing sql logins from one server, after migrating to another server, but all the databases were not migra

Here are the details of the production environment: I have 2 serevrs, A1 and A2. I have completely transfered 100 logins from server A1 to A2. Server A1 contains 5 DATABASES. But I moved only 2 ...
-2
votes
1answer
28 views

Retrieve multiple rows from table2 based on single row from table1 in SQL Server [duplicate]

I have two tables and I am using SQL Server. table1 structure is Campiagn_Id Campiagn_Name 1 test1 2 test2 3 test3 and table2 structure is Campign_Id EmalList ...
2
votes
2answers
68 views

How to backup full transaction logs for SQL Server 2008R2

I have a 32GB Database with over 7GB logs (DB name: XYZ). I'd like to copy the DB with all of the logs. I thought that I can simply run: ... ALTER DATABASE XYZ SET RECOVERY FULL; BACKUP DATABASE XYZ ...
1
vote
1answer
24 views

High Page Faults/sec low Page Reads/sec

I currently have Page Faults/sec avergaing 1269 while my Page Reads/sec is averaging 0.3. I am just trying to interpret what this means. I assume I am getting lots of soft page faults in this case ...
0
votes
2answers
32 views

why the optimizer doesn't choose the optimal plan [on hold]

I know, if the statistic is not updatad, it is possible, that the optimizer doesn't choose the optimal execution plan? Does any other reason/reasons exist?
2
votes
2answers
302 views

Getting all databases which a sql logon can connect

I need to know all databases in a SQL Server on which a user can connect. With sys.databases I get all databases and with sys.server_principals or sys.syslogins I get all server logons. But I can't ...
1
vote
1answer
30 views

Advantage of exposing data model to customers using our product

We have a product through which we provide a standard definition to customer's asset data. The problem currently lies in importing customer's data from different types of data sources to our data ...
1
vote
2answers
18 views

Receiving the following error in step failure of an agent job:

SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x00040EDA Description: "Warning: Null value is ...
1
vote
0answers
20 views

Create Nested XML in a Sql Server Indexed (Materialized) View

This page https://msdn.microsoft.com/en-us/library/ms188276.aspx indicates that if you wanted nested XML (ie an XML Tree) then you need to setup your query like this: SELECT Col1, Col2, ...
0
votes
1answer
12 views

Analyse and report disk usage growth historically

Is it possible to use historic information to show disk usage growth? I haven't keep much in the way of database setup and disk usage information. So I can't say how much disk growth has occurred in ...
-2
votes
0answers
32 views

Repair SQl server 2000 [on hold]

I need to Repair SQL Server 2000 by means of repairing it and not installing it or uninstalling it. Is there a way of repairing the system files without them being removed?
1
vote
1answer
36 views

Another Dynamically alias column question

I might be asking the same question as this, but perhaps if I ask it my way, a different solution may become obvious. I have this: DECLARE @Table1 AS TABLE( Table1ID Int Primary Key ,ColumnName ...
0
votes
1answer
12 views

Switching a partition on a table with one to many relation

There is two main tables in database (SQL Server 2014) table1: ---------------------------------------------- id name datetime image table2: -------------------------------- ...
-2
votes
0answers
28 views

How can we restore shipped transaction log files in SQL Server 2012 to an online (being used) database without stopping the DB? [on hold]

How can we restore shipped transaction log files in SQL Server 2012 to an online (being used) database without stopping the DB? Is there any way to copy data from an online database to another online ...
0
votes
1answer
26 views

SQL Service Broker and AlwaysOn Issue

I'm having an issue setting up my current environment using AlwaysOn and SSB and I'll try to explain as best as I can here: Current environment: Server A Server B database x(Pub) ...
2
votes
0answers
12 views

MS SQL Parsing with XPath Performance

I have a UI that allows a user to select certain data points they want to filter the results by. There are things such as location, department etc. Once they have selected all of the options, I ...
1
vote
1answer
121 views

Dropping person while their connection sleeping in SQL Server

I have a C# application that communicates with SQL Server. When I try to drop a user that recently had a connection with SQL Server, it gives me an error that I can't delete them because they have ...
1
vote
1answer
41 views

SSRS Blocking Processes

We have a busy SSRS Reporting server (SQL Server 2008 R2) on which we see frequent blocking between the below processes: [dbo].[CheckSessionLock] [dbo].[WriteLockSession] We are aware that some ...
2
votes
0answers
51 views

Query looks optimal but logical reads is huge

I run the following (really simple) query in SQL Server: SELECT MAX(PK_Field1) FROM MainTable kh WHERE kh.PK_Field1 >= '2014-12-01T00:00:00' AND kh.PK_Field2 = 1572 AND ...
0
votes
0answers
17 views

How to clean DBMIRROR_EVENTS_QUEUE process on broken mirror?

We setup mirror (on SQL Server 2008 R2), but it fails during the setup. After that the mirror was moved on another server. My problem is that it left some process, because on that server I see active ...
1
vote
3answers
33 views

SQLSERVER Use only PRIMARY partition by default

My database has 2 partitions files: PRIMARY, DATABASE_ARCHIVED. A lot of tables have a column "archived". When archived is 1 row is in the DATABASE_ARCHIVED partition. When archived is 0 row is in the ...
2
votes
1answer
35 views

Where is SQLCMD.EXE in SQL Server 2014 LocalDB or how to install it?

On a machine with SQL Server LocalDB 2014 installed I am looking for SQLCMD.EXE file but cannot find it anywhere. Is there a way how to install it separately? Unfortunately I am not local admin of ...
2
votes
0answers
42 views

I need the reason why we should not install SQL server on the domain controller

I am a system administrator for a small firm. Now we consider to rollout Windows Server 2008 R2 for the firm. We plan to implement Active Directory. We would also like to upgrade RDMS, from SQL server ...
0
votes
0answers
25 views

Load Large data set SSIS AWS EBS

We have configuration of SQL 2012 std edition hosted in Amazon cloud that has data disk of 3 TB, Index disk of 3 TB, Log disk of 500 gb all raid 0 stripped. Am trying to load a table that has 8 ...
0
votes
1answer
27 views

Grant Select on some columns for specific user

I have a windows group with 20 people and all 20 people in the group were revoked access for some columns in the table. Now I need to add the select permissions for 2 of the users in this windows ...
1
vote
2answers
47 views

Running a T-SQL job under another user

I cant find my proxy user to "Run as" that user !? I am confused which kind of proxy user is appropriate to run a job with a simple T-SQL command. (I have created a credential and proxy but cant find ...
-3
votes
0answers
45 views

How to avoid Row cannot be located for updating error [on hold]

I'm giving support for an app that interacts with a MSSQL database and when trying to delete a record it gives me below error : Row cannot be located for updating. Some values may have been ...
0
votes
0answers
30 views

mdf files too big in SQL Server 2005 [on hold]

I hope someone can advise me on what to do here. I am running my database on SQL Server 2005. I had created a backup maintenance job myself using the SQL Server Management Studio, when using a ...
5
votes
1answer
65 views

Select all records, join with table A if join exists, table B if not

So here's my scenario: I'm working on Localization for a project of mine, and typically I would go about doing this in the C# code, however I want to do this in SQL a bit more since I am trying to ...
0
votes
1answer
10 views

Questions concerning performance/production resources where exporting / importing big data sets

I have a MS SQL Server database that contains data for many customers and I am working on a feature to export a single customers data. I have basically created a script that generates inserts for all ...
0
votes
1answer
36 views

is there a way to configure Azure SQL databases for high-insert scenarios?

I'm working on a legacy application that uses SQL Server as a backing store. There's a portion of the app that does a ridiculous amount of inserts to a single table. Re-architecting this portion of ...
0
votes
0answers
17 views

Changing the Service Account with SQL Server Mirroring

As the title suggests we are looking to change the service account of a SQL Server mirror implementation. I will be using the same account on all 3 servers involved in the configuration. I know each ...
3
votes
1answer
104 views

Get IO stats request sql like activity monitor

Is it possible to get the same value as in the activity monitor (SSMS) for the "Database IO" as a result of a SQL request? click to enlarge
1
vote
1answer
27 views

How to generate an error when backing up to an existing file

I'm using SQL Server's BACKUP command and I want the operation to generate an error if I attempt to write to an existing backup file. By default, SQL Server seems to append to an existing file. ...
0
votes
2answers
48 views

Query to get data in one status not in another status

I have a table with status column with different status values like 'A','C','E','I'. My data is like this: ---------------------------------------------- TagNo TruckNo VerifiedDateTime ...
2
votes
0answers
18 views

SSIS: FTP task - concurrent connections

I have created an SSIS package for downloading file from FTP server. When I debug the package, everything goes fine. But when I shedule the package as Job step, it sometimes fails to connect. The job ...
0
votes
0answers
39 views

SQL Server consuming large amount of RAM [duplicate]

I have Server 2012 with two 2.10 Ghz processors and 64GB of RAM. I have SQL server 2008 installed on this server. but this SQL server is consuming 70-80% of memory. I have limited SQL memory to 24GB ...
0
votes
1answer
50 views

need to find instances which have multiple rows with the same userID and ResourceID and have a location of 1 and also have other locations [on hold]

I have a table with User_ID, Resource_ID, Location_ID, INstance_ID 1,1,1,1 1,1,2,2 1,1,2,3 2,2,3,4 2,3,3,5 2,3,5,6 3,1,2,7 3,1,7,8 4,4,1,9 4,4,2,10 5,5,1,11 1,1,3,14 4,4,1,15 1,1,10,18 1,1,1,19 ...
0
votes
3answers
52 views

Time sheet, rates, date dependent

I am trying to figure out the best database design for the following; I have individuals (stored in Agents table) that enter their billing or time worked each day for different projects. Now we have ...