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
170 views

Hard Drive Configuration for my setup

I have a fairly large transactional database (100GB) with a lot of users. The database access is solely via stored procs that make heavy use of temp tables, table variables, cursors and other fun ...
1
vote
2answers
266 views

Editing built-in templates in Management Studio

I'm running SQL Server Management Studio 2008 (10.0.5500.0) and was attempting to edit the built-in template "Create T-SQL Trigger (New Menu)". I open the Template Explorer, right-click the template, ...
1
vote
2answers
763 views

SSIS error Property BackupDirectory is not available for Settings

I am trying to edit the SSIS Back Up Database Task And it gives the folowing error Property BackupDirectory is not available for Settings 'Microsoft.SqlServer.Management.Smo.Settings'. This ...
1
vote
1answer
352 views

Going from separate databases to shared databases and schemas (Multi Tenant Data Architecture)

I am eagerly trying to design the perfect multitenant data architecture for my database. I am getting inspiration from an article posted by Microsoft, based on scenario 3. I have been given all my ...
1
vote
3answers
109 views

DBCC CheckDB Consistency error on a empty table

What could be the reason behind a DBCC CheckDB reporting a consistency error on a empty table in sql server 2008? This DB is restored from sql server 2000. DBCC CheckDB on sql server 2000 doesnot ...
1
vote
3answers
393 views

SQL Server 2008 eval expired

I have (more than one instance) some of my experiments with SQL Server 2008 eval (why eval --> brutal bureaucracy about using licenced version for testing or short life-cycle experiments), and after ...
1
vote
1answer
501 views

How to setup daily SQL server export to csv text file?

We are exporting 100,000+ rows from a SQL Server 2005 DB to a text file. We have a web script setup to read all rows and then write the text file and it takes over 5 minutes to complete that script. ...
1
vote
4answers
3k views

Attaching database to the SQL server

I have the following error The database 'Test' cannot be opened because it is version 661. This server supports versions 655 and earlier. A downgrade path is not supported. Usually this kind ...
1
vote
2answers
302 views

Best type to use in a composite key when one of the values varies in type

I am building a data store for the content of multiple blog sites which have been scraped. Each of these sites is going to have an entry in a Blog table BlogId Url ...
1
vote
2answers
727 views

Restore System Databases from MDF/LOG files

We recently experienced a hardware failure that caused our SQL 2005 server to take it in the dump. The good news is that we have the MDF and LOG files for all the databases, the bad news is that we ...
1
vote
1answer
699 views

Cartesian Product SQL / Inserts with multiple Values Clauses

I want to create cartesian product sql query.But,I'm getting the error.Where I wrong? alter table #Personel ( Ad varchar(100) ) alter table #Masa ( MasaAdi varchar(100) ) insert into #Personel ...
0
votes
2answers
48 views

Set default value for all columns with specific name within a database

I've got a database that includes an int column project_id on many tables, and I want to script setting the default value to a specific value for all columns with that name in the database. Note that ...
0
votes
1answer
78 views

SQL Server 2014 Install Not Creating Default Instance [closed]

I am trying to install SQL Server 2014. The problem that I am having is that during the installation it is not letting my choose whether I want to use a default or a named instance. I have been ...
0
votes
2answers
59 views

How to provision the SQL Server Agent service after SQL Server Edition upgrade

I have upgraded SQL Server 2008 R2 Express to SQL Server Standard Edition. After I have upgraded it, the SQL Server Agent was stopped. I have tried to start but it fails. Only when I have changed ...
0
votes
2answers
131 views

Get Date Limitation

So what I need is a limitation for the user of the funded contracts. So this is what I am trying to implement. I am trying to let the user enter dates within the year 2014, which will bring up how ...
0
votes
1answer
25 views

Create a certificate with a private key

Reading this answer I have a question about it: How can I create a certificate with a private key in my app database?
0
votes
1answer
71 views

How to retrieve the Capture Instance for a given table?

Working with SQL Server 2012, I have a hierarchical table layout (TPT). All tables "inherit" from the same base table (dbo.DataObjects). All tables have history tracking via CDC enabled. I am trying ...
0
votes
1answer
234 views

Reporting Services TempDB lock blocking report generation

Two days ago one of our reports in Reporting Services started to take much longer to generate. Its generation time had increased from 4 seconds to 2 minutes. Investigation found: The Stored ...
0
votes
0answers
108 views

Based on these DBCC SHOWCONTIG stats, should I index this table?

I have a SQL 2008 Standard server on full mirror (safety). I reorganize all indexes weekly. I am looking into rebuilding a few indexes to improve performance. I ran DBCC SHOWCONTIG on my largest, most ...
0
votes
0answers
412 views

How to debug problems with SQL Server multiserver (Master and Target server) administration?

I've tried to set Mater and Target Servers on various cobinations of SQL Servers 2012 R2 on Window Server 2008 R2 and Windows 7 machines but always getting one or 2 of the following errors during ...
0
votes
2answers
195 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 ...
0
votes
2answers
2k views

Is it viable to attribute permissions to SQL Server virtual accounts (NT Service\SQLSERVERAgent, etc)?

Using MS SQL Server 2012 in Microsoft Windows Server 2008. I am somewhat confused by the New Account Types Available with Windows 7 and Windows Server 2008 R2 virtual Windows accounts [NT ...
0
votes
1answer
142 views

Does failed task considered to be run to completion in SQL Server maintenance plan terminology?

The replies to my previous question: "How to specify a SQL Server maintenance plan subtask to run unconditionally on success or failure of preceding tasks?" answered me that I should change ...
0
votes
3answers
90 views

Design concerns for using 3x bit or one char(1) or one integer in table for holding status of item

I need to extend my existing table with status column. I am in doubt how to do that in most appropriate way regarding of future use of that status and performances of existing table. My table is ...
0
votes
1answer
113 views

SQL Server hangs on a specific record

For some reason my database is hanging on a specific record: SELECT id FROM Foo WHERE id = 40469; Executes right away: SQL Server Execution Times: CPU time = 0 ms, elapsed time = 0 ms. ...
0
votes
1answer
814 views

Migrating from SQL Server to MySQL using MySQL Workbench tool

I'm trying to migrate few tables from SQL Server to MySQL using MySQL Workbench migration wizard. All work fine for structure migrations but when I go to the data migration section it throws an error ...
0
votes
1answer
510 views

How to create a trigger in a different database?

Is it possible to create a stored procedure that creates a table trigger (DDL) in a different database than the one the stored procedure itself resides. The databases are on the same server instance. ...
0
votes
3answers
132 views

Sql Server 2012 Restoring Master and Migrating a server

I am migrating an entire Sql Server instance with 10 databases on it. It has many sql jobs and users. What is best practice regarding the master database? Should I backup and restore this too, or ...
0
votes
0answers
75 views

Windows Server failover cluster [closed]

I have 5pcs. IBM System x3650(7979 - ex. ESX/VMWare, planned EOL) now with baremetal Win2012 DataCenter, every machine has the same HW and SW (inc policy). I want to create two clusters (MS SQL), for ...
0
votes
3answers
80 views

Access to tables in SQL Server

I would like to know if there is a table where accesses to tables are saved, per user or per system. I'm using both SQL Server 2005 and 2008.
0
votes
1answer
61 views

Merge subscription behaviour

I have a merge subscription with the ExchangeType parameter set to 1 (upload only). Rows are transferred to the publisher as expected. If I delete a row at the subscriber, the corresponding row at ...
0
votes
5answers
3k views

Copy a SQL Server database from one server to another on demand

I have two servers, Prod and Test, both running SQL Server 2008 RTM. Is it possible to have a PowerShell- or VBScript that could copy a database from one server to another? The copy should of course ...
0
votes
1answer
2k views

How to connect a SQL Server 2012 to the internet [closed]

As you know you can create a database with SQL Server using the SQL Server configuration manager and SQL Server Management Studio. You know this - just typing that to tell that I checked the whole ...
0
votes
1answer
230 views

Why is CDC capture failing due to a missing dbo principal

I am having a problem running the CDC change capture job against some of my test databases. The error message I'm getting is the following: Executed as user: NT AUTHORITY\NETWORK SERVICE. Cannot ...
0
votes
1answer
217 views

How can I install a provider for linked server?

I have a provider for a linked server called PervasiveOLEDB.11.0 installed on a sql server 2005 machine. It always me to have a connection to a pervasive sql database. I would like to use this same ...
0
votes
2answers
162 views

SQL Server transaction log [duplicate]

Possible Duplicate: Why Does the Transaction Log Keep Growing or Run Out of Space? Is it possible to have SQL Server 2008 R2 reset the transaction log for certain databases when the ...
0
votes
1answer
181 views

Trouble in Multi-Language DB

I'm working on a DB design for medicines in many countries with different languages. I created a table for the different languages I want and link it to another table of chemicals. But I find that ...
0
votes
3answers
117 views

How to convert query results into groups of common results

I have a query that returns results like this: MyValue MyGroup _______________|_______________ 56 | I _______________|_______________ 12 | I ...
0
votes
2answers
906 views

Secure way to connect: Windows Authentication or SQL Server Authentication and why?

Which is the best way to create a connection string for SQL Server? Should I be using a trusted connection string (windows authentication) or an untrusted connection string (sql server ...
0
votes
3answers
1k views

INNER JOIN making COUNT(*) slow

I have a very simple query: SELECT COUNT(*) FROM messages INNER JOIN users ON messages.user_id = users.user_id With the join it takes 1146 ms and without it takes 220 ms (220 ms still seems slow to ...
0
votes
1answer
824 views

how do I merge two views

I have basically two views named customerV and productV. the SQL statement in the customerV view is : SELECT CUSTOMER_REGISTRATION.SURNAME, CUSTOMER_REGISTRATION.OTHER_NAME, ...
0
votes
1answer
109 views

Chart creation in BIDS 2008

Due to low reputation point i am not able to include the picture. I am trying to make u guys understand what i am asking for: I had created a report. And that Report contains these fields and ...
0
votes
2answers
1k views

How can I truly DELETE data from a SQL Server table - still shows up in notepad in backup file?

SQL Server DELETE only marks as DELETED though leaves as data in the data pages. Data pages are 1024 KB in size and this problem can be eliminated by adding a FILLFACTOR that ensures only 1 record ...
0
votes
1answer
1k views

Deny INSERT/UPDATE/DELETE to all users for objects in a specific schema

I've got a payroll-related schema that I need to secure. I figure if I prevent all users from directly modifying the tables, and create a set of procedures to handle all data modifications, we should ...
0
votes
1answer
12k views

How to determine used/free space within SQL database files?

I normally use the following method to determine the free/used space within each file of a database: Select *, fileproperty(name, 'SpaceUsed') as Used From dbo.sysfiles This returns total and used ...
0
votes
3answers
299 views

Does running a COUNT() statement using NOCOUNT ON; consume much

On millions of rows.. Is it worth caching the total amount or turning NOCOUNT OFF; instead of requesting it each time on that much data? Sql Server 2008 R2 Also, is running a COUNT() statement on ...
-1
votes
1answer
537 views

how cursor implementations are different for each cursor type in sql server

In Oracle, there are only 2 types of cursor i.e. Implicit and Explicit cursor. Which is easy to understand. But, in SQL Server there are 4 Cursor AFAIK i.e. Static,Dynamic,Forward Only and Scroll. ...
-1
votes
2answers
798 views

Select query having count and variable

I have a table like the one below. I need to form a select query. I'm going to pass a RefID like SELECT SNo FROM Register WHERE RefID = 1 And beside the SNo in the Statement, I need to have ...
-2
votes
1answer
9k views

How do I add minutes to a time data type?

I have a stored procedure which inserts two records into a table, the difference between the records is that the time column of the second record is @MinToAdd after the first: CREATE PROCEDURE ...
-3
votes
1answer
78 views

Getting number of errors in stored procedure [closed]

I am getting an error in stored procedure as follows: Msg 156, Level 15, State 1, Procedure K2_CHECKENTRYINFILELOG, Line 27 Incorrect syntax near the keyword 'if'. Msg 102, Level 15, State ...