Showing posts with label task. Show all posts
Showing posts with label task. Show all posts

Sunday, February 26, 2012

enabling AWE

After enabling awe and setting the max server memory, the
Task Manager, Process for sqlserver.exe shows 90MB - is
this normal? I have configured sql server to use 6GB!!!!
How can I be sure the memory is set up correctly?
CBUse perfmon and view the sql server memory counters instead of task manager.
Specifically the target and total memory should show approx 6GB. Did you
set the /PAE switch in the boot.ini as well? How about the /3GB?
87 Shrinking TempDB
http://www.sql-server-performance.com/awe_memory.asp Using AWE Memory
http://www.support.microsoft.com/?id=321363 SQL Server 7 & 2000 memory
usage
http://www.support.microsoft.com/?id=274750 Memory config
http://www.support.microsoft.com/?id=283037 Large Memory Support Is
Available in Windows 2000 (AWE)
http://www.support.microsoft.com/?id=811891 Can not use more than 2GB of
memory
--
Andrew J. Kelly SQL MVP
"CB" <anonymous@.discussions.microsoft.com> wrote in message
news:64e201c4cb40$8dab3650$a601280a@.phx.gbl...
> After enabling awe and setting the max server memory, the
> Task Manager, Process for sqlserver.exe shows 90MB - is
> this normal? I have configured sql server to use 6GB!!!!
> How can I be sure the memory is set up correctly?
> CB

Friday, February 24, 2012

Enable/disable logging dynamically

Is there a way to turn on/off a given logger dynamically across the board, and still enable the logging of task specific events, like "ExecuteSQLExecutingQuery" from the ExecuteSQL task or "WMIDataReaderOperation" from the WMI Data Reader task?

The use case is one where multiple loggers are defined in a package (custom and stock) and I'd like to toggle the execution tracing on a per logger basis.

I realize "logger toggling" can be done programmatically, but I'm wondering if that's the only way to accomplish the objective.

The behaviour of the logging cannot be modified at runtime. Also, logging different events in different log providers for same executable is not possible as well. It's a great idea for a future version tough.


What you can do is decide who can log, what log providers should each executable use, and what events for each executable you want to log at design time. (e.g.: I can log "ExecuteSQLExecutingQuery" from the ExecuteSQL task in SQL server, and WMIDataReaderOperation" from the WMI Data Reader task in a file).

Thanks,

Ovidiu

|||

You may also consider investigating creating a custom logging solution using Event Handlers. You have a great deal of control over how they operate and you can even use variables and configurations to control them.

Jamie Thomson had a blog about this sometime back... here is the link: http://blogs.conchango.com/jamiethomson/archive/2005/06/11/1593.aspx

Enable/disable logging dynamically

Is there a way to turn on/off a given logger dynamically across the board, and still enable the logging of task specific events, like "ExecuteSQLExecutingQuery" from the ExecuteSQL task or "WMIDataReaderOperation" from the WMI Data Reader task?

The use case is one where multiple loggers are defined in a package (custom and stock) and I'd like to toggle the execution tracing on a per logger basis.

I realize "logger toggling" can be done programmatically, but I'm wondering if that's the only way to accomplish the objective.

The behaviour of the logging cannot be modified at runtime. Also, logging different events in different log providers for same executable is not possible as well. It's a great idea for a future version tough.


What you can do is decide who can log, what log providers should each executable use, and what events for each executable you want to log at design time. (e.g.: I can log "ExecuteSQLExecutingQuery" from the ExecuteSQL task in SQL server, and WMIDataReaderOperation" from the WMI Data Reader task in a file).

Thanks,

Ovidiu

|||

You may also consider investigating creating a custom logging solution using Event Handlers. You have a great deal of control over how they operate and you can even use variables and configurations to control them.

Jamie Thomson had a blog about this sometime back... here is the link: http://blogs.conchango.com/jamiethomson/archive/2005/06/11/1593.aspx

Enable/Disable Job with SMO

I am trying to enable/disable a job using a using smo in a script task with the following code

Imports System.Object
Imports Microsoft.SqlServer.Management.Common
Imports Microsoft.SqlServer.Management.Smo
Imports Microsoft.SqlServer.Management.Smo.Agent
Imports Microsoft.SqlServer.Management.Smo.SqlSmoObject
Imports Microsoft.SqlServer.Management.Smo.SmoObjectBase
Imports Microsoft.SqlServer.Management.Smo.NamedSmoObject
Imports Microsoft.SqlServer.Management.Smo.Agent.Job
Imports Microsoft.SqlServer.Management.Smo.Agent.Jobserver
Imports Microsoft.SqlServer.Management.Smo.Agent.AgentObjectBase

Public Class ScriptMain

Public Sub Main()

Dim strJobserver As JobServer

Dim strJob As Job
Dim srv As Server
srv = New Server("conchango-vpc")

strJob = New Job(srv.JobServer, "test")

strJob.IsEnabled = True

strJob.Alter()

Dts.TaskResult = Dts.Results.Success
End Sub

End Class
and i get an error at the alter point.

when code is changed to using the following line
srv.Jobserver.Alter()
it runs successfully but no change is made to the job.
What am I missing?
Ifaka Enefe
Conchango

Your code is trying to create a new job called "test" instead of using the existing job.

Instead of:
strJob = New Job(srv.JobServer, "test")

Use:
strJob = srv.JobServer.Jobs("test")
|||It worked. Thanks!|||Hi,
I've got the followinng inside a class library:


Server serv;

Job jb;

serv = new Server(this.strServerName);

jb = serv.JobServer.Jobs(this.strJobName);

if (strJobEnabledStatus=="True")

{

jb.IsEnabled = true;

}

else

{

jb.IsEnabled=false;

}

jb.Alter();



And it complains about


serv.JobServer.Jobs(this.strJobName)

saying "'Microsoft.SqlServer.Management.Smo.Agent.JobServer.Jobs' is a property but is used like a 'method'"

Any ideas? I aint much a developer I'm afraid so I'm at a bit of a loss here.

Thanks
Jamie|||s'all right. I've found it.


jb = serv.JobServer.Jobs[this.strJobName];

Must get my head out of VB mode Smile

-Jamie

Enable/Disable Job with SMO

I am trying to enable/disable a job using a using smo in a script task with the following code

Imports System.Object
Imports Microsoft.SqlServer.Management.Common
Imports Microsoft.SqlServer.Management.Smo
Imports Microsoft.SqlServer.Management.Smo.Agent
Imports Microsoft.SqlServer.Management.Smo.SqlSmoObject
Imports Microsoft.SqlServer.Management.Smo.SmoObjectBase
Imports Microsoft.SqlServer.Management.Smo.NamedSmoObject
Imports Microsoft.SqlServer.Management.Smo.Agent.Job
Imports Microsoft.SqlServer.Management.Smo.Agent.Jobserver
Imports Microsoft.SqlServer.Management.Smo.Agent.AgentObjectBase

Public Class ScriptMain

Public Sub Main()

Dim strJobserver As JobServer

Dim strJob As Job
Dim srv As Server
srv = New Server("conchango-vpc")

strJob = New Job(srv.JobServer, "test")

strJob.IsEnabled = True

strJob.Alter()

Dts.TaskResult = Dts.Results.Success
End Sub

End Class
and i get an error at the alter point.

when code is changed to using the following line
srv.Jobserver.Alter()
it runs successfully but no change is made to the job.
What am I missing?
Ifaka Enefe
Conchango

Your code is trying to create a new job called "test" instead of using the existing job.

Instead of:
strJob = New Job(srv.JobServer, "test")

Use:
strJob = srv.JobServer.Jobs("test")
|||It worked. Thanks!|||Hi,
I've got the followinng inside a class library:


Server serv;

Job jb;

serv = new Server(this.strServerName);

jb = serv.JobServer.Jobs(this.strJobName);

if (strJobEnabledStatus=="True")

{

jb.IsEnabled = true;

}

else

{

jb.IsEnabled=false;

}

jb.Alter();



And it complains about


serv.JobServer.Jobs(this.strJobName)

saying "'Microsoft.SqlServer.Management.Smo.Agent.JobServer.Jobs' is a property but is used like a 'method'"

Any ideas? I aint much a developer I'm afraid so I'm at a bit of a loss here.

Thanks
Jamie|||s'all right. I've found it.


jb = serv.JobServer.Jobs[this.strJobName];

Must get my head out of VB mode Smile

-Jamie