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)

3
votes
3answers
20 views

Using the sysadmin role with EXECUTE AS

It is my understanding that I can use the EXECUTE AS OWNER clause as part of a procedure that I create to make the body of that procedure run as a different user. My goal is to execute a command that ...
1
vote
0answers
33 views

Finding rows with duplicate values

I have a one to many relationship between the Account table and a ScheduledPayment table. One account can have many payments but there should be a maximum of one payment per day. Although unlikely, ...
0
votes
1answer
79 views

Error updating zoned field from SQL Server stored procedure linked server to iSeries

I'm trying to update a table on an iSeries (AS400) within a SQL Server stored procedure using linked server, but it is failing when trying to update a column defined as zoned. In my stored ...
0
votes
0answers
6 views

How to add mssql server in networks list?

I was change my PC name and workgroup & I guess after this my ms sql server isnt connecting. I'm using MS SQL 2012. Currently in my servers list I have only Home & localhost. Anybody know how ...
3
votes
1answer
32 views

Does sp_indexoption cause index rebuilds?

I want to switch AllowRowLocks=ON on a number of indexes. Some of those indexes are on large tables, and I don't really want to rebuild or reorganize the index. It is not clear from the MSDN article ...
3
votes
1answer
25 views

Tail Log backup when doing a restore?

Typically when doing a restore of a DB from a production server to a non-production server I will use the WITH REPLACE option as when I forget I get an error about the tail log not being backed up. ...
3
votes
1answer
46 views

Consolidating 2 Tables with same Values

I am working on a project trying to consolidate two databases, DB1 and DB2, for my organization into a single database, DB3. Initially our organization started with DB1. A few years back they made a ...
2
votes
2answers
50 views

SQL Server Database is corrupted

Unfortunately hard disk of my system is damaged, now I recovered my database. But it cannot be attached again to SQL management studio 2005. The error is: myfile.mdf is not a primary database file. ...
1
vote
0answers
21 views

Restoring corrupt database - “mdf is not a primary database file” [duplicate]

Unfortunately the hard disk of my system is damaged. I am trying to recover my database, but it cannot be attached again to SQL management studio 2005. The error is myfile.mdf is not a primary ...
-1
votes
1answer
30 views

View vs TableValued Function vs SubQuery

I have a scenario where i need to join with 3 tables to get the value for one field for second field join with 4 tables for third field join with 3 tables all above joins are inner and if data ...
1
vote
1answer
160 views

How to update local database data from an online database?

I have an online database and a local database. How can I update the local database data (only data and not the structure) from the online DB in my application ? The idea is to have an update data ...
-7
votes
0answers
43 views

What's new in SQL Server 2014 T-SQL since SQL Server 2008 R2? [on hold]

I want to upgrade my sql server from 2008 to 2014 and I wanna know what's new in programmability T-SQL enhancements.Now I'm installing 2014 to make few T-SQL tests. Thanks
1
vote
1answer
51 views

What relevance does the table-level ANSI_NULL setting have?

Apparently, SQL Server stores the current ANSI_NULL setting when creating a table (see related questions here and here). However, when I execute SELECT * FROM myVeryOldTable WHERE ...
-5
votes
0answers
34 views

What is the Difference between SQL Server and MySQL? [on hold]

What is the Difference between SQL Server and MySQL 1) In technically and non-technically. 2)in business point view (ex: if i have new project to do. How i know which database is better to choose ...
0
votes
2answers
405 views

SQL Server 2012 linked server to SQL Server 2000

I am trying to select through an linked server from SQL Server 2012 to SQL Server 2000. The linked server has been setup and I can browser the target database through the linked server which ...
0
votes
1answer
40 views

Package parameter blank in SSIS catalog

I have deployed a package with 2 package parameters which had their values set inside the package prior to deployment. However if I look at those parameters in my SSIS catalog project the values of ...
1
vote
0answers
36 views

How to handle many columns / variable schema?

I apologize in advance in case this question has been asked already. I'm working on revamping a reporting application used within my company. The requirements are: Support addition of new fields ...
4
votes
1answer
1k views

SQL Server 2008 Setup Error 0x80070490

I am trying to install SQL Server 2008 x64 on Windows 2008 R2 and keep getting the following error: SQL Server Setup has encountered the following error: Element not found. (Exception from ...
0
votes
0answers
14 views

2008 R2 Express Silent Install - FullText Service Not working

I'm trying to build an installer for an app that installs SQL SERVER 2008 R2 ADV with FullText already enabled, but couldn't sort it out. It must support Windows XP, so that's the first OS I'm ...
2
votes
2answers
80 views

Share centralized queries for multiple databases

OK, here's a challenge for you guys. I am tasked with setting up reporting for two companies being run as a single company. For reasons I won't get into, they are implicitly split but (for our ...
3
votes
1answer
255 views

Named Pipe Provider Error code 40

I have literally tried everything, from enabling named pipe to adding exception to ports in the firewall, to everything possible in surface configuration. I can connect to the SQL instance(using TCP ...
1
vote
0answers
18 views

Database Mail connection to exchange - Resets and timeouts

I am trying to send the results of a query in an email, and each time it takes longer than 5-10 minutes for me to recieve the message. The actual relay from Exchange takes less than one minute, but ...
2
votes
3answers
279 views

How to pull rows only from the weekends?

My table data is like this: ID Name salary date 1 a 100 1/08/2014 2 b 200 2/08/2014 . . . . 26 z 2600 26/8/2014 Now I want to return only rows from Saturday or ...
3
votes
1answer
741 views

Log Reader Agent is not running - The job failed

I created a transactional replication on PRE-PROD (via TSQL) and everything works as expected. On PROD platform replication is not working. While inspecting Replication monitor, I get this error ...
2
votes
2answers
136 views

Table with 4 million records - different size and performance in development and production

At my company we use SQL Express 2008 R2, which supports databases up to 10GB. We have 2 databases with almost the same number of rows in all tables. But, one of them is 4.5 GB in size (which is in ...
0
votes
0answers
11 views

How to back out of mass update in SQL Replication [duplicate]

We have a database which is set up in Merge Replication. We accidentally updated hundreds of thousands of records in a large published table on the publisher database. We did is something like ...
3
votes
1answer
40 views

How to back out of mass update in SQL Replication

We have a database which is set up in Merge Replication. We accidentally updated hundreds of thousands of records in a large published table on the publisher database. We did something like this: ...
4
votes
1answer
666 views

Why can't I read my transaction log backup file using fn_dump_dblog?

I'm using this blog on sqlskills.com as a guide to practice finding the relevant LSN in a transaction log backup for point in time recovery. After backing up the transaction log, I attempt to read it ...
3
votes
1answer
84 views

SQL Server: Using 4 part identifiers when database may be on the same server

In my client's setup, the database servers in lower environments are all on one server for cost saving purposes, but in higher environments, these databases are deployed on separate servers, and ...
0
votes
0answers
16 views

How can I use parameters of type Int32 from an environment for an integration services package in a SQL Server 2008 job?

I made a SSIS package using two string parameters and one Int32 parameter. I defined a SQL Server Agent job that should execute that package. In "Integration Services Catalogs" I definied an ...
1
vote
1answer
37 views

how to shoot SQL error 823?

I had a laptop die HDD went dead which a running sql database was opened (in program) I had to have the hard drive recovered however all i got back was a bad database which has the torn page. All ...
3
votes
1answer
39 views

Can a High number of Worktables/sec and/or workfiles/sec lead to tempdb Contention?

We have a large number of very heavily used OLTP systems. One of our biggest issues right now is tempdb contention. I understand how creating many temp tables and table variables (which our developers ...
3
votes
2answers
191 views

Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes

I try installing SQL2008R2 - SQL2012 - sql2014 2014-07-17 16:31:16.00 spid14s Error: 17190, Severity: 16, State: 1. 2014-07-17 16:31:16.00 spid14s Initializing the FallBack certificate failed ...
0
votes
0answers
19 views

SQL Server to MySQL migration using MySQL workbench

I tried to migrate database from SQL Server 2012 to MySQL v5.5. I used MySQL workbench v6.1 community edition. What I was migrating is just schema only, not for the data. I got this error Reverse ...
1
vote
1answer
25 views

Profiling and debugging “Incorrect syntax was encountered while parsing :setvar.”

I have the following script using SQLCMD setvar, but I receive an error when I parse the script: :setvar dbname "PROD" :setvar backuppath = "e:\sql\restore\PROD.bak" USE [master]; GO -- backup the ...
-5
votes
0answers
34 views

Arithmetic overflow error [on hold]

arithmetic overflow error converting expression to data type int How to solve this problem?
2
votes
2answers
244 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 ...
10
votes
2answers
861 views

SQL Server Data Tools and partition functions

I'm creating a sliding window loading scenario and the partition functions will be changing their boundaries through time. I have created some partition functions in my SQL Server Data Tools (SSDT) ...
1
vote
2answers
32 views

Trying to filter msdb..sysjobs by job_id

I'm attempting to determine the name of the SQL Server Agent Job that is currently running by comparing the output of master.sys.dm_exec_sessions.program_name to msdb..sysjobs.job_id I'm using the ...
-1
votes
2answers
21 views

My data base missed and disappeared after detaching it

I have detached my data base in sql 2008 and unfortunately I do not know its path and by my connection string I extract its exact name and searched it but it is disappeared from my computer Is it ...
1
vote
1answer
212 views

SQL Server 2012 Publisher SQL Server 2008 Subscriber version issue

So I have a setup where one virtual machine is a SQL Server 2012 publisher and I need to setup merge replication on a SQL Server 2008 subscriber on a different vm. When setting up the subscription ...
9
votes
3answers
5k views

Where can I find example databases for MySQL, SQL Server and Oracle?

I want to experiment with the 3 large database management systems. For this purpose it would be cool to have the same database (the same tables, etc.) for each of those. Where can I find sql scripts ...
3
votes
1answer
45 views

Online index rebuild LOB types

I have read and heard that you cannot perform online clustered index rebuild for tables that have a varchar(max) type. This (as I have read) also should be true for nonclustered indexes that contain ...
2
votes
5answers
4k views

Small sample database for practicing database administration?

I'm looking for a portable sample database that can be created from a script has a simple ER model has little data for database administration practicing purposes. I know that there is e.g. ...
0
votes
2answers
85 views

How to verify data dumps between two MS SQL and MySQL

I'm trying to verify data exported from MSSQL and imported into MySQL is 100% accurate using MD5 hash. On Linux, I'm using md5sum and WinMD5 on Windows. The encoding is the same: UTF8. I tried both ...
2
votes
0answers
39 views

AlwaysOn FCI + HA Setup Question

I am planning to create FCI + HA solution in the same datacenter, but running into some problems. I'd really appreciate if someone can provide some guidance. Here is the current configuration (All ...
0
votes
2answers
57 views

Stored Procedure null parameter within where clause

I want to use a parameter within where clause only if it's value is provided by strongly typed dataset, this is what I am trying at the moment, I get right results when i provide parameter3 and no ...
2
votes
1answer
38 views

Foreign key, key split in two tables

I have to record a list of events made of action, reason (optional, may be multiple), user. I have a master table with all the valid action, and another with all the valid action-reason combination. ...
4
votes
1answer
315 views

Bad Design or Complicated Query?

Problem: For fun I am building a Database for lottery results to get some statistics off of. As of now I am only interested in a Pick 3 style lotto and might introduce more later. How would you ...
1
vote
1answer
79 views

Why is there a collation conflict between system views

I'm using the following statement to retrieve a list of triggers from the database: select tr.name from sys.triggers tr union all select tr.name from sys.server_triggers tr; However on my local SQL ...