Quantcast
Channel: Forum SQL Server Database Engine
Viewing all 15889 articles
Browse latest View live

How to encrypt database backup

$
0
0

Hi,

We are sending database backup to vendor for troubleshooting. Vendor have secure ftp site. We just want to make sure backup file is secure. I want to encrypt database backup. How to do that? or is there any way to send database backup to vendor in secure way?

Thanks


SQL Server 2005 Timeout expired exception

$
0
0

Hi,

I have a program in C# that I used to run on Visual Studio 2000 and SQL Server 2000 without any problem.

Now I upgrade to VS2005 and SQL Server 2005 and get and exception while

insert via SqlCommand.ExecuteNonQuery(). the insert is after many inserts to the same table by that program. the CommandTimeout is set to 600 (in the 2000 version I never had to change the default value of 30 seconds).

the insert is through a connection that is kept open throughout the program for more than 30 minutes

the exception message is:

Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

the trace is:

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

Thanks for your help !

SQL Server 2005 Timeout expired exception error

$
0
0

Hi,

I have a program in VB.net that I used to run on Visual Studio 2008 and SQL Server 2000 without any problem.

Now I upgrade to VS2008 and SQL Server 2005 and get and exception while

insert via SqlCommand.ExecuteNonQuery(). the insert is after many inserts to the same table by that program. the CommandTimeout is set to 120 (in the 2000 version I never had to change the default value).

the exception message is:

"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

Please Help & Thanks in advance...

-- Prasanta

 


Different behaviour of dbcc freeproccache and option (recompile)

$
0
0

Hi all,

I have a parametrized query, which ran 1sec until we changed  MAX DOP from 0 to 1. The change had been recommended by microsoft support due to other issues on this server. The server has 8 cores, 16 with hyperthreading on.

After that, the same query (same parameters, of course) took 33 sec. Ok, seems there is a need to recompile this query, to take the changed parameter into account.  So I issued a dbcc freeproccache to enforce a recompile of the query. Unfortunately, this did not solve the problem, still took 33 sec. Just to be sure, I added an option (recompile) to the original query. Now, the same query, same params ran in 500 msec. When I remove the option (recompile), it again takes 33 sec.

I'm confused about this different behaviour. Why doesn't dbcc freeproccache have the same effect? Why is the query back on bad performance just by removing the option (recompile)?

The effect is only reproducible using a parametrized query, it does not occur when issuing the same query with parameters replaced by constants in SSMS.

Any hints?

Thanks, Birgit


Birgit Straker SCISYS Deutschland GmbH

time-out expired accessing SQL Server 2005 database 64 bit on Windows 2008 R2 Server

$
0
0

Dear experts,

We are experiencing time-out expired in our .NET application accessing SQL Server 2005 database.

I have look around and using SQL Server 2005 Base Practice Analyzer I found critical error like this : "A significant part of sql server process memory has been paged out. This may result in a performance degradation. Duration: 0 seconds. Working set (KB): 41364<c/> committed (KB): 105592<c/> memory utilization: 39%." Actually I am not sure that this error cause the time-out error. Moreover the above error only occures at database startup process.

So far, I have added more datafiles to tempdb to 8 datafiles, because the server has 8 CPUs and applying trace flag T1118.

Other changes are:

- network packet size changed to 8060 (maximum allowed)

- remote query time out, changed to 0 (no time-out, or unlimited?)

- cursor threshold, changed to 500 (result set 500 and higher consider large)

But, the time-outs still happen.

We have several similar installations and this one is actually not the most busy database in terms of data volume or transaction volume, but no other having this problem.

Is it possible that the disk configuration (RAID-5) cause this?

The SQL Server 2005 SP3 64 bit is running on Windows Server 2008 R2 64-bit on 8 CPU machine. Please let me know if you need more information to help me find the root cause.

Thanks in advance.

 

Dapid Candra

Problem with two jobs affiliated with a sql script

$
0
0

Hello --

I am testing a script called dbWarden on our 2008R2 standard server. The URL for the script in question is the following:

http://sourceforge.net/projects/dbwarden/

I have executed the script, and it appears to have successfully completed its installation. There is a database as well as several created the jobs. The problem that I am having is that two of the jobs: dba_CheckFiles and dba_HealthReport fail when they are run. The error message that I am getting in both cases is the following:

Executed as user: NT AUTHORITY\NETWORK SERVICE. Arithmetic overflow error converting expression to data type int.

[SQLSTATE 22003] (Error 8115)  The statement has been terminated. [SQLSTATE 01000] (Error 3621).  The step failed.

Has anyone seen this message, know what it means, and what can be done to correct it?

Thanks.

sharepoint environment issue

$
0
0
I had took backup of the share point and SQ L and restore in different servers but share point is mapping to the old database how can i change it to the new (restored data base). share point and Sql are in different servers.

Recovery model for Datawarehouse databases

$
0
0

Hi 

We are building up a new Datawarehouse environment where there will be lot of of Inserts/Updates/Deletes will be happening. i would like to know what is the recommended recovery model for databases participating in these activities ? If i keep it in Full recovery model, does it effect my performance?

Any help highly appreciatede

-Kevin


Missing Index DMVs suggesting index additions that already exist????

$
0
0

Hi all.

I have a missing index view utilising the views sys.dm_db_missing_index_group_stats, sys.dm_db_missing_index_groups and sys.dm_db_missing_index_details.  I have stumbled across a suggestion from this view which puzzles me.

On my table [task].[task], I have 2 indexes - 1 clustered PK and 1 non clustered index.  The NC index is based on columns TypeID, dtCompleted and dtScheduled.  The index was suggested to me by the missing view above.

Having run the missing index view after applying the NC index listed above, the view is still advising me to apply an index based on the columns already added.  TypeID and dtCompleted are in the EqualityColumns and dtScheduled is in the InEqualityColumns.

To try an remove this suggestion, I have restarted the server to reset all stats within these views - but the suggestion still pops up.

Since I already have an index based on these columns, why is the view advising me to apply an index that's already there?

Thanks in advance.

Sql Server login failure error: 18456 with Windows account and sa account

$
0
0

Hi All,

I am using Win 2008 R2,SQL Server 2008R2

When i try to connect to SQL Server i am getting error 18456.
Previously i have installed Active Directory and immediatly i haved un installed it. After this i am not able log in Database Engine with Windows Aduthenticatino and sa accounts.

For both Windows Authenticatin and sa user i am getting same errors
Message From SSMS:

Cannot connect to SERVER.

Login failed for user 'SERVER\Administrator'. (.Net SqlClient Data Provider)
------------------------------
Server Name: WIN-HAJHN3NCQNP
Error Number: 18456
Severity: 14
State: 1
Line Number: 65536

Message From Event Viewer Applicatino Logs :

-->Login failed for user 'sa'. Reason: An error occurred while evaluating the password. [CLIENT: <local machine>]

-->Login failed for user 'SERVER\Administrator'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine>]

I have tried this

1. Opened SSMS with Run as Administrator.
2. Checked in regedit for login mode-it is '2'-Mixed mode\

I dont know why it is happening.

How can i log in to Sql Server ?

Please suggest me the ways to solve this issue.

Thanks & Regards


MD.Liakath ali

Reducing size of files

$
0
0
We have a database in SQL server 2008 that grew to 2,5GB and we try to make it smaller.
We have deleted unused data and now the actual space is below 1 GB, however the data file is still 2,5GB.

I have tried shrinking the database but nothing changed. Is there any way to make the data file smaller?

Connecting to SQL2000 DB from SQL2008 Linked Server

$
0
0

Hi im trying to Access one Table of SQL 2000 from SQL 2008

for that i have created Linked Server in SQL 2008,

It is showing all the  Catalaogs also,but when im trying to access using the Query it is throwing error.

while configuring i choosed SQL SERVER OPTION Instead of Other Datasoure option.

select top 3 * from [Server].Database.dbo.myTable

and when i manually connect to SQL2000 by providing Credentials im able to access the data.


OLE DB provider "SQLNCLI10" for linked server "xxxxx" returned message "Unspecified error".
OLE DB provider "SQLNCLI10" for linked server "xxxxx" returned message "The stored procedure required to complete this operation

could not be found on the server. Please contact your system administrator."


 

Deadlock captures: "FETCH API_CURSOR..." but not query behind it......

$
0
0

This article shows how to "unmask" the sql query behind a FECTH API_CUSOR

http://www.sqlskills.com/blogs/joe/hunting-down-the-origins-of-fetch-api_cursor-and-sp_cursorfetch/

that is shown in a deadlock graph. But if only applies if one can capture the event while it is ongoing.  Is there a counter in Sql profier (2005) to indicate\capture the query behind the FETCH?  (because most of the time I find out about deadlocks long after the victim spid has been killed.)

TIA,

edm2

P.S.Of course it I captured every sql statement executed on the server that may do it but I'm trying not to overburden the server by collecting excessive info


how to change the default shrink size of logfile?

$
0
0

how to change the default shrink size of log file?

when i go to shrink option its showing am option reorganize pages before releasing unused space. where i can see default size set to 220MB in one of my database. how can i change that size?

Memory / virtual memory problem on Win2K8 server

$
0
0
Greetings everyone !

This kind of trouble and question.
I have Windows 2008 R2 Standard server installed on VM host on
1 vCPU (4 cores), 5120MB vRAM and 600GB vHDD virtual machine.

Server acts as SQL server and takes all the physical memory
(about 4.8GB showed in task manager (screenshot 3)).

I have also enabled virtual memory paging with 7678MB initial
size on the operating system drive (screenshot attached).
Databases are on other logical drive, but in there there is
no paging activated.

The physical memory is full , but I don't think that pagings does work.
I also have conflicting scene (screenshot 2) with OS indicators view
that shows that memory is not used as much as it shows in operating system.

Please assist me with this problem. If any information is insufficient
write it here and I will provide.

Thank you

Need to recover database for past date

$
0
0

Hi,

I had executed some deleted statement on date 04-apr-2013. but i did not take any backup. now i need to recover the same data. Please assist me to delete data.

 


Kapil Kaushish

SQL Agent Job Output File

$
0
0

Hi ALL

are there any option I can add time time at the output log file, then different file name can be created when the job run.

Page size, block size and network packet size

$
0
0

Hello,

Does anyone have any links to documentation regarding the relationship between SQL Server page size, network packet size and storage block size.

I know that SQL works with 8KB pages, does having a block size og 64KB affect how SQL can read/write data?

How does the network packet size affect read/writes to/from disk?

Any advice would be most appreciated.

Andrew

sql server 2008r2 cup utilization problem

$
0
0

SQL server 2008r2 we are using ,queries also executing quickly

but cpu utilization is showing 98%-99%. same of articles is showing following

commends

dbcc FREESYSTEMCACHE

dbcc FREESESSIONCACHE

dbcc FREEPROCCACHE

can i run this commends in production server .......




Significance of sp_getschemalock

$
0
0

Hi

Stumbled across sp_getschemalock when setting up a solution to use linked server and synonyms. Ran a profiler trace of what was actually transmitted over the wire to the linked server. As we're in a POC phase whith the linked server strategy I was wondering if anyone has input on the significance of the SQL Servers use of sp_getschemalock. What does it do? No help from Books Online or google.

I mean, a schema lock?! And there is one sp_getschemalock call for every table I touch on the linked server! Sounds heavy as the linked server is a sentral point to the whole customer operation. Am I moving into really murky waters here with lots of centrally placed locks that bog down the central server? How does it play performance wise? Better safe than sorry you know :-| Or am I worrying too much, ..., again?

Brumlemann

Viewing all 15889 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>