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)

1
vote
2answers
119 views

Auditing the View Server State permissions on Server

We noticed that one of our servers has permissions granted to "all" users for "view server state". I am wondering if there is a way to audit the DMV's used by the user(s) on a regular basis as this ...
0
votes
1answer
36 views

UPDATE table SET value which SELECT from other table

I need to update the column on Table_1, and then SET the value which select from Table_2 UPDATE top(3) a SET col_1 = col_2_From_Table_2 // Problem here, select col_2 from Table_2 and update into ...
1
vote
1answer
52 views

Manage multiple short-term tables with same schema or use single table for short-term data?

My team has proposed to store session state data for each open client session in a table in the database. The application server creates a new table for each client session as the user logs in via ...
1
vote
2answers
1k views

Moving SSIS Packages to New Server

I have a number of SSIS packages in a number of folders on MSDB SSIS on SQL Server 2008R2. We are migrating to a new server host but remaining on SQL Server 2008R2. How can I copy/migrate these SSIS ...
0
votes
1answer
243 views

How to generate replication snapshot without locking tables

When I reinitialize subscription and generate new snapshot it locks all tables and makes the database unusable for a very long time (never waited it out). Is there anyway to do this without locking?
0
votes
0answers
16 views

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. for linked servers

I am trying to execute a query to pull data from another server. I added the server as a linked server to the another one but I am getting the following error when I try to execute the query Login ...
-1
votes
1answer
15 views

Column name or number of supplied values does not match table definition - with correct parrameters

I am executing a stored procedure in a while loop (approximately 100 times). This takes 20 seconds. The problem is that at some point, I receives this error: Column name or number of supplied values ...
0
votes
0answers
25 views

Error configuring SQL Server as Distributor

I'm trying to configure replication on a new install (moving to SQL 2012) and I keep getting the same error even after messing with the service name, folder permissions, etc... Using the Configure ...
0
votes
0answers
16 views

Why the simple insert into query allocated a lot of tempdb?

I'm using sp_whoisactive to monitor the tempdb and found the following query allocated 30,000,000 tempdb_allocations (BTW, what's the unit of the allocations?) select a.*, b.A, b.C, b.D into c from ...
1
vote
1answer
20 views

Best practices for selecting partition boundary ranges to maintain empty partitions at both end?

I have partitioned the table based on a date datatype partitioning column. The data for the column starts at "2014-01-01" and ends at "2015-01-01". I know that, the partitions should have empty ...
2
votes
1answer
25 views

SQL Server: Invalid Log Scan Number (…) passed to log scan in database (…) is not valid

We are getting a large number of the below errors on one of our production databases. CheckDB is completely clean. We thought it was related to replication so we shut it down using ...
0
votes
1answer
34 views

How to get best mark for each Student

I can't find a solution although it should be easy one. I have some students and all I need is to get the highest mark of each one in Math. TableName: Students. Columns: Name Mark John 90 John 84 ...
2
votes
1answer
95 views

SQLIO and its Flags

Any feedback on this will be highly appreciated. 1.-t flag(Threads) – If I capture worker thread information using this query SELECT SUM(current_workers_count) as [Current worker thread] FROM ...
6
votes
2answers
235 views

How can I reliably determine if a given SQL Server instance has the “Lock Pages in Memory” right?

The "Lock Pages in Memory" right can be granted to the service account used by SQL Server. This allows SQL Server to prevent memory being paged to disk. I've noticed several of our SQL Server ...
3
votes
1answer
148 views

DTUTIL to package store

I am trying to deploy a package to a project in my SSIS catalog and am using the following command: dtutil /FILE C:\Changes\ReceivedEDI.dtsx /DestS MARSQL12 /COPY ...
0
votes
1answer
30 views

Application is hanging when database upgraded from SQL Server 2000 to SQL Server 2008 R2

Presently we are working with SQL Server 2000, the database is perfectly working with our software for retail sales counter application developed with VB 6.0. But after upgraded to SQL Server 2008 R2, ...
0
votes
1answer
77 views

SQL Server Agent Error 1053

A few months back I installed SQL Server 2008R2. At the time of installation I used 1.Mixed Authentication 2.NT Authority\NetworkService as the SQL Agent user name, and the same user name for all ...
4
votes
4answers
13k views

T SQL Table Valued Function to Split a Column on commas

I wrote a Table Valued Function in Microsoft SQL Server 2008 to take a comma delimited column in a database to spit out separate rows for each value. Ex: "one,two,three,four" would return a new table ...
0
votes
2answers
36 views

Multiple databases or one large database?

My company has a framework where different areas of a region are created as separated databases - we call them datamarts. All of the databases are exactly the same and in some regions we have 20 -30 ...
0
votes
1answer
27 views

Return List of Database Users and Server Logins

How can I return a complete listing of all server logins and all database users across my enterprise? Need to include the remote server name, database name, AD account and SQL users.
0
votes
1answer
95 views

Can scheduled and continous replication configurations exist side-by-side on the same master/slave servers?

Environment We have a core sql server cluster. This cluster contains some databases that get replicated to a load-balanced sql cluster of currently 3 servers. These databases are replicated each 12 ...
1
vote
1answer
37 views

Non-sequential Primary Key performance in PostgreSQL 9.3

Due to requirement to support distributed environment, each of my clients has been assigned unique node id, it appends the node id with running number as primary key and stores at local database. E.g. ...
1
vote
1answer
25 views

How to write a query which recursively returns all foreign key references to a column?

I need to obtain a list of foreign keys which refer to a given column, as well as all foreign keys which refer to those keys, and so on. Order does not matter. I have SELECT s.name, t.name, ...
2
votes
0answers
74 views

This Extended Events session works on Dev but not on Pro. Why? [on hold]

I do have the following Extended Event session on my Dev and Pro boxes: CREATE EVENT SESSION [sp_showplan] ON SERVER ADD EVENT sqlserver.query_post_execution_showplan(SET collect_database_name=(1) ...
1
vote
3answers
30 views

Unable to find how a table is being populated

Using SSMS2014 w/ SQL Server 2008 R2. I have a table that I am trying to find out how and from where data inside it is coming from. (I didn't create the table and am unable to contact the person who ...
0
votes
1answer
7 views

Sql Server Change Data - Insufficient Arguments [on hold]

I am trying to get Sql Server Change Data configured and am running into problems trying to query the tables. My setup: create table Person ( Id uniqueidentifier PRIMARY KEY DEFAULT ...
1
vote
0answers
16 views

Are there limits to SSRS 2014 RDL files going over to SSRS 2008 (or 2012)?

Is there any incompatibility with reports developed in SQL Server SSRS 2014, and then exported to .RDL files that will be imported into SQL Server 2008?
0
votes
1answer
28 views

Facing SQL Error 3403 [on hold]

Recently I was working in SQL Server and I faced an error called SQL Error 3403 which was stating: "Error 3403, Severity 22 During recovery initialization, page %ld was encountered. This page ...
0
votes
0answers
23 views

Does my MSDN License allow me to use SQL Server Dev on a dev machine? [on hold]

Complete new guy question. Can I install SQL Server Dev version on a machine I use for development? The Dev Machine is a virtual box that I am building and testing an intranet site for my office. I ...
0
votes
0answers
29 views

Issues with Optimizing TSQL Script

I have a temp table that has a SecurityCode column. This SecurityCode column gets updated based off value from a CrossReference table. The value selected from the CrossReference table depends on how ...
3
votes
1answer
2k 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
1answer
35 views

Find out beforehand how many records a query has

I develop reports in ExtJS resulting of queries in SQL Server 2012. I use Ext.Grid with paging, therefore I can use offset to limit the amount of records a query will return. But for this ExtJS ...
0
votes
0answers
8 views

new subscriber on existing publication Error number: 20598)

i have Publisher server with one transactional replication on it, one publication with two articles( Microsoft Navision tables), there are 4 servers connected like subscribers and the replication is ...
7
votes
4answers
4k views

Parallelism Best Practices

What are the best practices with setting parallelism in general? I know that SQL Server defaults to 0 to use all available processors, but in what instance would you want to change this default ...
0
votes
1answer
70 views

Need to query records based on Date only (Sample Query given)

sSQL = " SELECT ordID, ordName, ordDate, ordShipping, ordStateTax, ordHandling, ordTotal, ordDiscount, ordPrivateStatus FROM orders WHERE (ordStatus = 7) " I want to display orders that ...
0
votes
2answers
53 views

SQL Multiple JOINS Interpretation order [on hold]

I have a big problem of using multiple joins in one SQL Statement. For example i have 10 Tables which they are tbl1,tbl2, tbl3,..,tbl10. I would like to select some columns from each table from tbl1 ...
2
votes
0answers
33 views

Had to force loop join and don't understand why

Hello SQL Server Experts. I have a table (table_A) with about 2 million rows and a table_B with about 10 million rows. SELECT b.title FROM table_A A JOIN table_B B ON A.id = B.A_id WHERE ...
1
vote
2answers
6k views

Linked Server to SQL Server 2000 server from SQL Server 2012

I have a new SQL Server 2012 instance, and am migrating a database from SQL Server 2000. Some of the stored procedures in the DB I am moving reference another database back on that 2000 server. What ...
0
votes
0answers
15 views

Unable to start SQL Safe service :Error 1053: Could Not Start or Stop the Service in a Timely Fashion [on hold]

We are facing quite a tedious issue for past couple of months and we are out of ideas now: We are using IDERA SQL safe to backup the databases for our many server: IDERA was installed earlier by the ...
0
votes
1answer
34 views

SQL weight multiplication

Hi all i have two columns in a table : +--------------------+----------------+ | Units/Pk | PackWeight/Vol | +--------------------+----------------+ | 1.0000000000000000 | 150g | ...
0
votes
0answers
6 views

Report Server Subscription Configuration ISSUE

I Have Created A Subscription in our Development Server With below Steps. 1)Opened Report Configuration Manager and Configure Email Settings. 2) Opened Report Manager and configured a Report Data ...
4
votes
1answer
692 views

SqlPackage does not pick up variables from profile

I want to upgrade a database using .dacpac and sqlpackage.exe here is how I run sqlpackage: SqlPackage.exe /Action:Publish /SourceFile:"my.dacpac" /Profile:"myprofile.publish.xml" The ...
3
votes
1answer
172 views

Execution Plans Differ for the Same SQL Statement

As a background to this question the details can be found at this link. In a nutshell: I have 2 SQL statements that are almost identical except for the RIGHT table. The LEFT JOIN is the same and the ...
6
votes
1answer
1k views

SQL-08S01 error in FreeTDS/Azure when executing stored proc for a few minutes from Linux (but not from Windows)

I get this error on Linux (Ubuntu and CentOS) when executing a stored proc from Perl/DBI/ODBC/FreeTDS to SQL Azure: [unixODBC][FreeTDS][SQL Server]Read from the server failed (SQL-08S01) I don't ...
15
votes
2answers
7k views

What are the best practices for running SQL Server in a Virtual Machine?

What are the best practices for running SQL Server in a Virtual Machine? My on-line transaction activities are very low, but there is a high amount of data processing for the purpose of providing ...
1
vote
1answer
107 views

Print the execution time on messages Pane?

How I can print the execution time of each query on messages Pane? For example the Select * from tbl1 runs for 10 mins then Select * from tbl2 runs for 15mins and so on.. Select * from tbl1 Go Select ...
0
votes
0answers
20 views

Can user defined roles cause problems with colliding permissions?

I recently ran into a problem with an application crashing accessing a SQL Server 2008 database. An "APPCRASH" was recorded in the Event Viewer, but I have little else to go on. The tables are owned ...
4
votes
3answers
509 views

sp_send_dbmail fails when mailing queries, but no error returned, query just hangs

I have an issue SQL Server 2005. sp_send_dbmail fails when mailing out with the result of a query (inline or attatchment). No error message is given / reported, the query just keeps executing but ...
3
votes
2answers
322 views

Migration to databases Domain Users do not have access

I migrated databases to new servers, however the applications that were previously used with the databases are failing to load. I have changed the connections and etc. The jobs also seem to be ...
0
votes
0answers
17 views

How to determine is a value exists in a column within a partition

I have a set of data where I need to look at partitioned data and determine if a value exists within that partition. Example data: AccountNumber Code Status Credited ...