Quantcast
Channel: SQL Server Database Engine forum
Viewing all 15264 articles
Browse latest View live

SQL Server Target Memory

$
0
0

Hi All

I have few SQL 2008 R2 32bits on Server 2008 32bits, I leave all the min and max memory setting to default ( i know it's a bad practise). I start up all the sql servers and check their target memory... and found that all in different values..

how could this happened?Will it affect the performance ?Some server has physical 2GB and some has 4GB memory 


Estimated Time to for Backup

$
0
0

Dear All,

I got a task to take a backup of a database which is 400GB.

Before that i need to provide estimated time.

I know it depends on how the server is responding.

Server config 256GB RAM n 24COre processor

Can any one tell me the estimated time.


How to free space after truncating a table?

$
0
0

Hi all,

I have a question about freeing space in SQL server.

After I trucate a table in the db using truncate table statement, I did not get any free space. I also try to shrink db using GUI but also did not get any space...

Can anyone advise?


----> Kinect

Log shipping Copy Job hangs

$
0
0

Hi,

I have several DBs on 2008 R2 log shipped to DR server. Quite often Copy Job for some DBs can run for days (I assume hangs as normally it completes within minutes). Restart of the Job does not always help. Last message in the Job history is "Coping log backup file to temporary work file". I can see that *.wrk file in the destination folder but the Job does not progress further. 

Thank you in advance for any troubleshooting suggestions or root cause.


how to change database recovery mode from standby to with recovery

$
0
0

Hi,

how to change database recovery mode from standby to with recovery

Percentage of backup is processed till time query...

$
0
0

We have a huge size of database...

How to know the percentage of backup is processed till time when backup is processing of that database ??

operating system error 27(failed to retrieve text for this error. reason: 15105) encountered

$
0
0

Hi All,

Operating system error 27(failed to retrieve text for this error. reason: 15105) encountered

Event id: 17053   Source: MSSQLSERVER

and i got same error when try to backup or change size of files for one Database..


Regards, Ibrahim Hamdy

Sql server error log

$
0
0

hi ,

if any chances to delete the sql server error log information,

(xp_readerrorlog) information... 


how to change database recovery mode from standby to with recovery

$
0
0

Hi,

Dear team

how to change database recovery mode from standby to with recovery currently my databse in Standby / Read_only mode.

Kindly provide solucation on urgent basis.

Database size

$
0
0

Hi,

I want to find the database size and the space reserved for database. I want to check the overall space allocated to database including current database size and space reserved.

Regards

What is the data stream type for SQL VDI backup.

$
0
0

HI 

Can any body tell me ,What is the data stream type used for SQL VDI backup ?

I also wanted to know if the tape format is a MTF format ?

Is the VDI stream also contains Volume,folder and file descriptor blocks for data base backup ?if yes what are these values for SQL server.

Thanks

Arun

characterizing work load

$
0
0

Hi all,

I am a developer who writes business data queries for different application. Since we don't have a DBA now, I'll have to learn and do some dba activities. Currently we have sql server 2008 r2 and we are planning to buy sql server 2012 and we are trying to understand the different versions of sql server 2012 and also the different license models. I did go through few related blogs and saw many diagnostic queries which would help us asses or characterize the work load. I have few questions regarding some queries

1)

SELECT login_name, COUNT(session_id) AS [session_count]
FROM sys.dm_exec_sessions WITH (NOLOCK)
WHERE session_id > 50 -- filter out system SPIDs
GROUP BY login_name
ORDER BY COUNT(session_id) DESC OPTION (RECOMPILE);

I would like to know how can the above query help to characterize the work load?

2)

SELECT DB_NAME(DB_ID()) AS [Database Name], df.name AS [Logical Name], vfs.[file_id],
df.physical_name AS [Physical Name], vfs.num_of_reads, vfs.num_of_writes, vfs.io_stall_read_ms, vfs.io_stall_write_ms,
CAST(100. * vfs.io_stall_read_ms/(vfs.io_stall_read_ms + vfs.io_stall_write_ms) AS DECIMAL(10,1)) AS [IO Stall Reads Pct],
CAST(100. * vfs.io_stall_write_ms/(vfs.io_stall_write_ms + vfs.io_stall_read_ms) AS DECIMAL(10,1)) AS [IO Stall Writes Pct],
(vfs.num_of_reads + vfs.num_of_writes) AS [Writes + Reads], vfs.num_of_bytes_read, vfs.num_of_bytes_written,
CAST(100. * vfs.num_of_reads/(vfs.num_of_reads + vfs.num_of_writes) AS DECIMAL(10,1)) AS [# Reads Pct],
CAST(100. * vfs.num_of_writes/(vfs.num_of_reads + vfs.num_of_writes) AS DECIMAL(10,1)) AS [# Write Pct],
CAST(100. * vfs.num_of_bytes_read/(vfs.num_of_bytes_read + vfs.num_of_bytes_written) AS DECIMAL(10,1)) AS [Read Bytes Pct],
CAST(100. * vfs.num_of_bytes_written/(vfs.num_of_bytes_read + vfs.num_of_bytes_written) AS DECIMAL(10,1)) AS [Written Bytes Pct]
FROM sys.dm_io_virtual_file_stats(DB_ID(), NULL) AS vfs
INNER JOIN sys.database_files AS df WITH (NOLOCK)
ON vfs.[file_id]= df.[file_id]
OPTION (RECOMPILE);

With the help of the above, how do you characterize your load from an I/O perspective for the database. how do you determine if you have an OLTP or DW/DSS type of workload

Thanks a lot!

users login issue

Strange behavior of select query; it doesnot return rows whereas table has data

$
0
0

the following select query returns:
Select * from sales where CustLastname ='Smith'

Dave    Smith
John    Smith
Marry    Smith
........ Lets say large out put of million rows. The output has other columns too, not specifying them for simplicity.



The following select query on the same table doesnot return any output:


Select * from sales where CustFirstname ='Dave'
---- Now rows returned -----

Whereas when I modify the query a little bit like:
Select * from sales where CustFirstname ='Dave' + CHAR(0)

It returns the rows
Dave    Smith
Dave    Wells
....


Other facts about the issue:
1.    Initially, I thought this is a corruption issue so performed a dbcc with and without dataloss
2.    I even restored the database from production to the QA environment and still the same issue.
3.    This behaviour is only with the column CustFirstname, queries on other columns work perfectly.
4.    Tried to execute the query with sqlcmd with output to a file, same issue.
5.    the table has a single collation. This columns has the same collation as the other columns in the table.
6.    I tried to copy the output of the table in to a new table using select * into but the new table also has the same issue.
7.    I tried to even drop the clustered index on the table which was coming as the only index being scanned for the output of the query.

I have already spend over 5-6 overs to understand what can be the reason behing this issue but no success till now.
I feel I can fix this issue by creating a new table first and then use the insert into caluse to copy all data but I need to understand what is the root cause of this issue.


create a linked server on SQL2005 to SQL2000

$
0
0

in SSMS add a linked server on SQL2005, given the mapping remote user and remote password for my loca login, both remote and local login are administrators, but when show on the linked servers,it only shows Styem Tables in SSMS, and a message "See Object Explorer Details for objects in this folder" below the system tables folder.

when try to query a table , got:

OLE DB provider "SQLNCLI" for linked server " " returned message "Unspecified error".

OLE DB provider "SQLNCLI" for linked server " " returned message "The stored procedure required to complete this operation could not be found on the server. Please contact your system administrator.".

Msg 7311, Level 16, State 2, Line 1

Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server " ". The provider supports the interface, but returns a failure code when it is used.


How to use trigger to create SQL Agent job on secondary replica server from primary server in Always On High availability environment?

$
0
0

I have 2 Boxes Server A and Server B.

I have setup always on high availability between these servers.

Server A is primary and Server B is secondary.

I want to set up a process like if I create sql agent job on primary, it will create the same job on secondary as well.

does anyone has any process or ideas?

Thanks in advance for your help.

Regards,

Nik


Regards, Naman

spid processes hang

$
0
0
the SQL server 2008R2 is the backend of an application. every now and then there are spids which are shown as not doing anything in activity monitor (do not have any status in the activity monitor - not suspended, running , runnable ,etc) and they are blocking other spids since they are part of the same transaction. also these processes are never running to completion and can hang for days and the only way to clear the locks is to either kill the blocking processes from activity monitor or to stop the application which will kill these blocking processes

Failed to initialize MSDB database for tuning (exit code: -1073741819). (DTAClient)

$
0
0

Hello,

This is the first time I am using this forum. I am stuck and need some help. I received this error message both on SQL 2005 and 2008. I am currently using SQL 2008 DEV for testing purposes and I am experiencing this error message when trying to connect to Database Engine Tuning Advisor. I am using the SA account so I should not have any security issues. Also this is a fresh install of SQL 2008 DEV on a fresh install of Windows XP Pro with all SP. Can some please help.

Error:

"Failed to initialize MSDB database for tuning (exit code: -1073741819). (DTAClient)"

===================================

Failed to open a new connection.

===================================

Failed to initialize MSDB database for tuning (exit code: -1073741819). (DTAClient)

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.DTA.Client.TuningServer.InitializeTuningParametersDatabase()
   at Microsoft.SqlServer.Management.DTA.Client.TuningServer.InitializeConnection()
   at Microsoft.SqlServer.Management.DTA.Client.TuningServer.Connect()
   at Microsoft.SqlServer.Management.DTA.Shell.SessionMonitor.AddServerInternal(SqlConnectionInfo connectionInfo, SqlConnection connection)
   at Microsoft.SqlServer.Management.DTA.Shell.SessionMonitor.AddServer(SqlConnectionInfo connectionInfo, SqlConnection connection)
   at Microsoft.SqlServer.Management.DTA.Shell.SessionMonitor.OnConnect(Object sender, EventArgs e)

 

Partition scheme change with clustered Index

$
0
0
Hi,

I have table which has 600 million records and also has the Partition on PS_TRPdate(TRPDate) column, I want to change it to another Partition PS_LPDate(LPDate).

So I have tried with small amount of data with following steps.
1) Drop the Primary key Constraints.
2) Adding the New Primary Key Clustered Index with new Partition PS_LPDate(LPDate).

Is it Feasible with 600 million records? Can anyone guide me for it? 
and How does it works with Non Partitioned Tables?

--343

Disable Error 3197 "I/O is frozen on database %ls. No user action is required." in SQL Error Log

$
0
0

Hi Experts,

I have a MS SQL Server 2008 R2 Server with plenty of shared point databases. MS DPM (Data Protection Manager) configured for the databases backup. Every time the backup initiated it logs info "I/O is frozen on database %ls. No user action is required." I want to avoid that info in the log file. Is there any way to disable error messages 3197,3198 in error log file.

UsafUnas

Viewing all 15264 articles
Browse latest View live


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