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

Distributed transaction coordinator between SQL Server and Oracle

I'm not sure about distributed transaction coordinator so please bare with me on this, I'm probably asking this question wrong. I know distributed transaction coordinator is used in SQL Server and can ...
1
vote
1answer
16 views

How to separate Stored Procedures (i.e. all the business logic) from Client Database so that it only contains client data?

Scenario: Our Application Database (in SQL Server 2012) contains entire business logic in the Stored Procedures (SPs). Everytime we have to publish the DB to the client, it unnecessarily results in ...
1
vote
1answer
22 views

Spatial Index ignored when using additional non-spatial conditions

Why does SQL Server ignore my spatial index when I use additional conditions? If I add an INDEX hint it will use the correct index, and runs a lot faster. I would like to avoid using the hint if ...
0
votes
3answers
588 views

Merge Replication identity field issues

One of our clients is using our software with merge replication of a database on a SQL Server 2008 R2 machine. There are two production environments in separate geographical locations only one of ...
2
votes
0answers
45 views

Execute T-SQL Only If AlwaysOn Database Is Primary

Little background on the system. It is SQL Server 2012 AlwaysOn Availability Group with 1 primary and 1 secondary. I have been following this article (SSIS with AlwaysOn) to make SSIS work with ...
3
votes
1answer
1k views

Azure SQL Administrator Can't Access Master Database

I created an SQL server and database. I can log in to the database manage page with my administrator account, and manage the database I created, but when I try to look at the master database, it says: ...
0
votes
4answers
234 views

Database/Storage engine suggestion for a project involving heavy inserts?

I am looking into a project which involves large number of inserts daily.I will have a list of user's (for example a user set of 500k ) , for which I need to monitor daily certain activities ...
3
votes
3answers
129 views

SQL Server: Log Shipping in “restoring” state: Can I temporarily take it out of restoring to check it?

I know it is normal for the target db to be in "restoring" state I also would like to do a few queries as a sanity check that the data is all up to date. Can I take it to a read only, non-restoring ...
-1
votes
0answers
14 views

Fetching records from SQL database with help of oracle stored procedure

I have one oracle database in which i have to invoke a stored procedure which fetch records from sql database.
0
votes
2answers
26 views

Build replication from backup not publication source

I have an interesting scenario I am trying to find a solution to. We currently have the current setup. ProductionDatabase (publisher) is the publication for transnational replication to the ...
3
votes
0answers
32 views

CROSS APPLY giving 'incorrect syntax' error on one SQL Server 2008 R2 database, with compat level = 100?

I'm copying a stored procedure from a test database to a production one. Both are on SQL 2008 R2 servers, but test has SP 2 installed and prod is still RTM. The same CREATE PROCEDURE code will run ...
3
votes
1answer
36 views

In which server does the snapshot agent run?

While configuring a publisher for replication, we execute sp_startpublication_snapshot SP and provide the publication name as a parameter to the SP. We do not specify the distribution server's ...
2
votes
1answer
78 views

Restore All Databases Script

I am migrating SQL Server DBs to a new instance. I have been told that it is possible to dynamically build a RESTORE script from available backups in the system catalog. Does anyone know of a sample ...
2
votes
3answers
130 views

Removing a string prefix

I have a string of numbers that I need to trim a portion from using TSQL. The string of numbers will always start with 101 then it will have a set of 0s and a set of random numbers. Example: ...
1
vote
2answers
43 views

Create failed for Index 'ClusteredColumnStoreIndex'. Timeout expired

I am creating Clustered Column Store Index in SQL Server 2014. I am getting error as "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not ...
1
vote
1answer
44 views

Performing deltas / diffs over VPN from Oracle to SQL Server database

I have inherited a reporting structure that is quite the Rube Goldberg device. I have a collection of MS Access 2003 databases that I have begun to migrate to SQL Server. My current hangup is that we ...
0
votes
1answer
154 views

SQL Server replication - set PollingInterval in sp_addmergepushsubscription_agent

I am trying to create replication subscriptions to and SQL Server 2008 R2 via a script. There are 3 subscribers so this script creates the subscriptions by calling sp_addmergesubscription and then ...
3
votes
2answers
53 views

Reindexing Clustered Primary Key

We need to reindex a Clustered Primary Key on quite a large table. Here is the definition of the table: Data Size: 22GB Index Size: 34GB Total Non-Clustered Indexes: 3 Row Count: 54 Million Data ...
1
vote
1answer
68 views

Query Plan Different When Using Compiled Values

I have pulled out an execution plan from the plan cache and from the XML pulled out the compiled values. Then I have run the query in SSMS using the compiled values and the query plans are different ...
2
votes
1answer
59 views

Does READ UNCOMMITTED have the same effect as AUTOCOMMIT=1?

AFAIK running transactions as READ UNCOMMITTED means that there is no lock, so every change caused by a transaction is immediately visible to other transactions. Is it correct to assume that this is ...
0
votes
2answers
50 views

How to count all relationships in a database?

I am developing a web application, which stores data in a Microsoft SQL Server database. My project manager has to deliver a report to non-tecnhical higher-ups, and thinks that it will read impressive ...
5
votes
2answers
966 views

SQL Server - contents of transaction log file in more detail

I have a question regarding transaction log (let’s just call it LDF for short) contents. I am assuming a database with full recovery model. I have read that LDF file contains (logs) each and every ...
6
votes
1answer
3k views

Mirroring - Server network address cannot be reached

I have SQL Server 2008 R2 Installed. It contains three instances. Default (MSSQLServer) First Instance Second Instance All these are Log On as Network Service.. Default Instance is Principal ...
1
vote
2answers
161 views

SQL 2008 Server - performance loss possibly connected with a very large table

Migrated from http://serverfault.com/questions/615129/sql-2008-server-performance-loss-possibly-connected-with-a-very-large-table We have SQL Server 2008 with 3 active databases running on it. DB1 ...
8
votes
7answers
658 views

Scheduled backup task doesn't always backup all databases despite always saying job successful

I have a job in SQL 2008 that runs a stored proc to backup all databases. This runs daily via sql server agent job. It quits with success every day but some days it quits with success only after ...
3
votes
1answer
56 views

Does anyone have example for setting up a job to reduce SQL Server max memory and recycle SQL server service?

I have both SQL Server 2008 and SSAS running on the same machine (Don't ask me why, I have to live with it for now!). Since we run ETL and Cube generation in sequence, I wanted to allocate large ...
52
votes
3answers
43k views

Why Does the Transaction Log Keep Growing or Run Out of Space?

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this: In SQL Server - What are some reasons the ...
1
vote
1answer
38 views

SQL Blocking, SPID of -2

We have some blocking going on in our database and when I run sp_who2, in the BlkBy field, I see "-2" for two of the rows. What does this mean? Running SQL Server 2008 R2
2
votes
1answer
3k views

Import/export wizard code page error

Using the import/export wizard I end up with an annoying problem: Error 0xc02020f4: Data Flow Task 1: The column "pinNumber" cannot be processed because more than one code page (874 and 1252) are ...
4
votes
2answers
583 views

Scrubbing Names via SQL Query/Batch

We have sensitive information (names of people) and we're looking to put into place a script to "scrub" of the names. Has anybody come up with a good algorithm to do this, something other than just ...
1
vote
1answer
65 views

Generate Agent Job Report

We have a few jobs that run nightly that the status has to be reported every hour. I am trying to find in MSDB where I can capture the information below hourly and send out an excel file. Server ...
0
votes
2answers
49 views

Snapshot replication - How to detect when a snapshot has arrived on the Subscriber from the Subscriber DB

I have snapshot replication set up to on a server which publishes to a second server as part of a scheduled SQL Server Agent job. When the snapshot finishes, I would like to detect when each table has ...
0
votes
1answer
18 views

How can I restore ##MS_SSISServerCleanupJobLogin##?

At some point the SSIS cleanup job login (##MS_SSISServerCleanupJobLogin##) got deleted from my sql server (2012). I'm trying to upgrade to SP2 and I'm getting an error message I believe is related to ...
3
votes
1answer
192 views

Formal name for functions that use the OVER clause

Is there a formal/academic name for the family of functions in Sql Server like ROW_NUMBER(), LAG, LEAD, RANK etc, that make use of the OVER(ORDER BY <PARTITION BY> ) syntax? How much of this is ...
1
vote
2answers
51 views

update N rows with performance considerations

I have a table with OrderSequence, the schema looks roughly like this: id Name OrderSequence I have an arrays of ids ["1", "2", "3", "4"] from application, i want to set the SequenceOrder for ...
-2
votes
1answer
31 views

How to display money in 12 Lc or 2 Cr [on hold]

hi i want display money as 12Lc or 2Cr if money =1200000 as 12 Lc when 12000000 as 1.2 Cr how can i do this help me guys
5
votes
2answers
81 views

SQL Server: Create New GUID Values for Existing Index

I have an existing table with about 6 million rows. The relevant columns are: ID int not null PK Key uniqueidentifier not null Read/write on this table by Key lookup is probably something like 100 ...
0
votes
1answer
25 views

Show Non-NULL values from 2 columns in a single column

I need to take the non-null values from two columns and show in a new column: ‘D_Country’. C_Country(Customer) P_Country(Prospect) Each of these columns may have NULL values depending on who the ...
3
votes
1answer
107 views

How to get server cpu, memory, network usage from SQL Server

For reporting purposes, I want to get SQL Server box CPU, memory, network (not SQL Server process alone) and show it in report. Do you have any idea how to pull this? My initial thoughts are run wmi ...
1
vote
1answer
45 views

Why do sys.columns and INFORMATION_SCHEMA.COLUMNS display different number of columns

Here i am try. Two method to display Particular column name in particular Database in sql server 2008 R2? Use INFORMATION_SCHEMA.COLUMNS SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE ...
1
vote
1answer
42 views

Will Transactional Replication Work?

I have multiple site servers and a central server. Each has a Widget table with identical schema. There is currently a custom process that sends new Widget records from the site server that ...
3
votes
1answer
180 views

Allow non-sys admin, non-owner of a job to execute it

I have a job that runs an SSIS package. Currently the owner is a proxy account. I can run the job manually from a sys-admin account. Our web service logs in using a limited account. It needs to ...
0
votes
2answers
3k views

importing MySQL dump to SQL Server 2012

I have a database schema from MySQL which I want to import to SQL SERVER, I have tried dumping from MySQL with compatibility for SQL Server, but with no success. Tried dumping as Excel still no dice. ...
5
votes
2answers
292 views

Index seek much slower with OR condition compared with separate SELECTs

Based on these questions and the answers given: SQL 2008 Server - performance loss possibly connected with a very large table Large table with historical data allocates too much of SQL Server 2008 ...
1
vote
4answers
121 views

Large table with historical data allocates too much of SQL Server 2008 Std. memory - performance loss for other databases

Based on this question and the answers given: SQL 2008 Server - performance loss possibly connected with a very large table I have discovered memory allocation problem with SQL Server 2008. ...
1
vote
4answers
233 views

Reset SQL Server sa password

I need to recover my SQL Server 2008 user/pwd. The situation is: I don't know the SA password and Windows Authenticated user is no longer active user (disable user because the user has left job) so ...
0
votes
1answer
62 views

Update primary key column - NULL issue

I want to update a column that is a primary key using this code use BITS_TEE Update DMT_TEE_DTS_Production set ABCIndicatorCode = ( select HIST.ABCIndicatorCode from ...
3
votes
1answer
51 views

Difficulty getting sp_executesql to work

Alex Aza's comment solution here generates all names of tables with records referencing a specified input record. I would like to adapt Alex's solution into a table-valued function. I'm having trouble ...
0
votes
1answer
22 views

Trigger on a Schema

Is it possible to create a Trigger on a Schema? I have to audit the changes on my tables. But I have a lot of tables and I don't one to create a trigger on them one by one. --Database level trigger. ...
1
vote
2answers
51 views

ownership of users

Two related questions: Using SQL Server 2012, how does one find out who/what owns a user, and how can you set the ownership for users, if at all? To add a couple of questions: 'how to' for both of ...