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

learn more… | top users | synonyms (2)

5
votes
2answers
7k views

How to know if I am running SQL Server 2008 R2?

I ran @@version. This is what it gave me: Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64) Sep 16 2010 19:43:16 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on ...
2
votes
1answer
413 views

Return Output from SQL Function using command line SQLCMD

I have a SQL Function that returns an Integer as the Output. I need to execute it via sqlcmd and I only want to get it's integer output. However right now I'm getting back this type of output: ...
1
vote
0answers
3k views

Transactional replication subscription not showing in SQL Server Management Studio [closed]

I tried to set up 3 SQL instances, one publisher 2 subscribers, to replicate data between them. I did it using the GUI wizard and all went fine in the Publisher: my publication appears under "Local ...
2
votes
2answers
320 views

UDF And Query Plan Caching

I have a multi statement table value UDF. That builds a temp table then returns it as the result. The first time its executed it takes 5 seconds, subsequent executions with the same parameters take 1 ...
2
votes
2answers
155 views

How can I prevent/detect that a end user restored a backup?

We need to prevent the SQLServer 2008 .mdf file from being replaced by the end user of our application. we collect data in the MDF that is important to us. If the user saves an old copy of the MDF, ...
1
vote
2answers
328 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 ...
5
votes
4answers
4k views

SQL Rebuild Index, Recovery Model, and db log filesize?

I have a database that we currently run transaction log backups throughout the day, every 30 minutes to be exact, and we run a full backup each day at 2am. Every Saturday at 3am, we have a job setup ...
2
votes
2answers
445 views

How do I connect to a SQL Server 2008 instance on my network?

I have 2 SQL instances in 2 virtual machines. I'm able to see the other instance in one machine but I cant connect to it. Probably some permission problem...but I don't know where to look. Can ...
4
votes
4answers
3k views

Empty strings in VARCHAR(MAX) consuming space which cannot be recovered

I have a table with a non-nullable VARCHAR(MAX) column where every row contains an empty string (third party database so I can't change it). I see a huge amount of space use, over 15GB for 1 million ...
0
votes
1answer
2k views

Upgrade older SQL 2008 to 2008 R2 on active/passive cluster

I have an active/Passive SQL Server 2008 cluster in production that I need to upgrade to SQL Server 2008 R2. I just want to make sure I understand all the steps before starting this in production. ...
2
votes
2answers
512 views

Clustered monotonically increased index insert performance

I have a table with field Id (bigint, IDENTITY) as primary key and clustered index on it. I inserted 400 rows and saw execution plan. I got: the relative query cost for this insertion 36% and for this ...
8
votes
5answers
3k views

Query Running Differently on SQL 2005 vs SQL 2008R2

At my office, we have a query that is pretty ugly, but runs pretty well in production and in the development environment (20sec, and 4sec respectively). However in our testing environment it takes ...
1
vote
1answer
700 views

Does composite cluster index affect performance of seek/scan non-cluster index which is part of the composite?

I have bank transaction table with columns Division Brcode TrDate ProjectCode Accountnumber EffectiveDate DrCr Amount EndBalance In the other table the Brcode itself is unique and is assigned under ...
5
votes
2answers
9k views

Unable to delete SQL Server 2008 R2 login

I had created a SQL Server login some days back. Now I need to delete the same. So I went into SQL Server Management Studio => Security => Logins and selected the login that I want to delete. It ...
3
votes
2answers
6k views

How to migrate from SQL Server 2000 to SQL Server 2008 R2 Express Edition

I have been trying to migrate a database from SQL Server 2000 (part of SBS 2003) to SQL Server 2008 R2 Express Edition I naively tried using the SQL Server Export and Import wizard. This has worked ...
4
votes
4answers
729 views

Can two servers access the same database files?

I'm designing an application and considering some options regarding the database system since I'm not familiar with Microsoft SQL Server. I would like to know if it's possible to have 2 servers ...
1
vote
2answers
1k views

how to reduce transaction log size automatically? [duplicate]

Possible Duplicate: Why Does the SQL Server Transaction Log Keep Growing or Run Out of Space? how can i reduce the size of Transaction log programatically and automatically, because no one ...
2
votes
4answers
1k views

The broker in the sender's database is in single user mode

Could you please help with why am I getting this sys.transmission_queue.transmission_status message after restoring from a snapshot? The broker in the sender's database is in single user mode. ...
4
votes
1answer
875 views

Property Owner is not available for Database 'DBNAME'

Property Owner is not available for Database 'DBNAME'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo) I am ...
5
votes
2answers
158 views
6
votes
1answer
659 views

How long can the log reader agent run for before a restart will do it some good?

As a developer who has for the first time successfully implemented a replication topology for our production database, I'm monitoring it very closely and fretting over potential problems. I'm pleased ...
3
votes
1answer
1k views

Performance of inner join query for certain condition

I have one question about inner join query in SQL Server 2008. Is there any situation where NOT to use inner joins. I have one scenario please tell me that here inner join is fruitful or not. I have ...
3
votes
3answers
5k views

SQL Server: How to call stored procedure without schema name?

SQL Server 2005std/2008web edition db=user=schema=owner='John' I'm moving website from one server to another. This piece of code works well on old server with SQL Server 2005. Dim sqlCmdVehicle ...
8
votes
2answers
3k views

SQLCMD Mode in SSMS and @@variable expansion

When using the SQLCMD mode withing SSMS (not from the commandline), is there a way to assign the current server and instance to a variable? This is different and distinct from assigning ordinary TSQL ...
2
votes
1answer
420 views

Error When Restoring Log

Here is the situation. I have restored a database to replace an existing version (need to get it back to yesterday at a certain time). So I do a RESTORE DATABASE ... WITH NORECOVERY, REPLACE, etc... ...
2
votes
2answers
164 views

SQL Server Timeout: Gathering server side information

We use SQL Server 2008 for our database. We use a combination of Classic ASP and .NET to connect to said database. We get random timeouts on queries that are extremely simple and when we run said ...
2
votes
1answer
881 views

Why does an AS cube rebuild use so much TempDB?

I have a 50GB SQL 2008 database (only 36 of that is data) with a 24GB Analysis Server cube that rebuilds nightly. The cube rebuilds have been using more and more of the TempDB on the SQL server each ...
2
votes
2answers
4k views

MS SQL Server 2008: How to improve performance after deleting transaction log file

Due to the size of transaction log file (it grew up to 200 GB) I had to delete it because the disk was running out of space. I know this is not a good practice but anyway after that the performance is ...
5
votes
3answers
2k views

Run several commands against data in text file (SQL Server 2008 R2)

I'm new to this website so forgive me if I'm asking a rudimentary question and/or one that's been asked 100 times before. I wasn't able to find an answer during my searches here. I'd like to have my ...
1
vote
1answer
2k views

Simple Implementation of SQL Server 2008 Encryption

I am looking at using some of SQL Server 2008's encryption. I have read the following article on MSDN: http://msdn.microsoft.com/en-us/library/ms179331.aspx Q1a: Is the master key password ...
6
votes
3answers
3k views

Will the transaction log shrink automagically in SQL Server?

When SQL Server database in a SIMPLE mode, you don't have to care about the transaction log bakcups. But in a SIMPLE mode, the transaction log seems to grow as it does in FULL mode. Does is truncate ...
1
vote
1answer
859 views

SQL Server User mapping vanished

SQL Server 2008 web edition x64 I'm opening: (connection)/Security/Logins/John. Select "User Mapping'. On right pane is marked checkbox at DB1 line. I turn on checkbox at DB2 line, correct username ...
1
vote
1answer
342 views

Fail to connect to server

I am getting this error when attempting to connect to a SQL Server 2008 R2 machine: Cannot connect to JUPITER. A network-related or instance-specific error occurred while establishing a ...
6
votes
2answers
222 views

SQL Server Internal Inconsistency on GROUP BY

I recently recovered a database from a hard-drive failure using DBCC CHECKDB WITH REPAIR ALOW DATA LOSS. Now I can select records from a table-valued function to retrieve sales records, but using a ...
5
votes
1answer
276 views

Where is the information about what files each database stored for SQL Server 2008 R2

I need to find where SQL Server 2008 R2 stores what files back each database. The kicker is that the server has completely crashed (hardware failure). I've managed to recover all the .mdf/.ldf files. ...
1
vote
2answers
43 views

Trying to better understand how SELECT rights are managed in a/my SQL Server db

Sorry, I'm a security noob: I've been asked to provide write a script that grants our users that belong to some yet unidentified domain group SELECT access to a table called "NewTable1." To identify ...
9
votes
2answers
3k views

Why can't I read Oracles CLOB columns via SQL-SERVER 2008 linked server?

I want to access data in an Oracle 11g database from SQL-Server 2008 I set up a linked server and when I execute select * from [Link_server_name]..Oracle_schema.Oracle_table and Oracle_table ...
4
votes
2answers
2k views

Read-only copy of SQL Server database

We have main database, through out day we insert/update this DB through main application(windows). We have another web application which is suppose to just display content from main DB but instead we ...
5
votes
3answers
866 views

Is there an easy way to trigger automatic failover of a single mirrored database?

I have 3 mirrored databases on a single instance of sqlserver2008-R2 in a high safety with automatic failover config. Is there a way to trigger automatic failover of just 1 database? I want to ...
7
votes
4answers
14k views

Replicating a remote MySQL database to MS SQL Server 2008

I want to replicate the contents of a MySQL database to a MS SQL Server 2008 database. Is this possible? Can anyone outline the steps required in order to achieve this? Thanks.
0
votes
1answer
3k views

INSERT INTO remote table on different server with OUTPUT clause gives error

I have a procedure which makes one or two inserts into a remote table. To accomplish the second insert, I need to know the recently inserted Id of the first insert. To make this work my insert clause ...
8
votes
2answers
1k views

SQL Agent powershell context reference

At my new job, we have multiple named instances on each servers. Server1\Dev Server1\DevIntegrated Server1\QA I have a SQL PowerShell script in the works that calls out to the OS, invokes ...
2
votes
4answers
4k views

SQL Server: cold backup, shutting down services?

One of our collagues told me that they are doing "cold" backups for SQL Server so that they are shutting down services and then taking a backup somehow. I think this is all wrong! Am I right? I think ...
2
votes
1answer
2k views

SQL Server 2000 to SQL Server 2008 linked server issue

Here's my scenario: I've got a linked server going from a SQL Server 2000 machine to a SQL Server 2008 machine. To aid in moving databases with a minimum of config changes, most of our connections ...
0
votes
0answers
121 views

how do i bulk copy a huge amount of data and keep the same table updated through stored procedure in SQL SERVER [duplicate]

Possible Duplicate: How to move data from big table In my project i need to fetch datas from different tables in a data base and create a new table with the same colmn names for all those ...
7
votes
2answers
191 views

Meeting with DBAs regarding server upgrade project - Common concerns

I'm more of a network/windows admin and I've been tasked with overseeing a SQL server upgrade project. I need to meet with the DBAs and discuss their needs / wants regarding the upgrade. I don't want ...
4
votes
2answers
413 views

Best way to design this mileage table?

I will be populating a Miles Per Gallon (MPG) table. It's coming from an odometer source. It's currently set up as so: id (primary_key) , truck_num , start_date , end_date , ...
1
vote
2answers
1k views

Does shrinking a SQL Server transaction log remove transactions from the log?

I know shrinking the log is counter-indicated and has been covered many times, but I just encountered the following, baffling scenario: We had a run-away query attempt to delete so many records that ...
0
votes
2answers
732 views

remote database connection issue

is it possible to connect ASP website which is on web server to connect to SQL server 2008 database which is on another database machine? In my case the database machine has windows XP SP1 installed ...
0
votes
2answers
385 views

How do I record SQL transactions with SQL Server Express

With a test migration from 2000 to 2008R2 Express, one function from the client application fails silently. I'd like to find out what SQL is running and why it fails. I think I would have attacked ...