This tag is for SQL Server 2008, major build version 10.00.xxxx.

learn more… | top users | synonyms (2)

4
votes
1answer
249 views

Can I attach a SQL 2008 R2 database to SQL 2008 that is not R2?

Can I attach a SQL 2008 R2 database to SQL 2008 that is not R2? I have a database that I am detaching from SQL 2008 (not R2) and can attach this to SQL 2008 R2. Can I then detatch the database from ...
1
vote
1answer
1k views

SQL Server 2008 - Cannot create index on Indexed View

I am attempting to create an index on a view. The view is contained in a different schema than the underlying table it's based on. When I attempt to create the view, I get the following error: Msg ...
1
vote
1answer
7k views

reindex database in sql server 2008

The best way to reindex 500GB database in SQL Server 2008 Is it by using Maintenance plan? Would I face performance problems while reindexing?
1
vote
1answer
2k views

Can I check if a Mirror database was synchronized when the principal died?

having 2 machines, one being the principal and the second one as a mirror in case of failure of the 1st one. without witness but in High Safety mode Is any way to check if the mirror DB was ...
2
votes
2answers
545 views

Can I implement clustering with just 2 servers and one NAS?

I have the following architecture, it consists in only 2 servers, connected to a NAS. I'm having trouble in implementing clustering because I can't have a domain controller in any of them (if I do ...
1
vote
2answers
253 views

SQL Server RandomNumbers Stored Procedure Error

I tried to create a stored procedure for generating random numbers but it doesn't work; the random numbers are identical in every record. CREATE PROCEDURE Update_Driver_Position @TempName ...
4
votes
1answer
1k views

How are bit fields sorted for an index?

I am building a compound index, and I'm not 100% sure which way to include a bit field that is part of the table. The index will be for something similar to a list of forum topics, where I want the ...
2
votes
1answer
596 views

SQL Server 2008 R2 - Upgrade Default DB Instance (Express) to Developer Edition

I have just installed SQL Server 2008 R2 Developer edition (created a new instance for it: DEVEDITION). I previously had and the default instance (MSSQLSERVER) which was running SQL Server 2008 R2 ...
3
votes
1answer
559 views

Can you set up mirroring for sql server reporting services?

I have mirroring set up for our SQL Server 2008 R2 Standard database server. Questions How do I ensure high availability for reporting services if the server goes down? Is there a kind of mirroring ...
3
votes
3answers
6k views

Why so many logical reads?

I have a very simple query that is showing in Activity monitor and other statistics as having the most logical reads on my entire DB server. SELECT MAX(RESULT_DATE) FROM TABLEX mm WITH (NOLOCK) JOIN ...
3
votes
1answer
1k views

Removing Instances and SQL Server Express edition and going to Standard/Developer/Enterprise

I would like to move from SQL Server 2008 R2 Express to SQL Server 2008 R2 Developer or Enterprise. I just noticed that I have the following services running: SQL Server (MSSQLSERVER) SQL Server ...
1
vote
3answers
935 views

SQL Server 2008 R2 Express Edition - generating database create script

I need to script a database schema out to T-SQL for inclusion source control. The Express version of SSMS doesn't seem to let you script the entire database, just individual tables. Are there any free ...
5
votes
3answers
945 views

Recalculate row size in SQL Server 2008?

It is possible to recalculate row size in SQL Server 2008? Take this example: declare @counter int declare @statement nvarchar(max) set @counter=0 drop table kua2 create table kua2(id int) while ...
2
votes
2answers
3k views

Replace the server name in email sender address when sending email from SQL Server 2008

I'm sending emails directly to Microsoft Outlook accounts from SQL Server 2008. Everything is fine, email was sent. Only problem is that in the header of the email the SQL Server name is embedded. ...
4
votes
1answer
363 views

Sql Server Enterprise 2008 R2 Partition Switch with Xml Index

Ok, sql db partitioning and switching doesn't seem to be a highly discussed topic, but it is something I'm implementing. I've had success in all areas of partition functions, partition schema, file ...
4
votes
2answers
311 views

Same queries, different servers, different exec plans, stats are up to date

I've got the same query running on two different servers, and getting vastly different performances. I have updated all of the stats on dependent objects and it has not fixed the issue. I'm lost on ...
5
votes
1answer
195 views

Composite or Single-Field Clustering Key

My DBA and I are having a disagreement on index structure. Consider data for a medical claim... We have the Header table with fields like: ClaimId (varchar(50)), PaidAmount, MemberID... and for ...
2
votes
1answer
882 views

How to Backup and Restore Filestream Data

I am trying to backup and restore my database which includes a filestream filegroup. I backed up the database without the filestream filegroup and was interested to know what happens when you restore ...
1
vote
3answers
445 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
760 views

Replicate/Mirror SQL Server schema to slave databases

I have a empty database called MASTERDB and around 10, or more, slave databases that are copies of the MASTERDB database. MASTERDB will be always empty, as I only need the schema. No data is going to ...
3
votes
2answers
3k views

Default SQL Server 2008 locking behaviour

I am using SQL Server 2008. What is the default lock behaviour with UPDATE? NOLOCK? ROWLOCK? PAGLOCK? How can I tell what the current level of lock is for a table? Thanks, Bruce
10
votes
1answer
4k views

Is it possible to create an alias or synonym for a database?

Is it possible to create a database alias or synonym? What I am hoping to be able to do is have NewDatabaseName aliased as OldDatabaseName to prevent having to rewrite a ton of code. Backstory: I ...
2
votes
1answer
139 views

Is execution of synonyms not logged in target database?

I've been working on an issue where a single select within a stored procedure failed due to permission-issues, and we traced it to a call to a Synonym: USE DatabaseA GO CREATE SYNONYM ...
4
votes
3answers
6k views

Stored procedure executes too long

We use SQL Server 2008. When I am watching in SQL Server Profiler I found some queries that take for example 20 seconds. The same query (in a stored procedure) when executed in SQL Server Management ...
1
vote
1answer
1k views

SQL-Server: sp_spaceused gives zero rows but big dataSize for cleaned table

After cleaning my table with DELETE FROM MyTable (and executing DBCC shrinkdatabase('MyDB') should that matter) I run the statement EXEC sp_spaceused MyTable. The results confuse me: tableName ...
4
votes
2answers
139 views

Are my Indexes Being Used?

I am using SQL server, and the person creating our database added lots of indexes on our biggest table. These indexes only include one field each. To me it seems that these indexes are mostly ...
2
votes
2answers
5k views

Reducing Key Lookups

I am using SQL server, and I have been looking closely at the concept of key lookups, ...
0
votes
1answer
931 views

What privileges do I have to grant to allow a user to select from information_schema.table_privileges?

I'm using MS SQL Server 2008, and I am trying to get a complete listing of all privileges assigned to all grantees by running this query: select * from INFORMATION_SCHEMA.TABLE_PRIVILEGES However, ...
7
votes
3answers
26k views

How do I run a batch file from a scheduled Job via SQL Server Agent

I'm attempting to run a (Windows) batch file from within a SQL Server agent job under SQL Server 2008 R2. In the Job Steps, I've created a new step, set its type to "Operating system (CmdExec)". I ...
0
votes
2answers
198 views

Cant connect to Server using SSMS on my desktop

SQL SERVER 2008 R2 When attempting to connect to the default instance of sqlserver on our local server from SSMS on my desktop I'm receiving the following error. A network-related or ...
0
votes
1answer
4k views

Run SQL Server Snapshot Agent automatically

I am trying to setup automatic transactional replication. Basically I have some script files that are executed after each other. They set up a replication from one server to another and this works ...
1
vote
1answer
972 views

Syspolicy_purge_history connection issue

I am having an issue with the syspolicy_purge_history SQL Agent job on a 2008 SQL Server system. The server is using a non default port number and is in a cluster. Before it was put in a cluster, it ...
1
vote
2answers
2k views

SQL Server Fulltext search against big amount of search terms over some period of time

I've got a task where I must do a fulltext search in SQL Server 2008 against big amount of search terms (30-60 search terms) combined with OR. Some search terms may have partial match (asterisks at ...
2
votes
5answers
4k views

Keep transaction log size under control during batch processing

tl;dr I think my verbosity has obscured the real question I'm asking here, so I apologise for that. My main issue is that the checkpoint command appeared to be working for at least 800 iterations of ...
2
votes
1answer
81 views

SQL Server 2000 query error

When I attempt to run on the SQL Server 2000 to a query which was developed for SQL Server 2008, I receive the following the error. ambiguous column name SucNo Here is my query: SELECT ...
2
votes
3answers
852 views

Column sort order in CREATE INDEX statement?

When creating an index one can determine if an index column is sorted using ascending or descending order. BOL says that [ ASC | DESC ] Determines the ascending or descending sort direction for the ...
1
vote
2answers
183 views

How many DBMS's can be installed on a single server?

The software in our organization uses various databases, many on different database platforms. Can we put all the various database platforms on a single machine? What are the limitations to this? ...
3
votes
1answer
165 views

SQL Server - Using spatial data

I'm using SQL Server 2008 R2 for real-time location aware service. The service mostly receives location data (lat/lon) from a user and returns locations around the user. The data is being sent from ...
3
votes
5answers
8k 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. ...
2
votes
1answer
1k views

SQL Server 2008: What are the English Word Breakers?

I'm trying to replicate what SQL Server 2008 is doing when generating full-text indexes, but I'm having a hard time finding a list of which characters SQL Server 2008 considers to be word breakers. ...
2
votes
2answers
2k views

SQL Server 2008 simple recovery mode issue

During my daily maintenance backup task, I am attempting to set specific databases to recovery model simple along with shrinking the database. ALTER DATABASE db_name SET RECOVERY SIMPLE GO DBCC ...
1
vote
2answers
2k views

SQL Server 2008 - Log file out of control & cant shrink it [duplicate]

Possible Duplicate: Why Does the Transaction Log Keep Growing or Run Out of Space? I am having trouble with my database, the log files is currently 250GB in size, I need to shrink this down ...
1
vote
1answer
375 views

What is the effect on primary keys when moving a CLUSTERED index to a new filegroup?

I'm moving a CLUSTERED index from one filegroup to another, using the with drop_existing=on functionality. Do I need to be concerned about primary keys? In other words, is there some special ...
1
vote
1answer
1k views

SQL Server 2005/2008 logging connections

How can I audit SQL connections to the database from Windows credential Sql Users Is there some built-in feature where I can determine number of: all connection active connection unclosed ...
17
votes
4answers
12k views

Should dbo schema be avoided?

When it comes to the dbo schema: Is it a best practice to avoid using the dbo schema when creating database objects? Why should the dbo schema be avoided or should it? Which database user should own ...
4
votes
4answers
981 views

What's the equivalent of --safe-updates of mysql in MS SQL Server?

In MySQL, you can use the feature called --safe-updates (--i-am-a-dummy) to limit the number of rows updated per query. http://dev.mysql.com/doc/refman/5.0/en/mysql-tips.html#safe-updates Is there ...
1
vote
3answers
5k views

how to Export a document contain tables name, columns names and column description from SQL Server 2008?

I created a db in sql server 2008 and I wrote for some columns description to describe them, What I want now is to find a way to export these tables design including the description for each column ...
0
votes
2answers
980 views

How to find out the activity which increasing the response time of the Sql Server?

We are using SQL Server 2008 as our database server. Recently we came to know, by using a 3rd party tool, that the response time of our database server is increasing at a specific time for example at ...
1
vote
1answer
349 views

Is my case statement broken by the use of outer apply?

I'm struggling with a case statement not working. Simple enough I need to supply a value of 0 where the question marks are. I have several other case statements which handle separate columns, but this ...
2
votes
2answers
1k views

How to Test Log Shipping

I am evaluating log shipping as a solution to keep a permanent failover copy of our live database. It looks ideal. We are using Filestream which is part of the reason to use it over mirroring. I ...