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
1answer
24 views

Are files and file groups included when doing a full backup?

I have a database with 4 files and 2 file groups. According to the size of the files, it's 1TB. However, the backup (non-compressed) is only 350GB. Is this typical? Or, do I need to specifically ...
0
votes
1answer
623 views

What is blocking 'SELECT… WITH(NOLOCK)'?

While following BrentOzar's "How Much is Offline During an Index Rebuild?" I was curious to run: SELECT Quantity FROM [Production].[TransactionHistory] WITH(NOLOCK) while executing a rebuild ...
0
votes
3answers
1k views

SQL Server, how to execute a job against all databases on server?

I'm trying to find the best way to execute a query against all databases on the server using SQLServerAgent or maintenance plan. I have a stored procedure that i'd like to run on these databases, but ...
0
votes
1answer
50 views

Allocating Filegroups and Storage

I have upto 10 databases running on a single SQL Server instance on a single server. I have read about best practice for storage and concluded the following... 1) Transaction Log on own RAID array ...
5
votes
2answers
208 views

In the SQL Server RESTORE statement, in what time zone is the STOPAT argument?

SQL Server can perform point-in-time restores using the STOPAT argument. In what time zone is that date and time value? Is it UTC? Is it local for the server the backup was taken? Is it local for ...
1
vote
2answers
59 views

What does enabling containment on server incur?

Having read in a book of Patrick LeBlank "Microsoft® SQL Server® 2012 Step by Step": "Benefits and limitations of contained databases As with most features, there are benefits and ...
2
votes
1answer
2k views

VS2012 setup spoils SQL Server 2012 Data Tools for everybody or just me?

On Windows 7 Prof I have installed SQL Server 2012 R2 with, as I am pretty well remember, client tools. Then, I tried to install Visual Studio 2013 Ultimate but failed. Then I've installed VS2012 ...
0
votes
1answer
215 views

Implementing foreign keys on generalized data model

Suppose the ASCII tree below is a UML generalized concept model. To represent these entities/classes in UML, lets assume [mammal] a super class, and the level 1 classes, [wild] and [domestic] are sub ...
0
votes
1answer
219 views

How is parallelism threshold (seconds) used if query CPU cost is actually unitless

How does the optimizer decide whether or not to use parallelism when the parallelism threshold is specified in seconds (on specific hardware, see below) but the estimated CPU costs are supposedly ...
2
votes
1answer
356 views

SQL Server Replication - setting up scheduler issue

We have tasked to set up a scheduler to synchronize data between a publisher and subscriber on daily basis. The subscription was set using windows sync manager and it runs just fine when run manually. ...
0
votes
1answer
498 views

Trigger After Insert is preventing insertion

I have two tables that must have similar information, and one of them can be considered the base table for to other, so in order to have the info in the two tables, I create this trigger: ALTER ...
0
votes
0answers
158 views

Minimizing possible trigger impact

I'm trying to make sure a trigger doesn't cause trouble. (Quixotic, I know!) Is there more I can do to the trigger below to make it bullet-proof? Details: We have a huge table we don't control ...
1
vote
2answers
272 views

Table not dropped correctly in SQL Server Express 2008

I've dropped a table but it is still listed in sys.tables. What's more confusing is that I can create the table again as one user, but if I log in as another user with the same permissions, I can't (I ...
0
votes
3answers
107 views

SQL Server RAID Storage [closed]

I have been reading about recommended SQL Server storage and RAID 5 or RAID 10 controllers have been recommended. On my existing Database server I can see 4 Storage controllers under Device Manager. ...
0
votes
1answer
49 views

Having Issues Exporting to online SQL Server database [closed]

I successfully initiated the export wizard of Microsoft SQL Server 2008 Studio and it was exporting fine from the database on my PC to online server database. But suddenly my internet network went ...
0
votes
2answers
617 views

SQL Server 2012. Update second table based on input from first table

I have two tables in two databases: Table01 in Database01 and Table02 in Database02. Both tables have a column called UserID. The UserID column is created when the user creates a new account on the ...
1
vote
2answers
310 views

What are the primary architectural differences between the backup formats of some of the more common RDBMS' and what advantage do they serve?

Of the systems with which I am familiar, I have noticed that SQL Server's native database backup format is binary and proprietary. PostgreSQL and MySQL allow for a simpler approach, dumping the ...
0
votes
1answer
310 views

sys.dm_os_volume_stats return no result

Version - SQL Server 2012 SP1 CU3. I have been using sys.dm_os_volume_stats for a while and it was working. Recently I have not been able to return any result from this DMF on one SQL Server 2012 ...
4
votes
1answer
20k views

Setting user permissions for different SQL Server schemas

I need to limit access to a particular user, but they still need to be able to see the data in tables owned by dbo. I'm trying to do the following: dbo schema functions as it would normally, has ...
3
votes
4answers
607 views

How to rollback changes made to the database by a specific user?

In mssql, is it possible to rollback changes made by a specific user to the database? For example if that user ran an update query and did not write begin transaction before, is it possible to revert ...
1
vote
2answers
449 views

Snapshotting Database Tables

I have a reporting database (in SQL Server) that takes nightly snapshots of the production data (Oracle) for users to query against for the next day, but now the requirement is getting to be that they ...
3
votes
2answers
267 views

Using Files and Filegroups

I am updating a database to use multiple filegroups. As it stands, it uses just the PRIMARY filegroup. I have read that it is recommended to create a second Filegroup (called 'Data') and mark that ...
4
votes
1answer
359 views

Suggest better design pattern for reverse DNS lookups

I'm working on a project where I need to look up the hostnames associated with IP addresses who were logged making HTTP requests. The lookups currently happen as part of a daily ETL job. The current ...
2
votes
1answer
530 views

Checkdb giving error for master database

When i run dbcc checkdb on master database i get error like Msg 5030, Level 16, State 12, Line 1 The database could not be exclusively locked to perform the operation. Msg 7926, Level 16, State 1, ...
4
votes
1answer
216 views

Memory Utilization

I faced a strange memory issue. Buffer cache hit ratio was at 100%, Lazy writer/sec was at 0 Available Physical memory 112 GB Max memory set 112 GB out of which I could see 85 GB being used from ...
5
votes
3answers
430 views

How do I find all tables in a DB that have no explicit primary key?

A Google search spewed forth millions of hits on how to find tables without clustered indexed, the PK normally being the clustered index of a table. However, a table could easily have a natural key as ...
2
votes
1answer
2k views

Which user does Windows Authentication of a maintenance plan authenticate? before whom, why and for what?

I am having a maintenance plan configured with Windows Authentication being run by an SQL Server Agent job with owner sa Whom does Windows Authentication of a maintenance plan authenticate, ...
2
votes
1answer
380 views

SQL Server Linked Server error and Query Problem

I am having two servers running SQL2000 and SQL2005. There is a database A,B in SQL2000. Similarly i have the same in A,B in SQL2005. A,B are name of the database. I have a linked server pointing ...
2
votes
1answer
317 views

Should I run a delete first before I execute index rebuild to a large table about 15 Million records

I need help for a better approach on how to approach this. Currently we have a table that is huge about 15 million records. We plan to create an index on this table however due to large size, we ...
0
votes
0answers
1k views

SQL Server 2012 - The application has failed to start because its side-biy-side configuration is incorrect

When opening Sql Server Management Studio I'm getting the following error message: Then when I have a look at the Event Viewer the following message is displayed related to this: Activation ...
1
vote
2answers
646 views

How to give the least permissions for CRUD-managing and running SQLServerAgent jobs as well as Maintenance Plans?

Follow up to my question "What's the owner of SqlServerAgent job for?" Basically, I am trying to understand how to create a user-login with least privileges for CRUD-maintaining SQLServerAgent jobs ...
0
votes
0answers
504 views

Snapshot transaction throws random conflict. Should I choose something else? [closed]

I've got a problem with my transaction. Currently it runs in IsolationLevel.Snapshot. The action it does, can take some time depending on the amount of data, it has to import. What it does: Create ...
1
vote
2answers
978 views

What's the owner of SqlServerAgent job for?

What is the possible use of owner of an SQL Server Agent job, I wonder? Removed, and left it blank and the job still succeeds
2
votes
1answer
192 views

SQL Server 2005 and Standalone VB application

I'm new to this forum and just want to ask some questions/suggestions on how to manage my database.. I'm having an application with sql server 2005 database as a backend. I want make the ...
10
votes
3answers
650 views

Optimizing a CTE hierarchy

Update below I have a table of accounts with a typical acct/parent account architecture to represent a hierarchy of accounts (SQL Server 2012). I created a VIEW using a CTE to hash out the hierarchy, ...
1
vote
0answers
276 views

I can not seem to turn this while loop in a recursive cte

There is a very frustrating side after 2 days ... but hey, I submit myself and I ask: o (   I Can not Seem To turn this while loop in recursive CTE ... If someone could help me please. I would like ...
0
votes
0answers
564 views

SQL Server Agent - Will Job Run on Specific Future Date?

I have a number of SQL Server Agent jobs will different types of schedules (Daily, Weekly, Monthly). Each of these jobs will represent an event. For example there will be an FTP job that will ...
1
vote
0answers
47 views

Running SSIS on SQL Server without SSIS installed [duplicate]

This is a follow-up to this question: Running an SSIS package without the SSIS service installed I have build an SSIS package on my local machine but when deploying to a server, I get the following ...
2
votes
1answer
1k views

Script all tables in a database

In SQL Server 2008 - is there any script available which will list all tables (incl column names, data type, length) for the entire database - with one script.
9
votes
1answer
424 views

Poor query performance

We have a large (10,000+ lines) procedure that typically runs in 0.5-6.0 seconds depending on how much data it has to work with. Over the past month or so it has started taking 30+ seconds after we do ...
1
vote
1answer
6k views

Does “use AWE to allocate memory” do anything on a SQL Server 2008 R2 64bit Windows 2003 system?

After checking the box I noticed that queries that would timeout after 30 seconds would complete execution. The TechNet article says "AWE is not required and cannot be configured on 64-bit ...
2
votes
2answers
500 views

Find which permissions are being used for a given user on a object

Is there any way in which I can see what permissions are being used to determine a users access to a given object? I'm able to see which permissions have been granted to various roles and users within ...
0
votes
1answer
204 views

How to create a trigger that update the date and time field and modify of the row

I want to create trigger that will update the record. The situation is like: I have one column named CheckInDateTime and one more named Status. If the administrator is not able to update the Status ...
3
votes
3answers
367 views

Is it possible to setup failover clustering between a 32 bit instance and a 64 bit instance?

I am attempting to setup a couple of virtual machines in my lab for testing failover clustering on SQL Server 2008 and Windows Server 2008. One of the hosts I have is not capable of running a 64 bit ...
0
votes
0answers
298 views

Speed of one big insert vs multiple small inserts on SQL Server

I have a write-heavy application in which my initial testing has shown that one large insert into a table with four "large" columns is significantly faster than four inserts (in a single transaction) ...
1
vote
1answer
3k views

Any way to import-export-migrate-save-restore a maintenance plan without having SSIS installed (and running)? [duplicate]

I am having dozens of MSSQL Servers 2012 R2 on Windows Server 2008 R2 with similar setup, configuration (in virtual machines) in production. Neither has SSIS installed. I have to similarly maintain ...
0
votes
1answer
1k views

Linked Server Between SQL Server and iSeries is rounding decimals

We just set up a new SQL Server 2008 database, and I got the link set up between our server and an iSeries As400 server that we get some of our data from. The problem I'm having is that it is ...
3
votes
1answer
2k views

How Do I Troubleshoot Login Failed Errors In SQL Server?

What are some tips for troubleshooting SQL Server login errors? Questions like: How Do I see the full Error Message? My client just has a generic error message that says logon failed with no real ...
3
votes
2answers
122 views

How do I create a table with a column that uses a sequence?

I have the following CREATE TABLE [MyTable] ( [ID] [bigint] PRIMARY KEY NOT NULL, [Title] [nvarchar](64) NOT NULL ) CREATE SEQUENCE MyTableID START WITH 1 INCREMENT BY 1 NO CACHE ...
-2
votes
1answer
49 views

Getting user input [closed]

I try to get user input but I get an error and I'm not sure what to do,as I'm new into databases and according to w3schools this is the way to do it. vers = getRequestString("Give the version you ...