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

learn more… | top users | synonyms (1)

1
vote
0answers
137 views

How do I analyse DBCC Showcontig of a table? [closed]

Can somebody help me how to analyse the DBCC SHOWCONTIG output for a table. Before: Table: 'table1' (795); index ID: 0, database ID: 7 TABLE level scan performed. - Pages ...
0
votes
1answer
117 views

UPDATE not working properly with linked server

Please see a question I asked here earlier: http://stackoverflow.com/questions/24324823/update-not-working-properly-with-linked-server Dommer suggested using OPENQUERY and this does appear to resolve ...
0
votes
0answers
19 views

Check if any user uses a database? [duplicate]

I'm going to drop a database. I want to monitor if any user is still using the database for a couple of months. Besides profiler, is there a better way to monitoring activities on a database?
1
vote
2answers
52 views

Making a Database Online [closed]

I am so confused with this issue, I have vb.net application and it has a sql database . Now, I want this application to access the sql server from anywhere , because there are many clients sharing ...
1
vote
0answers
64 views

Stored procedure taking much longer than query [closed]

I have a simple code segment that runs in about 1 second when run alone, but more than 5 minutes when deployed as a stored procedure. I'm using sql server 2008. Unfortunately, I can't post the code ...
1
vote
2answers
166 views

Proper Shutdown of SQL Servers in a Cluster

I was just wondering what the best approach should be for shutting down an Active/Active Cluster where both nodes need to be shutdown for disk maintenance. I was thinking of this process: Open ...
1
vote
2answers
67 views

How to get the first or last row in ordered result set, depending by column value?

I have the follwoing result set from the table PUNCHREPORT EMPLID Name PUNCHDATE PUNCHTIME DEVICETYPE .................................................................. 70 ...
0
votes
0answers
22 views

Reducing log files? [duplicate]

I have a database that has a log file of nearly 80 GB. Database size 180 GB. The recovery is set to Full. What is the correct way to shrink the log file without using the shrink option in SSMS as ...
4
votes
1answer
129 views

Table Data Space Used Confusion

I have a heap table with around 700k rows. The rowsize is 34 bytes: (1x BIGINT, 2x SMALLINT, 2x BIT, 4X INT, 1x SMALLDATETIME). Why does Data Space Used say this table is taking up nearly 4000000KB ...
2
votes
2answers
92 views

What does Reinitialize All Subscriptions actually do to the databases

I tried to find the answer and came across these MSDN pages but they don't actually explain what happens really: http://msdn.microsoft.com/en-us/library/ms152771.aspx ...
0
votes
2answers
482 views

Joining tables with one to many relationship

Hi I have a service ticketing system database (SQL Server 2008) which i want to get the hour elapsed for the tickets. One table contained the Ticket number and the created date/time while the other ...
2
votes
0answers
41 views

Constrain referenced rows to two different tables to belong to the same row in another table

Apologies for the potentially confusing question title. I struggled to make it generic! I am designing a wildlife recording database. An observer goes to a site and records the occurences of species ...
-1
votes
1answer
89 views

combining two CTE in a single query

Here i have two CTE and i need to select values from these two CTE as a single query. I can able to select values from a single CTE at a time but i dont know like how to merge these two CTE and select ...
1
vote
0answers
46 views

Why is one of these queries orders of magnitude slower than the other?

Sorry for the vague headline question. Essentially, and I know this is generally terrible practice, but I have query with nested subqueries as follows: SELECT * FROM ibt1 WHERE basetype = 60 ...
0
votes
3answers
152 views

Is it possible to have the transaction log file write to a disk on a remote machine?

For the SQL server transaction log file, it is possible to set its target file to a disk on a remote machine? I am working on a BI project. In its current iteration, when the data warehouse ...
0
votes
1answer
161 views

getting error incorrect syntax near @certificate

I have created a certificate and now I want to remove certificate signature and drop the certificate. When I supply the certificate name directly it is working but when I'm making use of local ...
0
votes
1answer
61 views

SQL Server : slowness / CPU issues [closed]

We have a SQL Server with about 15 databases and about 60 + users accessing any of these databases. Each database is designed to serve different data set (meaning - we have multiple roles in each ...
0
votes
1answer
126 views

How to get the nTH row in ordered result set?

I have the follwoing result set from the table PUNCHREPORT EMPLID Name PUNCHDATE PUNCHTIME DEVICETYPE .................................................................. 70 ...
0
votes
0answers
104 views

SQL Server : delete user to make it “dbo”

I want to set one of the Active Directory users I have in my database as the owner of the database. But I know this user is used on many scripts and Excel pivot tables. Now if I delete the user from ...
0
votes
1answer
171 views

How to restore Network backup to Network Path in SQL Server 2005?

I am trying to restore network backup file to network path.. is there any way to do it? I am using SQL Server 2005 and code.... RESTORE DATABASE DB_NAme FROM DISK = ...
0
votes
2answers
41 views

SQL Server Management Studio is not available

When I installed SQLManagementStudio_x64_ENU.exe I am not able to connect to my server. In the image (1) session, I am not getting server name. Also in (2) session also I am not getting it. Is there ...
1
vote
2answers
54 views

SQL Server Backup and Query Execution

Is SQL Server Backup affects the query execution performance? Is there an effect while running the SQL Server backup in remote query execution? Thanks.
0
votes
2answers
446 views

Error while taking backup in SQL Server

Before few month box of SQL has been crashed. We have almost database back with some tools and running application smoothly on it. But when i try to take backup of database at that time it gives error ...
2
votes
1answer
370 views

Database deployment script for SQL Server 2008 has different behaviors

Using Visual Studio 2008, I have compared schemas between remote SQL Server database with scripts hosted in a TFS server. The goal was to generate a migration script that would update the remote ...
1
vote
0answers
606 views

Possible schema corruption. Run DBCC CHECKCATALOG

Good Evening to all. I was working with sql server 2008. Thing i did: Actually i was noticed that the free space available in C drive reaches below 1 GB .So i thought to Club the D drive with C ...
-4
votes
1answer
29 views

Data type in SQL Server 2008 [closed]

If I want to store both values in single variable means in 'days' variable, it should accept 1 day as well 1.5 days. In this case which data type i should use in sql server 2008? Thanks in ...
0
votes
3answers
114 views

How to improve this query performance by indexing properly?

I have following select query, and I need to improve the performance of this query. Can anyone suggest me how to convert the clustered index scan to index seek? DECLARE @now DateTime; DECLARE ...
4
votes
1answer
225 views

How to restore symmetric key on the new database?

I have an issue with symmetric key restoring on the another database. I have table in the first(old) database with encrypted column.(The table contains encrypted data) The key in the old database has ...
3
votes
1answer
120 views

Why isn't my new index/table being created on the filegroup I specify?

Results from @@Version Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (X64) Sep 21 2011 22:45:45 Copyright (c) 1988-2008 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 ...
2
votes
1answer
154 views

How to improve this queries performance by indexing properly?

Hi here i have a query and i need to improve the performance of this query.Can anyone suggest me like how to convert the clustered index scan to index seek. DECLARE @now DateTime; DECLARE ...
2
votes
0answers
56 views

Network and memory waits after massive ALTER

We had to do a massive ALTER to our DB, changing one central table's PK to BIGINT due to approaching ID's generated in the 2 billion range. Due to this, several hundred referencing keys and indexes ...
5
votes
2answers
421 views

Performance hit of CONVERT from nvarchar to money (SQL Server)

I have a dollar amount value, that for historical reasons has always just been stored in an nvarchar field. Now that we are storing many more rows than we have in the past, and are using this field to ...
1
vote
1answer
415 views

Using ODBC Connection to Access Firebird Database

I have an ODBC connection to a Firebird database that tests successfully. Is there a way to use this ODBC connection within SQL Server 2008 R2 to access the tables? I haven't used Linked Servers ...
0
votes
0answers
34 views

How to view contents of .sdf file?

I want to view contents of .sdf file but im not able to open the file, is there any way to open thi file and see its contents, could anyone please help on this?
1
vote
1answer
130 views

After Restore Log_reuse_wait_desc of Replication

I'm wondering if anybody has ran into this issue before and has any suggestions on what's causing it/how to fix it. We are restoring a database into lower Dev environments and after the restore the ...
0
votes
0answers
78 views

Transactional Replication

SQL server 2008 R2. I have set up transactional replication on 40 tables in a database (other tables don't replicate). There was an issue in the morning and it is fixed now. I resynchronised the ...
2
votes
2answers
110 views

Need help performance tuning a query

Basically, here is the design of the table (the part that is necessary): id | dt -------- 1 | 2014-05-13 2 | 1900-01-01 3 | 1900-01-01 4 | 2014-05-12 5 | 1900-01-01 So what I am trying to do ...
0
votes
0answers
19 views

SQL Server 2008 database is not coming online after restore.. Pleae need help asap

I have restored a 1TB database and now it shows the restore completed 100% but the database is not accessible. sp_who2 has a SPID 50 performing this restore but current command its showing is ...
2
votes
1answer
786 views

Using OPENQUERY to execute a script

I have a SQL Server 2008 instance which I want to use to import data from an Oracle server. I have set up a linked server that works correctly when running simple queries like SELECT * FROM table. ...
0
votes
0answers
106 views

Login failed for a user in a Domain Local Group

I have recently been considering moving from using SQL Logins in my applications, to a model using Windows Authentication using Active Directory groups My intention is to allow users access to ...
2
votes
1answer
97 views

Select query - group by and sub group by

CREATE TABLE [dbo].[temptable] ( [Id] INT NOT NULL PRIMARY KEY IDENTITY, [uid] INT NOT NULL, [pid] INT NOT NULL, [event] INT NOT NULL, [timeStamp] DateTime NOT NULL ) I want ...
1
vote
1answer
46 views

Order of output row in random order [duplicate]

When I do select query on single table then I get output rows ordered by primary key which is perfect, following query: select * from recondata where importid=131; but when I'm joining this table ...
0
votes
0answers
68 views

Transaction log backups during index maintenance

We have a database with large and complex files and fragmented indexes. The environment is SQL 2008 Full recovery model and Mirrored which limits me to reorganizing. The backup strategy is Full ...
-2
votes
1answer
199 views

How to create a user via GUI in SQL server 2008 R2 with read only access on specific databases? [closed]

I am a newbie in SQL server 2008 and slowly learning it. Today I got a task of creating a user with read only access for a specific database in a server. So what should I specify under the tab- ...
2
votes
0answers
20 views

enable database to work with Snapshot Isolation [closed]

I can't enable snapshot isolation ALTER DATABASE mydb SET READ_COMMITTED_SNAPSHOT ON; ALTER DATABASE mydb SET ALLOW_SNAPSHOT_ISOLATION ON; query still 0 rows working 5 days and nothing ...
-5
votes
1answer
783 views

How to clone a user in SQL Server 2008 R2?

I am a newbie in MS SQL Server, and just got assigned a new task to clone 5 users from an existing user in a Database. Could anyone help me? P.S.: It would be great if the step or method is in GUI. ...
3
votes
1answer
46 views

Safe to start Mirroring on Production Server?

We have a 350 Gig DB on SQL Server 2008. We intend to backup and restore it then immediately start mirroring. Is starting a mirror a dangerous operation to do on a production database ? Can I expect ...
1
vote
0answers
86 views

How to copy a subset of SQL objects across databases within a transaction?

We already have a .dtsx package to copy a subset of tables (about 20) from one database to another (at least once in every month). It is using "Transfer SQL Server Objects Task". However this does not ...
0
votes
1answer
90 views

SQL Server monthly Backup

Im pretty new to SQL and some employee asked me if is possible to make monthly database backups. We do daily full backups to NAS server via cobian and we use SQL Server Management Studio to make ...
0
votes
1answer
654 views

How to set variables to multiple values (that are integers)?

I have 5 facilities in my division, but the code below in a stored procedure only pulls documents when the "facilityID = 4" unless if I change it manually to represent other ID numbers. So I need the ...