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

Installing printer_php.dll onto an azure website

Has anyone been able to get this extension running on a php based azure website? The extension just basically allows you to print stuff with your printer. I've configured my php.ini to find the ...
0
votes
0answers
38 views

Trigger vs Stored Procedure

Does a trigger have a better performance over a stored procedure considering both have same block of code? Trigger is invoked implicitly. Does this have any impact on performance?
0
votes
0answers
15 views

how to compare time slots?

i have a table of [pricelist] startHour endHour Price other table that containes the [actualuse] startDate endDate user my data pricelist startHour | endHour | price ...
0
votes
1answer
40 views

Columns into rows and rows into columns

I need to do this table transformation, but its little hard for me. I have original table wich looks like this and i need to transform the table into this How can i do that ? Here i prepared ...
-1
votes
0answers
13 views

Template for MySQL database upgrade script

What is the equivalent of this Microsoft SQL Server upgrade script template for MySQL? I want to upgrade my database version in repeatable transactions in sequential scripts as I develop an ...
-1
votes
3answers
57 views

What is wrong with this INSERT Statement

I am trying to use this statement to insert new data into my orders table like so: $tsql2 = "INSERT INTO pedidos (numero_local, emailUser,codigopapel,cantidad, color) VALUES ('$local', '$emailOn', ...
1
vote
1answer
44 views

Combining log shipping and regular log file backups

Following on from my earlier question, I'm trying to set up a combination of Log Shipping and database backup. What I have in place is: Log Shipping set up between my two servers, to run every 5 ...
3
votes
3answers
140 views

Question about logging architecture

I understand that when (for example) an update is issued, the data pages are first read into the buffer pool, locks are acquired and changes are written out to the log file in the buffer, then the log ...
6
votes
3answers
117 views

Most cost efficient way to page through a poorly ordered table?

I have a table that has three columns: HashUID1, HashUID2, Address_Name (which is a textual email address, and the previous two hash colunms are of some crazy creation to link event participant tables ...
0
votes
0answers
48 views

Choose a Data Synchronization Technology SQL Server to SQL Server [closed]

Well, I need to choose a technology for replicating my main database between different database of different locations. this means I have a main database in a corporate company. Actually I have a ...
0
votes
0answers
20 views

Is it possible for a user that is not the job owner to edit the job or add new steps?

My development lead is ok to revoke the sysadmin privileges he currently has, if there is a way he can still edit/execute/enable-disable/execute application jobs. So far, I see that with the ...
1
vote
2answers
68 views

TSQL substitute for MAX() string ranking

I have a table with repeating values (col1) and I need to return col2 based on a ranking system. In my example the ranking system is handled by MAX() giving me the highest value. I then return the ...
1
vote
1answer
42 views

Replication consistently fails to bring new rows to subscriber

Short description of the problem: Initial synchronisation to the subscriber works fine. Subsequent synchronisations fail to download new rows. Re-initialising the subscription "fixes" the issue and ...
4
votes
2answers
144 views

How to rollback when 3 stored procedures are started from one stored procedure

I have a stored procedure that only executes 3 stored procedures inside them. I am only using 1 parameter to store if the master SP is successful. If the first stored procedure works fine in the ...
0
votes
1answer
50 views

2 SSRS Instances, one in native mode and one in sharepoint integrated mode on same server

Wanted to know if I can have two ssrs instances on the same server, one in native mode and one in sharepoint integrated mode. I have one ssrs instance in native mode on the sql server default instance ...
0
votes
0answers
26 views

How to test a SQL Server 2012 Cryptographic Provider

One of the nodes in my SQL Server 2012 availability group has been having problems with an external cryptographic provider. It's current separate from the rest of the availability group and can't be ...
0
votes
4answers
85 views

Restoring master database

I am trying to restore master database, when I set the server to single mode user I am unable to connect I get the error below. Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login ...
0
votes
0answers
8 views

SQL Server 2008 R2 - Replication - Multiple Publications on a single database

I have hit a problem and I need an idea of where to look or how to resolve. I have setup a publication and 2 subscriptions to it, 1 running on a schedule and the other running continuously. I need ...
-1
votes
1answer
82 views

SQL Server: performance of IDENTITY vs INT as primary key

The most important table of my database is about 300,000 records, and growing. More than 20 tables have a FK to it. Its primary key is a number, but for historical reasons is defined as nvarchar(6) ...
3
votes
2answers
206 views

MS SQL Server autogrow configuration with heavy loaded database

I have a database its size around 200G and it is heavy loaded with many inserts happens every day (it is grow around 3 to 4 GB every day), but the Auto-Grow setting is set to 1 MB. I think this is a ...
0
votes
0answers
40 views

Thoughts on further optimizations

So I have this application. It runs on a server. There is a portion of the code that is taking around 10-15 seconds to run, it contains some queries, logic, as well as some code to update the ...
2
votes
3answers
104 views

Passing info on who deleted record onto a Delete trigger

In setting up an audit trail I have no problem tracking who is updating or inserting records in a table, however, tracking who deletes records seems more problematic. I can track Inserts/Updates by ...
0
votes
1answer
33 views

Service Broker User Does Not Have Permission to Send to the Service

I am using .NET SqlDependency with a named queue (not dynamically created). My Service Broker Configuration Is CREATE QUEUE dbo.SqlDependencyQueue; GO CREATE SERVICE SqlDependencyService ...
0
votes
1answer
26 views

Cannot login to SQL Server from Visual Studio, same credentials work on SSRS page

I am running into a strange issue. I have a SQL Server login that I use for running reports on SSRS. When I go to the SSRS page I can modify the stored credentials to use that login: Now when I ...
0
votes
1answer
33 views

Using a string with single quotes in a table

I'm trying to insert the following string, as written, into a table: 'affinity mask', 0 However I can't figure out how exactly I need to escape the quotes. It always wants to treat the , 0 as a ...
3
votes
4answers
261 views

Keep track of time intensive stored procedure with prints

I am no database admin nor is my SQL-foo any good (yet), but have a few tasks to get done in MSSQL, and one is a rather time intensive procedure where I fetch from a CURSOR and WHILE @@FETCH_STATUS = ...
0
votes
2answers
45 views

Dynamic Creation of Table using Stored Procedure Without a Use of OpenRowSet in SQL Server

Q.--> An alternative of OpenRowSet in SQL Server Description: I have created a procedure which uses Dynamic PIVOT to get a result. I have a table which contains column DateRange with values Jan-2014 ...
0
votes
0answers
60 views

How can I lock an INSERT operation

OK, I know the title is confusing, let me rephrase with a description of the problem. The environment is SQL Server 2012. I have a table with Customers Id 1 And a table with their transactions ...
3
votes
1answer
54 views

Why does SQL authentication sometimes fail and how can I make it work reliably?

I have SQL Server Express installed locally on a machine and it works most of the time but occasionally it fails to make a connection with this error: Could not obtain information about Windows ...
0
votes
0answers
25 views

SQL Server Database Table Partitioning Consideration

I have a SQL Server table with 42 million + records. This table acts as a staging area for transaction records loaded from a different system. Data from this staging table have to be transformed and ...
0
votes
0answers
17 views

Problem when querying audit file when audit is enabled

I'm trying to audit DML operations for a specific principle on a database. For this, I configured Audit under Server -> Security and Database -> Database Audit Specifications and enabled both of them. ...
0
votes
1answer
52 views

how to select first 9 numbers from other table from database using sql query?

I want to fetch first 9 numbers from matching with other column please help me to find out thank you....? SELECT MAINFILE.facno,GLMAST.fglhead FROM MAINFILE INNER JOIN GLMAST ON ...
2
votes
3answers
57 views

Determining which SQL Server tables are accessed over a week?

I inherited a large, pretty-much undocumented SQL Server 2008 R2 general purpose database, used by dozens of different applications. We know many of the tables are no longer in use. Any ...
2
votes
2answers
131 views

Performance Order By large table with Join

Hello I have a table with 206,902 records and I am struggling to improve my query: SELECT TOP (50) [ID] ,[Title] ,[Modified] ,[Created] FROM [Data] Inner Join [Permission] On ...
0
votes
1answer
28 views

Unable to call sp_start_job from website only

I have an agent job that I'm trying to use to kick off an SSIS package via a web page. I have configured my web site running in an application pool as user X. When I invoke sp_start_job as use X ...
2
votes
1answer
53 views

Get a specific row from a TSQL common table expression

I have this tsql code to recursively get the whole workgroup hierarchy for a specific workgroup (WgID 283 here): WITH GroupList(WgID,WgParentWgID) AS ( SELECT WgID,WgParentWgID FROM ...
2
votes
1answer
54 views

How to get all logged in users to SQL Server database for this week?

I'm using SQL Server 2008R2 and I setup a testing database that I need to know who tried logging in so far. Is there a stored procedure or a View or anything that I can gather these type of ...
1
vote
2answers
83 views

SQL Backup tuning large databases

I am tuning SQL backups using compression, writing to multiple files, and changing the BufferCount and MaxTransferSize options. I have SQL instance with a 4 TB database and several smaller databases ...
0
votes
1answer
183 views

Does SQL Server require SSLv3?

We have a Windows 2008 R2 server running SQL 2012 Express RTM (11.0.2100.60). All three protocols (shared memory, named pipes, TCP/IP) are enabled for the server and both 32-bit and 64-bit clients. ...
1
vote
1answer
49 views

Case with multiple conditions

I need to change returned value, from select statement, based on several conditions. I tried something like that: ,CASE i.DocValue WHEN 'F2' AND c.CondCode IN ('ZPR0','ZT10','Z305') THEN c.CondVal ...
0
votes
1answer
37 views

Does view take advantage of table indexes

I have a table with a clustered index and 2 non clustered index. Now, in my view I am selecting everything from my table create view dbo.MyView as Select * from MyTable Now, when I am using this ...
0
votes
1answer
31 views

Type conversion in expression try_cast may affect cardinality estimate in query plan choice

I have a query that is running very slow so I started looking into the Execution Plan. TRY_CAST is a safe way of finding out if the data can be cast to a type. And there is a warning in the plan ...
0
votes
1answer
41 views

Store the resulting list of a SELECT in a variable to count AND use the result

I have stored procedure that uses a cursor and for every fetch a duplicate SELECT, once to determine the number of IDs found (SELECT COUNT(ID) FROM TableA WHERE something.. @cur_var) and if the ...
0
votes
0answers
44 views

SQL Server : error 15208 Level 16, State 1, Line 1

Trying to Backup a certificate from SQL Server causes this error: Msg 15208, Level 16, State 1, Line 1 The certificate, asymmetric key, or private key file does not exist or has invalid format. ...
0
votes
4answers
78 views

DB performance vs replication

I am working on a db optimization (planing for future project growth) and need some help. Currently, every table is using uniqueidentifier as PK (clustered index) and we have high index fragmentation ...
0
votes
2answers
54 views

SQL Server 2012 Very Slow to Consume Memory

I have a bit of a conundrum. I recently upgraded a ~20gb database from Window Server 2008 R2 || SQL Server 2008 R2 to Window Server 2012 || SQL Server 2012. The previous server had 32gb of memory, ...
0
votes
1answer
36 views

Stored proc getting ANSI_NULLS and ANSI_WARNINGS error when executed by application

I have a stored procedure that is getting the following error when executed via an application : Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the ...
1
vote
1answer
53 views

Migrate SQL Server from 2012 to 2014 (11 to 12)

I have just installed SQL Server Management studio 2014 and I also need to update my (local) server to accept a new database via a bak file from a version 12 server. When I look in Server Properties I ...
1
vote
0answers
16 views

Can CDC read through a log file when the agent job hasn't been running?

We currently had CDC running on our SQL server, however, at some point last week the CDC capture job stopped running and started throwing an error. At this point when it stopped somebody had restored ...
0
votes
1answer
32 views

how best to add unique index on nvarchar(max) field on existing table

The situation I find myself in is that I am getting bad data into the database for some reason. I want to preserve data integrity by adding to the User table a UNIQUE INDEX on the UFID field. ...