Showing posts with label exe. Show all posts
Showing posts with label exe. Show all posts

Friday, March 23, 2012

R

I am having some issues with my replication server. The sqlservr.exe is running 75-100%. Sometimes it pins up above 95 for more than two minutes. It's eating a ton of memory as well. The only thing the server is used for is to replicate our production server. The distribution database runs on it and the log reader, but thats it!

Dell Poweredge 2950
2003 x64
Xeon 5160 3.00
8.0 gbs of ram

Currently replication is running OK with the processor that high. But it only has about 900 mb of memory available. Does anyone have any ideas why sqlserver.exe needs that much horsepower? I just can't image it is right.

Thanks,ok ok i figured this out. i am kind of a newbie. It was an in house app running huge select statements that was eating up all the CPU. I ran a trace and it was pretty obvious. The replication db also serves as the reporting db. Not a replication issue at all, the cpu is running very low now.

thanks

Friday, March 9, 2012

Quick question on VB

Hey folks,

I am trying to run a batchfile or a external process ( exe ) from within a Script Task and read the process status returned by the process. Is there a sample VB script code that does this that you guys can share ? What modules do I have to Import ?

Thanks

-chiraj

This should do the trick. To test this, create a batch file in C:\temp called test.bat. Simply put "foobar" or something invalid in the batch file to create an errorlevel. Copy the code into a script task, run the package. It will show you the errorlevel in a message box.

Imports System

Imports System.Data

Imports System.Math

Imports System.Windows.Forms

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain

Public Sub Main()

Dim stat As Integer = ExecProc("C:\\temp\\test.bat")

MessageBox.Show("The exit status was : " + stat.ToString())

Dts.TaskResult = Dts.Results.Success

End Sub

Public Function ExecProc(ByVal Path As String) As Integer

Dim objProc As System.Diagnostics.Process

Dim status As Integer

Try

objProc = New System.Diagnostics.Process()

objProc.StartInfo.FileName = Path

objProc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal

objProc.Start()

'Wait until the process passes back an exit code

objProc.WaitForExit()

status = objProc.ExitCode

Catch Ex As Exception

MessageBox.Show(Ex.Message)

Finally

'Release the objProc resources

objProc.Close()

End Try

Return status

End Function

End Class

HTH,

Kirk Haselden
Author "SQL Server Integration Services"

|||Thank you, Kirk.

Wednesday, March 7, 2012

quick question

I have SQL 2000 server running on my SBS box.
Is it normal for there to be 5 instances of sqlservr.exe to be running at
teh same time?>I have SQL 2000 server running on my SBS box.
> Is it normal for there to be 5 instances of sqlservr.exe to be running at
> teh same time?
If you have 5 separate SQL Server instances and all are running, then this
is normal. I know next to nothing about SBS but it may be that multiple
applications are installed (Sharepoint, etc.), each with a separate SQL
Server instance.
Crossposted to microsoft.public.windows.server.sbs.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Johnfli" <john@.ivhs.us> wrote in message
news:u3NPUDG$HHA.2004@.TK2MSFTNGP06.phx.gbl...
>I have SQL 2000 server running on my SBS box.
> Is it normal for there to be 5 instances of sqlservr.exe to be running at
> teh same time?
>