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

SQL Server Transactional replication - virtual box being the subscriber

I would like to ask if it is good practice to have the SQL Server transactional replication taking place from a physical box (publisher) to a virtual SQL Server (subscriber)? Regarding the ...
0
votes
0answers
15 views

SQL Server membership in asp.net [migrated]

I have inherited a asp.net 2.0 app that I have upgraded to 3.5. One of the odd things with this is is in the membership service it was set to use AspNetSqlMembershipProvider and it has an application ...
3
votes
4answers
168 views

Get object script in SQL Server via T-SQL?

I need to get the creation script of an object in a SQL Server database. I need the exact same script that was used to create it. Like when you use SSMS to alter a view you already defined, and then ...
0
votes
0answers
28 views

How to move records to another database and free some space

We do monthly a "cleanup" of the database: we set the database in simple recovery mode and then we move records to an historic database so we can delete from the original for free some space with DBCC ...
0
votes
1answer
34 views

Preventing database access after application license key has expired

I'm fairly new to this so forgive me if this is a basic question. I have an application that uses a MS SQL database as the back-end. Like most applications, a user is prevented from using this ...
2
votes
4answers
39 views

How can I compare the schema of two databases?

Is there a way to find the differences in two SQL Server databases (schema only). One is local and the second is at a customers site. We are experiencing problems with crystal reports running some ...
3
votes
0answers
46 views

Take action from extended event?

I've seen it mentioned a few times that you can configure an event session to take an action when an event fires. Does anyone have any information on how to do this? I know that you can use the ...
0
votes
0answers
28 views

Supplied parameter sid is in use when creating a Login in Sql server

I am trying to transfer the logins from the production instance to the test instance after a refresh activity for restoring the DB's regarding the same. From the output of sp_help_revlogin on prod ...
4
votes
2answers
38 views

Separation of Duties - Can a DBA patch or Upgrade a SQL Server 2008 R2 DB without TDE Encryption keys?

Are there any considerations I should have in mind when I patch or upgrade a TDE encrypted database? In the context of separation of duties, does the person executing the patch or upgrade process need ...
1
vote
1answer
54 views

SQL Server : Job not reconnecting to restarted Linked Server

The problem To keep two tables across two servers in sync, we have a trigger that adds a change to a MergeTable. Every so often, a merging job runs on SQL Server to push the changes to the Progress ...
0
votes
2answers
83 views

Backing up a really huge SQL Server database

We have a SQL Server 2008 database of size over 200GB. There is no disk space on the server to take a backup. I really need to take a backup or make another copy of this database. what would be the ...
9
votes
1answer
245 views

Isolation of SQL Server UPDATE

Let say I have two queries: -- First session UPDATE Person SET Name='Jonny', Surname='Cage' WHERE Id=42 -- Second session SELECT Name, Surname FROM Person WITH(NOLOCK) WHERE Id > 30 The ...
0
votes
0answers
6 views

Does SQL Azure Data Sync conflicts get logged?

I have successfully synced my SQL Azure DB with my on-premise DB. The log shows the following: Sync completed successfully in 1884.76 seconds. Upload: 405323 changes applied Download: 0 ...
2
votes
2answers
103 views

Updating indexes and stats script

I am having the following errors with the script below Msg 102, Level 15, State 1, Line 44 Incorrect syntax near '?'. Msg 319, Level 15, State 1, Line 47 Incorrect syntax near the keyword ...
1
vote
1answer
21 views

How to use a variable for object's owner (schema)?

In Oracle we can use a variable instead of the object's owner. The value of this variable will be prompted by Oracle when the scripts starts. Something like CREATE TABLE **&owner.**MY_TABLE. I'm ...
1
vote
1answer
32 views

Restoring a Database in an Availability Group

I located an extremely helpful process outlined in the thread below, but needed some clarification. This may be a silly question, but I'm a bit new to Availability Groups. In the steps outlined in the ...
0
votes
0answers
57 views

Why am I unable to use a temporary table more than once on my Stored Procedure?

I am using SQL Server 2008 to build a stored procedure. On it, I create a temporary table (#results) using recursion for getting all the ancestors given a specific record. My specific problem is, ...
0
votes
0answers
58 views

Query to match exact column or partial data of the column: SQL Server / Azure

Bit confused on how to get it work better than what has been done now. I am new, apologies if I'm asking for too much. I have trip details which have from and to locations stored in database from ...
0
votes
1answer
15 views

SQL Server 2012 SSIS : retrieve line number in Flat File Connection Manager

I'm developing a ETL, that uses a FFCM to parse data from a csv and loads it in a SQL Server table. Some float data aren't parsing properly, so I need to see the result in the table and get back to ...
0
votes
2answers
43 views

Max Degree Of Parallelism [closed]

What is the Best Practices for Enabling and Disabling the MaxDop Setting for SQL Server on regular basis. Is it ok to create a job and run the job as required or have the script stored as SP?
0
votes
1answer
97 views

Error 29527: While upgrading from SP1 to SP4 in SQL Server 2005

We are trying to upgrade from SP1 to SP2 in SQL Server 2005 test box for a named instance. Initially we got the error MSP Error: 1260 Windows cannot open this program because it has been ...
1
vote
2answers
119 views

SQL Server Standard edition attach partitioned database

I have a little problem. I'm using a SQL Server database version 11. I have to change database edition from enterprise to standard. I overlooked fact that standard edition doesn't have partitioned ...
2
votes
2answers
93 views

Current SQL Server services configuration

I know I can use SQL Server Configuration Manager to determine 1) Which services are currently running and 2) which services are set to auto start. However, I have several dozen servers I manage. I'd ...
0
votes
0answers
16 views

How to Handle Jobs/Security/Stored Procs and Functions Across an Availability Group in System Databases

I'm fairly new to AG. We have the syncing up and running fine but I'm trying to account for failures and handling of stored procedures/functions/etc in the system databases (master, msdb). Are there ...
0
votes
0answers
9 views

Upgrading SSIS with Two SSIS Services Installed

I inherited a server with two SSIS services, one 2012 and one 2014. It looks like due to some type of incompatability with a 3rd party application, someone deactivated the 2014 SSIS and so the server ...
0
votes
1answer
46 views

Alternatives to Linked Servers (Allow Inline SQL with Parameters)

I am trying to find a solution to execute inline SQL with parameters against some liked server databases. From what I have found online the only proper way to query a linked server is to use ...
1
vote
2answers
113 views

Computed Column Bit based on other Bit Columns

What would be the formula to compute a bit column from other bit columns? For example: CREATE TABLE #Employee ( [empNumb] [INT] identity(1,1) PRIMARY KEY, [IsOk] [BIT] NOT NULL, -- ...
2
votes
1answer
41 views

Untraceable error importing Huge dataset with SQLCMD

I am currently doing an internship and I received a 42 gb ms sql-server import script. I tried to import the script using the ms SQLCMD tool all at once. It ran for 30 minutes and then I got the ...
2
votes
0answers
41 views

SQLNCLI10.x vs 11.x when connecting SSIS 2008R2 to a SQL Server 2012 database

Starting from the question and working backwards. My question: is it OK to use SQLNCLI10.1 as a provider for SSIS 2008 R2 to connect to SQL Server 2012 database(s)? I have a SSIS box running SQL ...
0
votes
0answers
28 views

Fastest way to compare polygon geometry types

We have two tables which has polygon geometry stored in them. I would like to fetch the polygons present in one table and not present in another table.. As of now I am doing a left outer join and ...
2
votes
2answers
74 views

Is it a good idea to create an index for each column in a new table? [closed]

I will short my question. (SQL-Server 2008) Is it a good idea , when crating a new table, to create an index for each column? Why i'm saying this? Today I was creating a database, and my boss was ...
2
votes
1answer
64 views

How does the transaction log record a transaction?

We all know what SQL Server's transaction log records information about the transaction. But what, in a full recovery model, is actually recorded in the transaction log? You'll say: THE TRANSACTIONS! ...
0
votes
1answer
25 views

Install Full Text search on existing instance

We have an existing sql server 2012 instance but without full text search. before I add the feature, I want to know if it stops or restart the instance since it is for production. thanks in advance.
1
vote
3answers
53 views

Select from two different tables and group by dates

I'm new in databases so I need help. I have two tables: First table: | Date .........| Diagnostics ................| ID ...............| | 2015-03-08 ...| Diag1 ......................| 2932 ...
0
votes
1answer
83 views

How calculate the time difference between two consecutive rows

I have a table tickets with ticketid,owner, owndate columns. The table is as.. ticketid owner ownerdate 1001 LEWIS 2004-06-18 14:15:11 1001 WILSON 2004-06-18 14:16:54 ...
0
votes
1answer
40 views

Please help in understaning DeadLock Graph

<deadlock-list> <deadlock victim="process46d288"> <process-list> <process id="process46d288" taskpriority="0" logused="9968" waitresource="PAGE: 14:1:4468703" ...
0
votes
1answer
22 views

SQL Server unique index, per subset of data, based on values of another column

Say I have a Customers table, and an Emails table. Emails table has these fields: Id CustomerId EmailValue Now, I want to create a constraint so that no duplicate emails should be ...
0
votes
1answer
29 views

I am trying to loop through my counter to create a dynamic sql query which should finally look like [closed]

I am trying to loop through my counter to create a dynamic sql query which should finally look like I am trying to use this approach to get the final query but does not seems to work declare ...
0
votes
1answer
27 views

What query specific counters / metric if any are exposed for monitoring outside of SQL Server itself?

I am aware of generic Microsoft SQL Server Performance counters and other ways to monitor general SQL server performance through monitoring system, files, and executable performance, and its internal ...
0
votes
0answers
5 views

Denormilization when using SSDT Analysis Services to Build Mining Structures

I'm interested in building a mining structure from a normalized table. This mining structure is intended to be used for modeling of several datasets within the normalized table. I'm finding that I'm ...
6
votes
1answer
98 views

Can SQL Server be configured to backup to a network share through a separate NIC?

We're in the process having our SQL Server instances backup to a network share, but our network admins want to try and divert the bandwidth from the backups through a different network segment. I was ...
2
votes
2answers
120 views

Insert/Update Stored Procedure

My database model is quite simple. I have the following tables: Monitor, Computer, and Monitor_Computer_Map as my mapping table for a many-to-many relationship between the other two tables. I have a ...
1
vote
1answer
55 views

Keep Execution Plan in Cache - SQL Server 2012

How can I keep a query execution plan in SQL Server's cache and use it several times? When I execute a query for the first time it takes 7 seconds. After that it takes only 1 second. This query is ...
1
vote
1answer
81 views

What is an index KEY - emphasis on KEY?

In SQL Server, What does the 'key' part of the phrase 'index key' mean? Is the key a number? what is it? If I have the table of data containing a column called LastNames, and I have, say, a clustered ...
0
votes
2answers
56 views

Identy Column To Generate Flag Values

Sometimes there is a need to have the rows of a table have a flag type value which can be and-ed and or-ed by the end user. This of course can be accomplished by creating a new column or putting in ...
2
votes
0answers
76 views

Is it possible to have different authentication mode for SQL Server Database Engine and corresponding SQL Server instance?

I have installed the x64 SQL Server 2008 R2 Express with default settings and run MBSA 2.3 Microsoft analizer (using default settings too). Tried on clean Windows 8 installation (not 8.1) and Windows ...
0
votes
1answer
60 views

SQL Server 2008, problem with backing up transaction log

I have a transaction backup job which runs every hour, first it backups up from the database log to another drive then it shrinks the log and deletes old trn files. The middle task shrinks the log ...
3
votes
1answer
62 views

How to check the timezone for a given datetime?

A database / table I'm working it saves all its date values as datetime (without a timezone). How can I find out which timezone that date was in? For instance, the Central European Summer Time (+02) ...
0
votes
0answers
41 views

What is the difference between normal Select query and a Select query inside Common Table Expression(CTE)? [duplicate]

I'm having a table 'Products' and if Execute this query SELECT TOP 1000 [ProductID] ,[ProductDesc] ,[ManufacturingDate] ,[ExpiryDate] ,[Price] FROM ...
1
vote
1answer
57 views

How can I switch to sa account from guest session in 2012 sql server?

I have a situation where I can log into my server as guest, and see that there is no password on the sa account. However when I try to login as sa with null password over the network it is rejected. ...