0
votes
1answer
19 views

Issues with procedures, setting multiple values

I am trying to set multiple values but I am only able to set one value. This code fails: alter procedure modifyvalue @ID int, @flight varchar(6), @destination char(10) as begin update ...
0
votes
0answers
60 views

Stored Procedure's Commented line causing issues [closed]

We have a stored procedure which works as the sample mentioned below: CREATE PROCEDURE [dbo].[sdp_Test_Update] ( @ID int OUTPUT, @File_ID int, ...
1
vote
1answer
43 views

Cursors and concurrent users

I typically avoid cursor operations like the plaque, however, I have come across my first problem where using a cursor outperforms a query. So I am forced to use it. I have created an elaborate ...
1
vote
0answers
53 views

A query that does a lot of reads, but plan is OK [migrated]

I´m experiencing a strange behaviour in a specific query in the SQL Server 2008 R2. I´ve got a query that does 19 million reads and is very time-consuming and when I try to check its cached plan, the ...
-4
votes
1answer
36 views

How to run mssql server dependent application to mysql workbench [closed]

I am very new in mysql workbench. I have created an application in c# which uses sql server 2008 r2 database. Now i have migrated my database on mysql workbench. i want to run my application now. My ...
0
votes
0answers
28 views

Sql Server Agent Job

In my Local SQL Server 2008 I created a scheduled job (like daily email will send to particular user from the database based on condition). Now I decided to host my schedules in hosting server so can ...
0
votes
3answers
71 views

How to display posted on date and time like1 hr ago or 30 min ago

i want to show the posted date like 1 hr ago.. or 30 min ago.. declare @date datetime ='2014-07-24 11:50:22.033'; SELECT CASE WHEN DATEPART(DD,@date)=DATEPART(DD,GETDATE()) THEN CASE WHEN ...
0
votes
2answers
60 views

How to provision the SQL Server Agent service after SQL Server Edition upgrade

I have upgraded SQL Server 2008 R2 Express to SQL Server Standard Edition. After I have upgraded it, the SQL Server Agent was stopped. I have tried to start but it fails. Only when I have changed ...
2
votes
2answers
142 views

Table with 4 million records - different size and performance in development and production

At my company we use SQL Express 2008 R2, which supports databases up to 10GB. We have 2 databases with almost the same number of rows in all tables. But, one of them is 4.5 GB in size (which is in ...
0
votes
2answers
63 views

Are #tables and #procedures 'not best practice' or 'bad practice'?

I am working on a project and part of it is an interface tool that executes SQL code stored in a xml file to import/export files. In the file, temp procedures and temp tables are used quite heavily ...
-2
votes
1answer
66 views

Using the “Select Top (100) percent vs. Select * , or selecting any column” [closed]

I wrote the first query below that I was hopeing to give me the exact same results that the 2nd query does, but it seems there is one recrod different: SELECT DocumentSourceName FROM ...
4
votes
3answers
146 views

Virtual Log Files (VLFs) Fragmentation

I have a database with 160 VLFs. How do I determine whether the VLFs are fragmented? Further, how do I find the percentage of fragmentation? Another thing that I want to confirm: Are the following ...
0
votes
3answers
140 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
75 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
2answers
29 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 ...
2
votes
1answer
232 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 ...
0
votes
0answers
63 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 ...
1
vote
0answers
58 views

What SQL Server Edition to use [closed]

I am a programmer and I have been asked to identify a Sql Server Edition suitable for our intranet web site. There will be 15 users connecting to web site. But we use one windows account to connect ...
2
votes
0answers
109 views

send custom email when SQL Server job fails

I have setup a profile and account for sending mail using DatabaseMail. I have a SQL JOB. If the job fails, I receive an Email Till this point, everything works fine. This is what the email looks ...
0
votes
1answer
45 views

Rebuild Index in system database

I use SQL Server and have multiple indexes in system database whit index fragmentation 30% or more. I don't know that SQL server manage system database index automatically or I want to manage them. ...
0
votes
1answer
1k views

How to convert sql server table data into MS Access(.mdb) file

I have SQL Database table with 6664055 rows, I want to convert this SQL Server table data to MS Access format(.MDB), How Can I do this?
6
votes
1answer
428 views

Free space of mdf and ldf does not match with database free space

In SSMS I saw file size related properties and found below details for one database. Here values does not match with other properties. Here size of the mdf, ldf and total size matches with other ...
3
votes
1answer
562 views

sql server service broker queue pass parameter to stored procedure

Stored Procedure Create PROCEDURE [dbo].[InitServiceLog] ( @name varchar(max)=null ) AS BEGIN SET NOCOUNT ON; insert into [AdventureWorks].[dbo].[ServiceBroker_Log](Service) ...
1
vote
1answer
342 views

Does MAXDOP affect the number of tempdb data files I should create?

From what I have read, best practices for configuring tempdb includes creating multiple data files. The rule of thumb as I understand it is if you should create the same number of data files as you ...
2
votes
2answers
255 views

Scripting all of available databases to .sql files containing schema+data+users with single command

I have a SQL 2008 Express with 80 databases in it. I want to move these databases completely to another server which is hosting a SQL 2008R2 Enterprise instance. As i'm told it is better to script ...
2
votes
1answer
70 views

Database Design guidance required

I have scenario where there is Table T with columns PK,A, B, C,D TABLE t ( PK, A, B, C, D ) i have to insert data from different sources ie columns A,B,C,D are calculated separately.. and they same ...
0
votes
2answers
14 views

One of the Database Ownerhas been Removed and corresponding property changes in sql server

A database has been created on SQL 2008 by a user named user1 ,on dec 2013.Today ,we are going to remove that user(/owner) from the server.What will be the owner property of the database show then?
0
votes
3answers
777 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 ...
0
votes
0answers
134 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 ...
0
votes
1answer
508 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 ...
1
vote
1answer
157 views

Can geography datatype Lat/Long properties be returned using a view in SQL Server 2008?

Hopefully the question is fairly self-explanatory. I've been ferreting through the, what appears to be quite minimal/poor microsoft documentation regarding both views and geography datatypes in the ...
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 ...
2
votes
2answers
584 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 ...
1
vote
1answer
77 views

Server audit with more than 1.000 entries

On my Mssql 2008r2 I created a server audit for all login and logout: USE MASTER GO CREATE SERVER AUDIT audit_test TO FILE (FILEPATH = 'D:\Audit') GO ...
2
votes
1answer
1k views

SQL Server : keep track of all connections/disconnections

I have a Microsoft SQL Server 2008r2 SP1. I need to know which users connect to, and disconnect from, database. Ideally, I would like a list of (datetime, username, connect/disconnect). Can this be ...
1
vote
1answer
329 views

SSIS FTP Sending Blank Files

I'm supporting an existing data interface that is a series of SSIS packages (SQL 2008 R2) for sending and receiving data with a third party. The communication is being done through FTP, and it uses a ...
3
votes
1answer
133 views

SQL Server: Can Page Verify be set to Checksum on any database, or must I check compatibility?

In Microsoft SQL Server, I have some older databases set to "Torn Page Detection" rather than "Checksum" page verify. Do I need to determine if a given SQL Server database is 'compatible' with the ...
2
votes
1answer
126 views

Logging errors with extended events excluding some users

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, ...
0
votes
1answer
134 views

In Extended Events what is the difference between rpc_completed and sql_batch_completed? [duplicate]

I understand that rpc_completed is defined as the completion of a remote procedure call and sql_batch_completed is the completion of a t-sql batch. However can anyone explain in concrete terms what ...
1
vote
1answer
122 views

How to find what prevented in getting a lock?

Sometimes my update statements fail after 3000 milliseconds with 'Lock request time out period exceeded' error. That 3000 limit is coming from my application through SET LOCK_TIMEOUT 3000 setting, ...
1
vote
4answers
708 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 ...
6
votes
2answers
751 views

Slow SQL Server Database (approx 2TB) - high CPU due to index fragmentation?

I've posted this over at ServerFault but didn't have much luck getting a response. I have a fairly large SQL Server database (~2TB). Most of the data is in one table (~6 billion rows). Two weeks ago ...
0
votes
1answer
470 views

Query with PIVOT fails with second LEFT OUTER JOIN to same table

I have a big query that contains a PIVOT and several LEFT OUTER JOINS. I need to add a second LEFT OUTER JOIN to a table that is already joined in the query. When I do this the query errors and I'm ...
9
votes
1answer
648 views

If a transaction is “committed” , is it then saved for sure?

If a transaction is committed successfully, can I then be 100% sure that it has been written to the database AND to the log files? Can I be sure that the data is SAVED ? Today our log files had ...
0
votes
2answers
575 views

Updating an indexed column performance impact in SQL server

I am trying to understand is there any performance impact if I am trying to update a column which is the key column of a non-clustered index in SQL server 2008? For e,g I have a column IsActive in ...
0
votes
1answer
348 views

Easy replication for SQL Server: Can it be set up like mongodb or Oracle?

This might look like a noob question... but it isn't. (I have 18 years of SQL Server experience, and three years of MongoDB experience.) The basic scenario is: -- Data Center has big, primary SQL ...
2
votes
2answers
140 views

Create Login command error [closed]

What is wrong here in following screen shot? I am trying solutions posted here and here to add a login
2
votes
3answers
590 views

SQL Server 2008R2 Database refresh in isolated environment

I would greatly appreciate your help on my database "refresh" issue. The scenario: I have 12 databases on a QA server that were restored there from a Production server approx. 2 years ago. Now QAs ...
2
votes
3answers
615 views

Is there any time where we should avoid cascading delete?

In SQL Server 2008, there is a Primary table which is linked to three other child tables by 1 to many relationship. So, we are thinking of using Cascading delete in the primary table, so that all the ...
3
votes
2answers
234 views

Truncated copy of a DB for a developer

I have an access to a DB (SQL Server 2008 R2). The size of the DB is about 40GB. I am a developer and I'd like to have a local copy of that DB to be able to work offline. Is there an easy way to get ...