Tagged Questions

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)

2
votes
1answer
287 views

The number of row value expressions in the INSERT statement exceeds the maximum allowed number of 1000 row values

One of INSERT INTO script is written as following. INSERT INTO tableName (Column1, Column2,....) VALUES (value1, Value2,...), (value1, Value2,...),.... Following is the error we are facing on ...
-1
votes
1answer
15 views

Protect SQL Server Express data file

I need to protect a Microsoft SQL Server 2008 data file (.mdf) against restoring/attaching on another machine. I'm aware of TDE or Transparent Data Encryption but unfortunately this option is not ...
0
votes
0answers
27 views

Time based trigger for database update [closed]

I have a database table in SQL Server as following ID | Name | ExpireTime | CountLeft 1 test 11/11/2014 2:30 5 I want to update countLeft = 0 when ExpireTime = currenttime ...
0
votes
0answers
31 views

Any caveats using SQL Server 2008 CDC off replicated tables?

Main TRX System ---- Replicated to ---> "Archive" --- CDC/ETL --> Some NOSQL DB... For performance reasons we never run any ETL off the main transnational system only off the archive. I ...
1
vote
1answer
36 views

Merging almost unique rows together

I have this table And i need have this (In source table are thousands values) How can i do that ? Here is example database: http://sqlfiddle.com/#!3/4278d Thank you.
1
vote
1answer
37 views

stored procedures location influence their performance?

I have a procedure SP_MYPRO that updates data in MYDB1. 1) the performance of SP_MYPRO would be different if I place it in MYDB2 instead of MYDB1? 2) what if the procedure SP_MYPRO only read data, ...
1
vote
1answer
41 views

Join select queries on an id in SQL Server

I have three tables that SELECT from and I'd need to join the results. It feels like this should be a rather easy task but I struggle with the syntax. Working on Microsoft SQL Server Enterprise ...
0
votes
1answer
42 views

Insert values in table from front-end CategoryId

I want to add a value from front end into a table. I want to do it in asp.net. I have a table which is as below:- CategoryId int CategoryName nvarchar(50) not null ParentId ...
3
votes
3answers
313 views

This instance of (MS) SQL Server has been using a process id of X since dd/mm/yyyy

I was looking through the SQL Server logs and come across the following informational message. This instance of SQL Server has been using a process ID of 1960 since 12/10/2014 20:02:48 (UTC). ...
1
vote
2answers
76 views

What Columns to create Indexes on?

I have a table , which contains upto 20 columns. The data is selected, inserted, and deleted by 3 columns: Username, StartDate, and EndDate. These 3 columns are NOT unique. The table is a ...
0
votes
1answer
39 views

Upgrading SQL Server 2008 R2 Standard edition to SQL Server 2008 R2 Enterprise edition what is the process and the impact?

We are using SQL Server 2008 R2 Standard edition with Visual Studio 2010 (Web API). Also we have created SSIS packages using business intelligence. If we decide later on to upgrade to SQL Server 2008 ...
0
votes
0answers
13 views

insert data into mysql from mssql with arabic unicode

I insert data into MSSQL with arabic unicode. I want to insert this field into MYSQL but it insert empty. In MYSQL , I choose utf8-bin , I use php for this action, I declare name , character unicode. ...
0
votes
0answers
17 views

change display of rows into column using PIVOT in sql server [migrated]

This is my query: select d.disposition, count(a.serialnumber) AS SUBTOTAL FROM FADB a, FARepair b, Disposition d WHERE a.ID = b.ID AND b.DispositionID = d.DispositionID GROUP BY d.Disposition and ...
-3
votes
3answers
76 views

SQL Server Standard Edition Memory Limit [closed]

What is the maximum amount of memory usable by Microsoft SQL Server Standard Edition? I believe it is 64GB; is that correct?
-3
votes
0answers
42 views

Indexing in SQL Server [closed]

I'm having a doubt regarding index creation in SQL Server. Scenario: In my database we have an index which is being used (or supposed to be used) by a query in stored procedure (SP1), but I have ...
0
votes
0answers
11 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
37 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
12 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
39 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
12 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
56 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
43 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
139 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
106 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
44 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
19 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
66 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
39 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
134 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
45 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
25 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
82 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
5 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
80 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) ...
-4
votes
1answer
25 views

sql server reporting services 2010 [closed]

I am working on SQL server reporting services 2010 reports and client required is hiding and showing the parameters at run time?
-4
votes
0answers
18 views

Data Quality Report [closed]

I want to share/filter the results of certain failed items with the client so that they can be aware of the items requiring remediation. Example:- Design question - would there be failed items that ...
3
votes
2answers
202 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
28 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
24 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 ...
-4
votes
0answers
41 views

Tips for a new dba [closed]

I'm a new DBA for SQL Server. What are all considerations that a good dba should be aware of? All tips and links to websites are welcome. Thanks!
3
votes
4answers
260 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
37 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 ...
-2
votes
0answers
35 views

Correctly creating a temporary local table in a SQL Server procedure [closed]

I need a temporary table to use in a stored procedure with a single column ID. Something like.. DECLARE TempIDs TABLE ( ID int ); What I do not understand is that local variables begin with an ...
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
24 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
16 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. ...