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

learn more… | top users | synonyms (1)

0
votes
1answer
99 views

Help with Transferring Linked Server to another server?

Please advice me as I'm trying to move the linked server (Providers with the tables in Catalogs) from SQL server 2005 to another upgraded sqlserver 2008, I scripted out everything from there, but not ...
0
votes
0answers
66 views

Detecting changes in a table without enabling CDC [closed]

We are doing a transaction based on a weekly basis, where the first transaction is recorded on 1-Jan-14 in the table a. Subsequently, the second transaction that was done on 8-Jan-14 also got ...
4
votes
1answer
265 views

Move values from one table to another one via stored procedure in sql server 2008

I have two tables Login (userid, username, password) audit_login (userid, Transaction_Date, Status (success or failed) Now I want create a stored procedure in which, if anyone wants to login then ...
1
vote
4answers
7k views

How to create and send mail in SQL Server 2008?

I want to send E-mail from SQL Server 2008. What are the basic steps for that? Can you explain me if someone used this facility. Any help will appreciated. this link will helpful as commented by ...
2
votes
2answers
90 views

Similar Products with bitwise

I have the following tables. So one product can have one category, one category can have n genres.(Products-> Genre Column data 6 ( 2 + 4), 132 (128 + 4) like that). So my question is; i want to ...
2
votes
3answers
225 views

How to validate and upgrade my knowledge of SQL Server with MCSA

My story is that I am working now almost 10 years as an administrator, I deal with SQL Server and other IT stuff, most of my knowledge is self taught by reading books, dealings with problems and ...
1
vote
4answers
319 views

SQL Server Page Life Expectancy sharp drop

I'm trying to put my hands on the reason this SQL Server slows down sporadically. There are no patterns detected so far. It's a SQL Server 2008 R2 running on a Windows Server 2008R2 VM on top of ...
4
votes
1answer
69 views

Error statement is not logged, only *password-— with many dashes

I use extended events to store database errors, like this: CREATE EVENT SESSION [ErrorCapture] ON SERVER ADD EVENT sqlserver.error_reported ( ACTION ( sqlserver.client_hostname, ...
2
votes
3answers
9k views

How to drop multiple tables with common prefix in one query?

I'm using Microsoft SQL Server 2008.My question is:How to drop multiple tables with common prefix in one query? something like that table names: LG_001_01_STLINE, LG_001_02_STFICHE
2
votes
1answer
436 views

SQL server agent job built on SSIS package not working

I transferred a job from the old SQL Server 2005 to an upgraded SQL Server 2008 R2 instance, and I scripted out everything, changed the data source and other details... "This job should copy some ...
2
votes
3answers
183 views

how to dump MS-SQL DB using PHP with MS-SQL-SRV.? [closed]

I had created a MySQL database dump in php successfully using this below code. $dbuser='root'; $dbname='Student'; $dbtable='StudentDetails'; $dbhost='localhost'; $dbpass='root'; ...
22
votes
5answers
14k views

How do I shrink all files quickly for all databases?

In SQL Server (2008 in this case) how can I quickly shrink all the files, both log and data, for all databases on an instance? I could go through SSMS and right click each and choose Tasks -> Shrink, ...
25
votes
5answers
4k views

Why is there still a varchar data type?

Many of my databases have fields defined as varchars. This hasn't been much of problem since I live and work in America (where the only language that exists is "American". ahem) After working with ...
0
votes
2answers
148 views

How to build a database that contain only the delta from yesterday

I need to know what has been changed on my database since last night. Is it possible to extract this data from the LDF file and to build a new Database that contains the delta? For example, let say I ...
5
votes
1answer
298 views

What are the possible causes for sp_reset_connection taking a long time to execute?

Why would the sp_reset_connection system stored procedure be taking longer than a few milliseconds to execute, as viewed through SQL Server Profiler? I took a simple trace from a production system ...
0
votes
0answers
54 views

SQL Server grouping and merging rows in new columns

I have the following question i would appriciates your kind assistant to get the output mentioned below: I need to get new report that has the following data : Passengers traveling together in the ...
5
votes
2answers
122 views

Any relation between SQL Server Service Name and Instance Name?

My SQL Server's instance name is SQLEXPRESS and SQL Server Service Name looks like MSSQL$SQLEXPRESS. Is there any relation between instance name and service name? I'm trying to check SQL Server ...
1
vote
1answer
169 views

How to pass a table of values to a stored procedure from SSIS?

I am really new to SSIS, so I apologize for the "dumb" question. I know open ended "Best Practices" questions are seriously frowned upon, so I will try to be as specific as I can. I have a basic SSIS ...
0
votes
0answers
25 views

Indexing and Deadlock in SQL Server 2008? [duplicate]

I am running into a deadlock in SQL Server 2008. Using profiler I was able to determine that the deadlock happens as I am trying to select and update row(s) in table in 2 different sessions. The ...
3
votes
2answers
561 views

Can I delegate SQL Agent rights without granting sysadmin rights?

I'd like to give a user the ability to administer SQL Agent jobs. According to the doc page, I can do this by granting the "appropriate" roles on msdb. I've granted all three SQLAgent% roles, but ...
0
votes
1answer
119 views

How to restrict SQL server profiler to show my symmetric key password while executing query from C# code?

I used symmetric encryption to encrypt sensitive data in my application. I don't want anyone see my password for decrypting the data. But system admin can able to see symmetric password in SQL Server ...
0
votes
0answers
85 views

SQL Server 2008 R2 replication server runs faster than primary

I run a simple query like select * from table and i take the following results: primary database : 90 seconds replication database : 2 seconds The tables are identical and have the same indexes in ...
2
votes
0answers
67 views

Collect information about currently running queries only when client timeout occurs

We would like to be able to collect information about all currently running queries when (and only when) a client timeout occurs in SQL Server 2008. I know I can collect information about the client ...
0
votes
3answers
252 views

Microsoft SQL Server does not start

I have problem with start SQL Server 2008. I needed copy database from one computer to seced. I copy only catalog DATA from my actually working server and past this catalog to my new fresh installed ...
2
votes
1answer
182 views

Deploy SQL Server Backup Maintenance Plan in multi-tenant environment

We have a multi-tenant environment in which I've been trying to deploy a standardised maintenance plan across all servers. I've been running into issues importing the maintenance plan properly, as ...
9
votes
3answers
1k views

Snapshot Replication Retention

I've got Snapshot replication set up on my SQL Server 2008 production server, and I just noticed that there are snapshots ranging back to a year ago in the snapshot folder. How can I change the ...
0
votes
1answer
96 views

Sql Server Fix Users

I Create a user in my database with following command : CREATE USER Test WITHOUT LOGIN I created a login with the Test Name. I want to link Test user with Test Login. When I use following command ...
5
votes
1answer
1k views

Changing ANSI_NULLS setting on a table

Can we use the following query to update ANSI_NULLS option. sp_configure 'allow updates', 1 reconfigure with override update sysobjects set status = status | 0x20000000 where name = 'tblClient' ...
1
vote
1answer
2k views

database 'msdb' cannot be opened. it has been marked suspect by recovery 2008 error code 926

I m using SQL server 2008, i got suddenly today an error while i was accessing database from visual studio the error is database 'msdb' cannot be opened. it has been marked suspect by recovery 2008 ...
2
votes
1answer
5k views

TempDB data files don't shrink well on SQL 2008

So ideally you want to pre-size your TempDB data and log files appropriately so that this isn't a concern, but sometimes a rogue developer runs a crazy huge query on a production server during work ...
-1
votes
1answer
80 views

Difference between Clustered Index and Unique Clustered Index? [closed]

I got difference between clustered index and unique index here. But what is the exact difference between clustered index and unique-clustered index? AFAIK creating clustered index can be done for a ...
2
votes
4answers
412 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 ...
6
votes
1answer
166 views

SQL Server 2008R2 minimum RAID/Disk config

I want to take advantage of the great price/performance offered by the new Intel E5-2620 (v2) machines being offered by some dedicated server webhosts. Unfortunately most of these E5-2620v2 dedicated ...
1
vote
1answer
142 views

can I Run a Stored Procedure across all SQL servers and return 1 html report

I have the following set up as a sp and it runs daily. It gives me a report for each SQL cluster in my environment but what I'd like to do is configure it to run across all clusters and return 1 ...
3
votes
0answers
45 views

Any checklist/guide when transferring a database to a new server? [duplicate]

I'm looking for steps that I need to follow to transfer a database to a new server. So far I have: I restored the current database that I have in SQL Server 2005 instance to another SQL Server ...
5
votes
1answer
108 views

What is the limit on the number of INSERT statements you can paste into SSMS and run?

I am currently creating a stored procedure that populates a table with a list of insert statements so that my DBAs can export the contents of the table to a text file and then paste the statements ...
1
vote
1answer
35 views

Moving large database to another drive, how to measure performance before, and setup some type of replication for fast fail back?

Sorry if this is kind of more than question at a time, but here goes. Running SQL Server 2008 on windows server 2008 as well. We have a large database just over 200gb right now (it holds images of ...
0
votes
1answer
147 views

Restoring to specific point in time in SQL Server

EDIT: The problem turned out to be that while backups are made every night, I was trying to restore to a point in time that had not yet been backed up. I would have realized this sooner if I were ...
2
votes
1answer
74 views

Understanding SQL Server plan cache

I've been reading about the SQL Server plan cache and optimizing for adhoc workloads, etc. I'm fairly new to the topic and have a few general questions to help paint a better picture: Suppose I have ...
1
vote
0answers
61 views

What to look for in query execution plans? [closed]

Assuming the query execution is slow, I have collected the xml plan. What should I look for in the actual execution plan. What are the top 10 things I need to watch out for? I know this is a broad ...
0
votes
1answer
219 views

How to grant permission for creating,reading and executing symmetric key in sql server 2008

We have user associated to a schema with limited privileges.During run time we are generating symmetric key using same user log-in.since the user has limited privilege, we are not able to create key ...
4
votes
4answers
1k views

Atrocious performance joining INSERTED and DELETED tables in a trigger

I've got an UPDATE trigger on a table that watches for a specific column changing from one specific value to any other value. When this happens, it updates some related data in another table via a ...
1
vote
2answers
176 views

How can I change the number of @schedule_uid=N'????' to re-create a SQL Server Agent Job?

I have a SQL Server 2005 job in the SQL-Server Agent Jobs that I need to move/transfer to another updated SQL Server 2008 R2 instance. I was able to script it out and then use it as a new query window ...
2
votes
1answer
374 views

PIVOT SQL Server

SQL Server 2008 R2 PIVOT IO Stats I have a script that collects IO stats from sys.dm_io_virtual_file_stats once a day and stocks them in a table. I want to be able to use these stats to generate ...
0
votes
0answers
27 views

SQL SERVER - Improve Performance -Update query with OR in WHERE [duplicate]

How do we improve this Update query Performance as currently it is taking 1 Minute to update 17643 Rows. Query -> Declare @date datetime = '09-Dec-2013' update #tmp_sp_abc set ...
3
votes
2answers
106 views

Alert doesn't work?

I've created an alert for long run queries. However, the history is always empty even I set the value to 1(second). The following is the generated script. Is there anything wrong? /****** Object: ...
2
votes
1answer
125 views

SQL Server : How to make “Update Statistics” faster?

We have a table with a 1 column Primary Key on and an UNIQUE Non-Clustered Index with 16 columns. This table has more than 20695780 Rows and on every day new records inserted ...
4
votes
2answers
139 views

Minimum memory required for SQL Server and database [closed]

I use SQL Server 2008 R2 Enterprise on my server. The minimum required memory for installing SQL Server is 4GB. I have several databases on my server. How can I determine the minimum required RAM on ...
3
votes
1answer
55 views

Error with restoring from a split .bak file with password

I am trying to restore a backup from a split .bak file[.bak_1/.bak_2/.bak_3]. The backup is password protected. So far this is what I have and I cannot seem to format in a way that does not throw me ...
3
votes
3answers
189 views

How to check for mutiple rows with same data?

Can anyone advise how do I check multiple rows with same data? E.g. I have 2 rows with following values: Cola Colb Colc TYPE_APPLE 123 abc Colb Colb Colc TYPE_APPLE 123 ...