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

sql server down bad things happens

Following Situation: You have a Database with very high transactions, the Database is about 4100 GBs The Recovery Modell from your Database is full Every week you make a full backup from your ...
6
votes
0answers
243 views

Msg 14027, Level 11, State 1, Procedure sp_MSrepl_addarticle [table] does not exist in the current database [closed]

Before setting up SQL Server snapshot replication, I backed up the database from ServerA and restored it to ServerB. Both servers are running SQL Server 2008 R2 SP1. In trying to setup snapshot ...
5
votes
1answer
2k views

Allow user to do anything within his own schema but not create or drop the schema itself

I have created a schema in SQL Azure and granted the following permissions to a database role: CREATE ROLE myrole AUTHORIZATION dbo; EXEC sp_addrolemember 'myrole', 'myuser'; CREATE SCHEMA myschema ...
4
votes
1answer
635 views

SQL Server 2008 R2 Service Broker Troubleshooting

I set up Service Broker between two databases on separate instances, one on a 2008 R2 Cluster the other on a separate box also 2008 R2. I have gone through the process of setting up all the objects ...
6
votes
3answers
556 views

How do I create a user for SQL Server whose queries (any/all) are time limited?

Is there any way to create a database user in SQL Server 2005 so that none of their queries are allowed to exceed a certain time limit (for e.g 20-30 seconds) or all queries are limited to a certain ...
5
votes
2answers
146 views

Unique Contraint/Index Based On Values

I have a table that has the following column definitions: ID (INT, PK) Name (VarChar) Active (Bit) Bunch_of (Other_columns) Question: I want to have a Constraint on Name/Active such that we can ...
5
votes
1answer
1k views

SQL Server job timeout

So, it seems that it is not possible to set the timeout for each single step in a SQL Server job (article from StackExchange). MSDN points out that you can of course set the Agent timeout: Sql ...
7
votes
2answers
948 views

Merge replication fails on executing query

My merge replication was working fine this morning. Since an hour or 2 ago, my synchronisation status windows keeps showing this message: Thread id 3108 will wait for 15 second(s) before retrying the ...
2
votes
1answer
361 views

SQL SERVER 2008 TVF OR CHARINDEX to search column with comma

ID BlahColumn 1 2 2 NULL 3 2,3 4 4,5,6 5 1,2 6 1 7 1 Hello, I am using the following as part of the where clause and using charindex is not working ...
3
votes
1answer
2k views

Why does altering a table and adding a foreign key create an extra constaint?

Edit: It was a default constraint as a result of setting a default value when adding the column. The name gave it away when starting with 'DF__'. Anyway, solved it by adding the column and manually ...
3
votes
2answers
2k views

SQL Server - In Recovery

Was uploading a few hundred thousand rows in my SQL 2008 R1 database and have come in this morning to an "In Recovery" message next to the database name in SQL Management Studio. I've tried a DBCC ...
1
vote
3answers
96 views

SQL Server database backups

I am looking to do regular backups of my SQL Server databases. Is there any reason why I should not just backup just the MSSQL.10/DATA folder? I've got a great backup solution in place from Rackspace ...
3
votes
1answer
121 views

What is recommended level of security for a production database?

I have a production database on our local server. Currently there are two many logins to the database, about 20, half of them are windows authenticated and the other rest are SQL Server authenticated. ...
4
votes
1answer
197 views

How to set constraints on UDT in SQL Server 2005 - 2012

I'm creating my UDT: CREATE TYPE [dbo].[Code] FROM VARCHAR(20) NOT NULL As RULES and DEFAULTS are considered deprecated, what is the recommended way to set constraint on my type to make sure that ...
10
votes
2answers
1k views

Why does SELECT 1/2 return 0?

As the title says. I even tried SELECT CONVERT(NUMERIC, 1/2) which also returned 0. I am using SQL Server 2008.
1
vote
1answer
404 views

DMZ server unable to connect through SQL Browser

I have a Web server in my DMZ, I have a SQL Server 2008 R2 server inside the LAN, this database server has named instance with a NO dynamic port. I have set as firewall rules the connection from my ...
0
votes
1answer
1k views

How To insert records in SqlExpress Database tables through sqlscript while installing setup?

I'm creating a database and all of my tables using SQL Server Express through SQL scripts. Now, I want to insert some records in tables like States (all states names), city (all city names). How ...
3
votes
2answers
458 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 ...
2
votes
0answers
60 views

How to Remove Articles Based on User

I am using merge replication on SQL 2012. I have a very large database with a large number of tables. The subscribers are using netbooks. I have a filtering scheme that controls which tables end up ...
7
votes
3answers
1k views

SQL Server 2012 Standard Edition - multiple instances and memory utilization

If we have multiple instances of a SQL Server 2012 Standard Edition (which has a 64 GB memory limit) on one server which has 192 GBs of RAM, do both instances only have access to the first 64 GBs of ...
2
votes
1answer
534 views

Cube Designer Aggregation Wizard Optimization Zero Percent Every Time

I am pretty new to SSAS. I have a cube (SSAS 2008 R2) that once had aggregations that has been created using the Aggregation Design wizard. When changing schema a few dimensions, i encountered an ...
15
votes
5answers
10k views

What is the most efficient way to get the minimum of multiple columns on SQL Server 2005?

I'm in a situation where I want to get the minimum value from of 6 columns. I've found three ways so far to accomplish this, but I have concerns with the performance of these methods and would like ...
11
votes
3answers
1k views

Implications of using a Unique NonClustered Index with Covering Columns instead of a Primary Key

We have a large table [MyTable] which currently has both a PK, and a UNIQUE Non Clustered Index on [KeyColumn] (which has additional covering columns), which seems redundant, and I think I can delete ...
2
votes
0answers
105 views

Are there any best practices before moving SQL Server to another node (controlled failover)?

Let's say there are multiple jobs running on the SQL Server - we have index maintenance jobs, backups, replication, etc. We would like to perform a switchover using Failover Cluster Manager. Are there ...
1
vote
1answer
3k views

Restoring an SQL Server 2012 MDF to SQL Server 2008 [duplicate]

Possible Duplicate: Restore SQL Server 2012 backup to a SQL Server 2008 database? I have created a database on SQL server 2012 with compatibility mode for SQL server 2008 (100). When I do a ...
0
votes
1answer
501 views

Where is sp_MSrepl_getpublisherinfo in SQL Server?

In learning about replication in SQL Server and having problems creating a subscription, I looked at the definition for sp_addsubscription. It calls sys.sp_MSrepl_getpublisherinfo, which I cannot find ...
2
votes
3answers
1k views

Transactional Replication snapshot locking Publisher db from beginning

I have recently upgraded my remote distributor to 2008r2. I am getting complete system locks when attempting to generate a new snapshot in the day when we have added an article to the publication (we ...
2
votes
1answer
74 views

Need a solution on dataset as given below

Data Set: col1,col2,col3,col4.col5 (A,b,c,d,e) (A,z,p,q,r) (F,s,t,y,v) (F,w,x,y,z) (F,p,x,r,t) (G,m,n,o,p) (G,m,i,q,s) Actually I need result set that has all the columns and only single row for ...
1
vote
1answer
164 views

Follow up to certificate sharing question

Follow up to the post Sharing certificates encryped by password between DBs and instances I created a certificate with a password CREATE CERTIFICATE testcert ENCRYPTION BY PASSWORD = 'test123' ...
2
votes
6answers
4k views

Taking backup of all the databases in SQL Server

I have a Microsoft SQL Server 2005 DB server. In the DB server, I have around 250 user databases. I have to take a back up of all these databases. Since, manually taking backup consumes lot of time, I ...
3
votes
2answers
726 views

Sharing certificates encryped by password between DBs and instances

Question: I am trying to create a single (self signed) certificate and deploy across many DB's and instances. I create and backup the cert with: USE MASTER CREATE CERTIFICATE DavesCert ENCRYPTION ...
23
votes
5answers
5k views

Why does ORDER BY not belong in a View?

I understand that you cannot have ORDER BY in a view. (At least in SQL Server 2012 I am working with) I also understand that the "correct" way of sorting a view is by putting an ORDER BY around the ...
3
votes
1answer
3k views

Disable autocommit for SQL Server connection in Oracle SQL Developer

I am using Oracle's SQL Developer to execute queries against my SQL Server 2008 database as I simply can't work with SSMS as long as it doesn't support Ctrl + Return to execute statements... Anyway, ...
7
votes
2answers
8k views

Downgrading SQL Server 2012 to Lower Edition

I have a Win2008 R2 server with an enterprise edition of SQL Server 2012 installed. Because my production server is going to be standard edition, is there a way to downgrade editions from enterprise ...
2
votes
2answers
670 views

Relocate all files to folder checkbox unavailable sql server 2012

Using SQL 2012 Enterprise edition Following instructions here for restoring a backup: http://msdn.microsoft.com/en-us/library/ms186390.aspx#Restrictions I need to be able to rename the database ...
7
votes
1answer
1k views

Do schema changes “break” SQL Server 2012 AlwaysOn or are they handled transparently?

My organization is planning to adopt SQL Server 2012 AlwaysOn and I am trying to understand what impact (if any) it will have on our application upgrade process. We release application updates on an ...
2
votes
2answers
5k views

Error Authenticating Proxy Account when Executing SSIS job

I have a SQL Server instance that runs 5 scheduled tasks each night, each of which run SSIS packages. These packages have been running for years and the associated steps run via a Proxy Account ...
2
votes
0answers
577 views

I/O is frozen on database databasename

On SQL Server 2005 log report, everyday I receive the following message: I/O is frozen on database databasename. Is it serious ? How to resolve it ?
7
votes
1answer
597 views

List Prepared Statements

Anybody know how I can list the prepared statements that are in a SQL Server instance?
1
vote
1answer
136 views

Default Schema Problems on server

When i connect to SSMS on my server through remote desktop and query my database using: SELECT * FROM [sys].[database_principals] WHERE [principal_id] = USER_ID() I am getting the correct results ...
1
vote
1answer
581 views

2 similar queries in large sql server table - 1 takes too long

I have a huge table in my database that contains distances between cities. This enables my application to find nearby cities around the world when a starting city is selected. It contains 4 columns ...
3
votes
1answer
925 views

Data Collection reports fail because login is from an untrusted domain

I've set up a data warehouse and Data Collection according to BO. Reports are generated properly when running them in Management Studio running on the server but fail when they are run from Management ...
1
vote
2answers
505 views

SQL Server 2012 Data Warehousing Overall Flow [closed]

I am studying Data Warehousing in SQL Server 2012 I am attempting to learn the various tools included by practicing on the different tools separately. I have practiced with: AdventureWorks ...
1
vote
2answers
1k views

Can't create indexes on really large table!

I have a table with over 300 Million rows in it. When I try to create an index on the table I get the error message below. Msg 1105, Level 17, State 2, Line 3 Could not allocate space for ...
1
vote
0answers
303 views

How To Speed up Merge Replication [closed]

I am running SQL2012 merge replication on a netbook using SQL Express as a subscriber. The netbook has 1GB of RAM. The replication process works quite well, but it is when it comes to applying the ...
4
votes
1answer
277 views

SQL Server Workspace Memory

Does Workspace memory (part of buffer pool) is limited for only Hash Join, Sort etc. only? If I have a query that does use a nested loop join (wihtout a sort or hash), would it not use workspace ...
3
votes
1answer
150 views

Merge replication with PDAs AND P2P replication between servers?

We're currently building a setup to scan tickets at an event. We plan on having 2 servers at each entrance but can't have a local link between the two. We have scanners (sqlCE) and half of them are ...
4
votes
1answer
114 views

repeatable read and nolock

Does anyone know what the net effect of having a block of t-sql with a transaction isolation level of repeatble read and then inside having a select with nolock. Does the nolock become invalid ...
5
votes
3answers
1k views

BUILTIN\Administrators accidently removed

Hi, so recently when trying to fix another bug within my sql server 2008 R2 db I removed the BUILTIN\Administrators login from sysadmin. Now it will not let me change anything winthin the database. ...
9
votes
3answers
2k views

Used Memory not freed up after a SQL BULK Insert / BCP Export

I have created a very basic SQL table as following CREATE TABLE [dbo].[TickData]( [Date] [varchar](12) NULL, [Time] [varchar](12) NOT NULL, [Symbol] [varchar](12) NOT NULL, [Side] [varchar](2) ...