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

Creating a User to access multiple databases

Is it possible in SQL server to create a User without a Login that can access multiple databases? I am creating a user setting up a service broker queue and the receiver of the message needs to be ...
3
votes
1answer
178 views

Reducing Errorlog file size

We had a user change a password on an account that was on an automation equipment that pinged the sql server many times a second (for no apparent reason - the pinging). In the end my errorlog ...
3
votes
1answer
221 views

For creating sum columns in a table that requires immediate reflection, is it better to have persisted columns or triggers?

Is it better to have persisted columns or triggers if you would like to have auto-updating sum/avg/etc... columns? Like if I have this table: CREATE TABLE [dbo].[tbl_shipping_boxes] ( ...
2
votes
1answer
206 views

Representation of circular references constraint

We have a database where we store commands and properties for devices that may be controlled via a network. For instance, "Concrete Device" is an instance of some DeviceType, which in turn contains ...
7
votes
3answers
1k views

MDF and LDF contents in SQL Server

Let's say I have a database with a single .mdf and .ldf file. The database is detached, there are no transactions and SQL Server is stopped. I am presuming that all the data is already in the .mdf ...
3
votes
1answer
884 views

Log shipping setup across domains

I'm running SQL Server 2008 R2 on a Windows machine. I've been tasked with setting up log shipping between our production site (managed by a service provider) and our QA environment which is hosted ...
3
votes
2answers
864 views

SQL Server 2012 Licensing on a VMware Infrastructure

I am looking to license SQL Server 2012 Standard on my VMware Vsphere server farm. I currently have 3 hosts in the farm with the following spec: 2x 6core Xeon CPU (12 cores total) 128GB RAM ...
1
vote
3answers
517 views

Compare two tables amount with respect to priortization of FundType

I have two tables one is PaymentDetail and another is Ledger Here i want to prioritize paymodetype in manner that cash should be considered first for R,A and then I FundType, then Credit Card, ...
5
votes
1answer
591 views

Query performance while using sqlcmd [duplicate]

Possible Duplicate: Running queries with SQLCMD vs. Running queries with SSMS I have a number of scripts that query the data from different tables and consequently update them. I have ...
2
votes
0answers
380 views

Linked server issue

I made a linked server between two sql server instances. The remote one I have very little control over. When I try a query I get this: Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for ...
5
votes
2answers
1k views

Performance impact of waiting on a service broker message

I have a situation where multiple client apps send messages via the Service Broker (utilizing stored procs). These messages are picked up by yet another client app and then processed. The way the ...
0
votes
3answers
13k views

Installing SQL Server 2000 32-bit on Windows Server 2008 x64?

Am I correct in assuming there won't be any issues installing SQL Server 2000 32-bit on a Windows Server 2008 x64 system? I understand the memory limitations, etc, but that doesn't matter at this ...
3
votes
1answer
89 views

Necessary to use a checksum on a backup and not solely the 'verify backup' option?

If want to ensure the integrity of a backup, would it be a necessity to use a checksum on all of my backups and not just the 'verify backup' option?
7
votes
1answer
2k views

Optimal placement of tempdb, mdf and ldf files in SQL Server 2012 on SSD's?

I realize this is probably a very open ended question and the answers could vary, but what is the optimal placement for the tempdb, mdf and ldf files in SQL Server 2012 when talking SSD's? ...
5
votes
1answer
800 views

Does dropping a Primary Key constraint from a Partitioned Table break the partition?

We have a table partitioned on a date column. The Primary Key for the table is a composite key of this date column and 4 other columns. We are thinking about dropping the Primary Key constraint from ...
3
votes
1answer
975 views

Stored procedure to check for missing fields in a table

I have a stored procedure that accepts a string parameter, a comma separated list of required column names that the SP should check a particular table and make sure those columns have data in them... ...
4
votes
1answer
404 views

Tracking object use using SQL Auditing

I am looking for a solution to track object usage in my database. Objects such as tables, stored procedures, and functions. I discovered SQL Auditing and was under the impression that it's exactly ...
2
votes
1answer
166 views

Aren't two writes required to update a clustered index record

I was reading the article on indexes at simple-talk, where it is written that If a heap has a non-clustered index on it (as the primary key), and data is inserted into the table, two writes have ...
4
votes
1answer
580 views

Why does using a Real data type in a mathematical equation return an incorrect result?

I was trying to figure out the source of what appeared to be a rounding error today, and discovered that one of the columns used in a mathematical equation was using the real data type, and this is ...
-4
votes
1answer
548 views

Why does a VIEW with a CLUSTERED index not use the index?

I have a view that has a clustered index along with other non-clustered indexes. A simple SELECT query does not use any of the indexes even when I select an indexed column. What could be the ...
3
votes
1answer
880 views

Creating non-clustered Index on Partitioned Table that already has an existing Primary Key

When I create a Primary Key as so: ALTER TABLE dbo.TABLEA ADD [MY_KEY] UNIQUEIDENTIFIER ROWGUIDCOL PRIMARY KEY DEFAULT NEWSEQUENTIALID() And then proceeded to create the following index: CREATE ...
5
votes
3answers
1k views

Should order of column in where clause be same as the index order?

I was reading this use-the-index-luke.com which explains in detail how indexes work. One of the things this person has re-iterated that the order of indexes matter a lot and to make the query fast the ...
4
votes
1answer
1k views

Does Reporting Services lock tables? [duplicate]

Possible Duplicate: Does SSRS lock the table when querying? I'm using SQL Server 2008 R2 and Reporting Services. Do the reports block other queries or are they executed in highly isolated ...
1
vote
1answer
2k views

gain admin access to sql express 2008

I have inherited a Windows 7 Professional pc with an existing instance of SQL Express 2008. I have local admin rights on the machine. I do not know the SA password. I am unable to create databases or ...
1
vote
2answers
997 views

SQL server moved, now can't use as linked server

So I have a SQL server database that was controlled by an outside vendor. It is hosted remotely. Then he needed to move the server to a new host. Now, I'm able to connect to the server manually ...
3
votes
2answers
220 views

how is synchronization maintained between different write and read database

One of my friends was asked this question in interview. Given two different databases one on which only write is done and the other on which only read is done. How does one maintain synchronization ...
2
votes
2answers
5k views

SQL Server: Should we use TCP or Named Pipes or use the default?

When connecting to a SQL Server 2008 R2 from a .NET 4 client application on a different server in the same LAN, one can set three different network protocols: TCP Named Pipes Don't set anything in ...
0
votes
2answers
111 views

Output parameter in stored procedure

Dim rs4 As Recordset = B1Connections.diCompany.GetBusinessObject(BoObjectTypes.BoRecordset) Dim qry4 As String = "SELECT Name FROM [@CCS_LOGINDET]" rs4 = obgn.Return_RecordSet(qry4) Dim constr As ...
3
votes
1answer
2k views

Sql server 2008 R2 installation fails with Error: 17204

Sql server 2008 R2 installation fails with the below error message in the log message, This is a part of the sql server log Starting up database 'msdb'. Error: 17204, Severity: 16, State: 1. ...
3
votes
1answer
89 views

SQL Server Analysis Services - where do I store user logins?

If I would like to create a Business Intelligence (BI) system using SSAS, with SSRS getting data from the SSAS cube. Which would be the best possible option to store users' credentials used with ...
2
votes
1answer
1k views

LEFT JOIN / WHERE clause with is null and false Estimated Number Of Rows

I have a table named Product and a table named ProductPropertiesCountry. Product is the definition of a product (description, price, productId, etc) ProductPropertiesCountry contains restrictions on ...
2
votes
2answers
463 views

Replacing composite key with surrogate

I have the following table that has a couple of million rows in it and is 99% fragmented virtually all of the time. My plan was to insert a IDENTITY field as a surrogate key to replace the current ...
4
votes
2answers
1k views

WHERE clause is not filtering on LESS THAN and GREATER THAN or BETWEEN

I am trying to select MTR values that are between the values of 0 and 4. What am I doing wrong? SELECT DATEDIFF(M, TheDate, TheOtherDate) AS MTR FROM MyTable WHERE MyID = 2074163 AND MTR >= 0 ...
2
votes
1answer
368 views

Creating the database on different file groups

What is the pros and cons of creating the database for a operational system on different file groups? I know it is useful if you want to keep the static part of a database online when the other part ...
4
votes
2answers
2k views

Query two SQL Server databases in same function but on two different servers

Suppose I have two database servers (DB-SERVER-1 & DB-SERVER-2), and there is a single database on each server (DB1 & DB2). Both are SQL Server databases. Is it possible to query both ...
3
votes
1answer
2k views

Enabling Service Broker on a database involved in an availability group

I'm trying to enable Service Broker on a SQL Server 2012 database that is part of an availability group and keep getting this error message: The operation cannot be performed on database "dbname" ...
4
votes
2answers
380 views

T-SQL Syntax error copying views dynamically

I'm creating a stored procedure to copy all views from one database to another using the following code. ALTER PROCEDURE [dbo].[spCreateViews] (@SourceDB NVARCHAR(200), @DestinationDB ...
2
votes
2answers
153 views

Visual Studio DAC with Schemabound View containing hierarchyid::GetRoot() - Two part name needed?

In Visual Studio, when trying to create a DAC which has a schemabound view which contains hierarchyid::GetRoot() this error is generated and the project does not build. However, the t-sql is ok as if ...
3
votes
2answers
336 views

Updating data from a report: any potential pitfalls?

Question: In general, are there any pitfalls with updating data from a SSRS report?* Context: More specific, I'm talking about this context: SSRS 2008 (with the option to upgrade, if needed). ...
2
votes
2answers
1k views

EXECUTE sp_executesql

i have a problem with EXECUTE sp_executesql and stuck with it. my query is as follows DECLARE @TABLE_NAME VARCHAR(5)='#T' DECLARE @TABLE_ID INTEGER=0 DECLARE @QRY NVARCHAR(MAX) ='' ...
2
votes
2answers
726 views

Issues with uninstalling and re-installing SQL Server 2008 R2

I have installed SQL Server 2008 R2, and was able to login and also create a database and everything. When I was facing some problems with connecting my .NET project with SQL Server, I created some ...
2
votes
2answers
107 views

Resume download on DB exporting

I am attempting to export a large database and import it to another PC over the Internet. Sometimes my Internet connection fails resulting in a database export error, causing me to have to restart ...
1
vote
1answer
2k views

SSIS: “The buffer manager cannot write 8 bytes to file”

We have about 60 or more SSAS cubes on one server. All the cubes have the same structure. Each cube has a different size because each cube has a different underlying data warehouse. However the schema ...
0
votes
1answer
1k views

Error restoring backup in sql server. Old server version

When trying to restore a backup file (.bak) to SQL Server installed on my machine, I get the following error (steps that I follow to restore are: Right Click Database ---> Tasks ---> Restore) Error ...
1
vote
5answers
746 views

SQL Server - Database per company. How to query across databases?

We are designing a product that, as per the client's request, must utilize a database-per-company design approach with one shared database holding common data. We are using SQL Server 2012 for the ...
2
votes
1answer
120 views

I would like to better understand the SQL Server security model in terms of users and groups to possibly replace an XML heirarchy model I am using

I am currently using XML in my database to represent metadata for individual products. I am using the below schema to enter the data. In each sub grouping of fields you will notice the cms_name ...
-1
votes
1answer
315 views

Multiple schema or multiple databases for better performance [closed]

I need to improve the performance of our enterprise .Net search application from the database point of view. The app already has 4 schemas on SQL Server 2008. 2 schemas for front-end operations ...
1
vote
2answers
271 views

Multiple schema or multiple databases for better performance

I need to improve the performance of our entriprise search application(.net) from the database point of view. The app already has 4 schemas on a separate sql server 2008. 2 schemas for front-end ...
6
votes
1answer
4k views

Mirroring - Server network address cannot be reached

I have SQL Server 2008 R2 Installed. It contains three instances. Default (MSSQLServer) First Instance Second Instance All these are Log On as Network Service.. Default Instance is Principal ...
10
votes
2answers
5k views

Broken NTFS Permissions for MSSQL$SQLEXPRESS

I have been "securing" our database server. To do this I removed some permissions from the folders that the SQL Express install created. D:\SQL D:\SQL\Data D:\SQL\Backup etc.. I kept the ...