Showing posts with label unable. Show all posts
Showing posts with label unable. Show all posts

Tuesday, March 27, 2012

Can not initialize report server or run rsactivate

I get the following error when running the RSActivate utility:
"Unable to find Reporting Services WMI namespace = on <machinename>. Reporting Services may not be installed"
This is an urgent problem so any suggestions would be welcomed.
*****************************************
* This message was posted via http://www.sqlmonster.com
*
* Report spam or abuse by clicking the following URL:
* http://www.sqlmonster.com/Uwe/Abuse.aspx?aid=d737907db3624cb18a4c69da471c4572
*****************************************Double-check that that WMI Service is started in the Services Manager/MMC.
Edgar,
"Jared Smith via SQLMonster.com" wrote:
> I get the following error when running the RSActivate utility:
> "Unable to find Reporting Services WMI namespace => on <machinename>. Reporting Services may not be installed"
> This is an urgent problem so any suggestions would be welcomed.
> *****************************************
> * This message was posted via http://www.sqlmonster.com
> *
> * Report spam or abuse by clicking the following URL:
> * http://www.sqlmonster.com/Uwe/Abuse.aspx?aid=d737907db3624cb18a4c69da471c4572
> *****************************************
>

Can not get sqlcmd and unable to create peer-to-peer replication.

Hi, Pros,

I am new to SQL server 2005. We have installed SQL server 2005 cluster. I tried to setup peer-to-peer replication with another standard server. Unfortunately, when I creating publication, I got error message : SQL server cound not configure "MyServer" as a Distributor [New publication Wizard] Additional information: An exception occurred whild executing a Transact_SQL statement or batch.

The Server "Myserveris already defined as a Distributor. To reconfigure the server as a Distributor, you must first uninstall the exisitingDistributor. Use the stored procedure sp_dropdistributor, or use the Disable Publishing and Distribution Wizard. Changed database context to 'master'. [Microsoft SQL Server, Error: 14099]

I tried to use sqlcmd and I got another error message:

C:\>sqlcmd

HResult 0x2, Level 16, State 1

Named Pipes Provider: Could not open a connection to SQL Server [2].

Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi

shing a connection to the server. When connecting to SQL Server 2005, this failu

re may be caused by the fact that under the default settings SQL Server does not

allow remote connections..

Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

Does anyone have any idea how to get the sqlcmd work?

Thank you in advance.

Hi Vicent,

You should use "sqlcmd -S %VirtualInstanceName%" (replace %VirtualInstanceName% with the virtual server name of your cluster.

For the issue of setting up distributor, have you follow the instruction in your error message?

Peng

|||

Hi, Peng,

Thanks for your kind reply. I am so glad your command works. I got another error when I tried to drop distributor from my cluster because when I setup replication the message shows the cluster has been setup as distributor.

I use sqlcmd to drop distributor and get the error message below. Do you have any idea?

C:\>sqlcmd -S myvirtualname
1> sp_dropdistributor 'myvirtualname'
2> GO
HResult 0x1FB2, Level 16, State 5
Error converting data type varchar to bit.
1>

Thanks for your help.

|||

Hi Vincent,

The first parameter of sp_dropdistributor is not server name. Please see this page (http://msdn2.microsoft.com/en-us/library/ms173516.aspx) for the document. For example, you should say "EXEC sp_dropdistributor" or "EXEC sp_dropdistributor 1".

Peng

|||

Hi, Peng,

I tried the command EXEC, it does not work either.

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\HCLLCLUS>sqlcmd -S myvirtualname
1> EXEC sp_dropdistributor 'myvirtualname'
2> GO
HResult 0x1FB2, Level 16, State 5
Error converting data type varchar to bit.
1>

Do you know how to fix? Do I need to log on machine instead of virtual name? I wonder how did this distributor setup. Is there any way I can check this?

Thanks,

|||

I need to mention one more thing. I did follow the error message and tried to find Disable Publication and Distributor Wizard. It was not there. It seems the only way left for me is the command line.

Thanks.

|||

It is really my bad. I use the command to drop off distributor.

1> EXEC sp_dropdistributor
2> GO
Msg 21043, Level 16, State 1, Server virtualserver, Procedure sp_dropdistributor,
Line 50
The Distributor is not installed.
1>

It is looks like the ditributor did not installed on the server. However if I tried to configure replication via wizard, the error message shows the distributor was installed.

SQL Server could not configure ‘virtualname’ as a Distributor.

Additional information.

An exception occurred while executing a Transact-SQL statement or batch.

[Microsoft.SqlServer.ConnectionInfo]

The server ‘Virtualname’ is already defined as a Distributor. To reconfigure the server as a Distributor, you must first uninstall the existing Distributor. Use the stored procedure sp_dropdistributor, or use the Disable Publishing and Distribution Wizard. Changed database context to ‘master’. [Microsoft SQL Server Error: 14099]

|||

Could you run the following command against your cluster instance and report the result back?

SELECT srvname FROM master.dbo.sysservers WHERE srvstatus & 8 <> 0

If you get any row back, it means that your server is already defined as distributor.

Peng

|||

Hi, Peng,

I am glad to tell you. I have resolved this problem. Actually, there was a security problem when I set up replication. I went to Local Security Settings >User Rights Assignment >Lock pages in memory, I put adminstrator user in it and I was able to setup replication. Thanks for your instruction.

I have an another problem. I did not realize that it need SQL Server 2005 Enterprise edition to setup P2P replication. I had bought upraged license. However, I do not know how to upgrade SQL server 2005 standard to Enterprise edition. Does anyone know how? Thank you.

|||Run setup from the command prompt. Here are instructions on how to do this.

http://msdn2.microsoft.com/en-us/library/ms144259.aspx#skuupgrade

Can not get sqlcmd and unable to create peer-to-peer replication.

Hi, Pros,

I am new to SQL server 2005. We have installed SQL server 2005 cluster. I tried to setup peer-to-peer replication with another standard server. Unfortunately, when I creating publication, I got error message : SQL server cound not configure "MyServer" as a Distributor [New publication Wizard] Additional information: An exception occurred whild executing a Transact_SQL statement or batch.

The Server "Myserveris already defined as a Distributor. To reconfigure the server as a Distributor, you must first uninstall the exisitingDistributor. Use the stored procedure sp_dropdistributor, or use the Disable Publishing and Distribution Wizard. Changed database context to 'master'. [Microsoft SQL Server, Error: 14099]

I tried to use sqlcmd and I got another error message:

C:\>sqlcmd

HResult 0x2, Level 16, State 1

Named Pipes Provider: Could not open a connection to SQL Server [2].

Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi

shing a connection to the server. When connecting to SQL Server 2005, this failu

re may be caused by the fact that under the default settings SQL Server does not

allow remote connections..

Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

Does anyone have any idea how to get the sqlcmd work?

Thank you in advance.

Hi Vicent,

You should use "sqlcmd -S %VirtualInstanceName%" (replace %VirtualInstanceName% with the virtual server name of your cluster.

For the issue of setting up distributor, have you follow the instruction in your error message?

Peng

|||

Hi, Peng,

Thanks for your kind reply. I am so glad your command works. I got another error when I tried to drop distributor from my cluster because when I setup replication the message shows the cluster has been setup as distributor.

I use sqlcmd to drop distributor and get the error message below. Do you have any idea?

C:\>sqlcmd -S myvirtualname
1> sp_dropdistributor 'myvirtualname'
2> GO
HResult 0x1FB2, Level 16, State 5
Error converting data type varchar to bit.
1>

Thanks for your help.

|||

Hi Vincent,

The first parameter of sp_dropdistributor is not server name. Please see this page (http://msdn2.microsoft.com/en-us/library/ms173516.aspx) for the document. For example, you should say "EXEC sp_dropdistributor" or "EXEC sp_dropdistributor 1".

Peng

|||

Hi, Peng,

I tried the command EXEC, it does not work either.

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\HCLLCLUS>sqlcmd -S myvirtualname
1> EXEC sp_dropdistributor 'myvirtualname'
2> GO
HResult 0x1FB2, Level 16, State 5
Error converting data type varchar to bit.
1>

Do you know how to fix? Do I need to log on machine instead of virtual name? I wonder how did this distributor setup. Is there any way I can check this?

Thanks,

|||

I need to mention one more thing. I did follow the error message and tried to find Disable Publication and Distributor Wizard. It was not there. It seems the only way left for me is the command line.

Thanks.

|||

It is really my bad. I use the command to drop off distributor.

1> EXEC sp_dropdistributor
2> GO
Msg 21043, Level 16, State 1, Server virtualserver, Procedure sp_dropdistributor,
Line 50
The Distributor is not installed.
1>

It is looks like the ditributor did not installed on the server. However if I tried to configure replication via wizard, the error message shows the distributor was installed.

SQL Server could not configure ‘virtualname’ as a Distributor.

Additional information.

An exception occurred while executing a Transact-SQL statement or batch.

[Microsoft.SqlServer.ConnectionInfo]

The server ‘Virtualname’ is already defined as a Distributor. To reconfigure the server as a Distributor, you must first uninstall the existing Distributor. Use the stored procedure sp_dropdistributor, or use the Disable Publishing and Distribution Wizard. Changed database context to ‘master’. [Microsoft SQL Server Error: 14099]

|||

Could you run the following command against your cluster instance and report the result back?

SELECT srvname FROM master.dbo.sysservers WHERE srvstatus & 8 <> 0

If you get any row back, it means that your server is already defined as distributor.

Peng

|||

Hi, Peng,

I am glad to tell you. I have resolved this problem. Actually, there was a security problem when I set up replication. I went to Local Security Settings >User Rights Assignment >Lock pages in memory, I put adminstrator user in it and I was able to setup replication. Thanks for your instruction.

I have an another problem. I did not realize that it need SQL Server 2005 Enterprise edition to setup P2P replication. I had bought upraged license. However, I do not know how to upgrade SQL server 2005 standard to Enterprise edition. Does anyone know how? Thank you.

|||Run setup from the command prompt. Here are instructions on how to do this.

http://msdn2.microsoft.com/en-us/library/ms144259.aspx#skuupgrade

Can not get sqlcmd and unable to create peer-to-peer replication.

Hi, Pros,

I am new to SQL server 2005. We have installed SQL server 2005 cluster. I tried to setup peer-to-peer replication with another standard server. Unfortunately, when I creating publication, I got error message : SQL server cound not configure "MyServer" as a Distributor [New publication Wizard] Additional information: An exception occurred whild executing a Transact_SQL statement or batch.

The Server "Myserveris already defined as a Distributor. To reconfigure the server as a Distributor, you must first uninstall the exisitingDistributor. Use the stored procedure sp_dropdistributor, or use the Disable Publishing and Distribution Wizard. Changed database context to 'master'. [Microsoft SQL Server, Error: 14099]

I tried to use sqlcmd and I got another error message:

C:\>sqlcmd

HResult 0x2, Level 16, State 1

Named Pipes Provider: Could not open a connection to SQL Server [2].

Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi

shing a connection to the server. When connecting to SQL Server 2005, this failu

re may be caused by the fact that under the default settings SQL Server does not

allow remote connections..

Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

Does anyone have any idea how to get the sqlcmd work?

Thank you in advance.

Hi Vicent,

You should use "sqlcmd -S %VirtualInstanceName%" (replace %VirtualInstanceName% with the virtual server name of your cluster.

For the issue of setting up distributor, have you follow the instruction in your error message?

Peng

|||

Hi, Peng,

Thanks for your kind reply. I am so glad your command works. I got another error when I tried to drop distributor from my cluster because when I setup replication the message shows the cluster has been setup as distributor.

I use sqlcmd to drop distributor and get the error message below. Do you have any idea?

C:\>sqlcmd -S myvirtualname
1> sp_dropdistributor 'myvirtualname'
2> GO
HResult 0x1FB2, Level 16, State 5
Error converting data type varchar to bit.
1>

Thanks for your help.

|||

Hi Vincent,

The first parameter of sp_dropdistributor is not server name. Please see this page (http://msdn2.microsoft.com/en-us/library/ms173516.aspx) for the document. For example, you should say "EXEC sp_dropdistributor" or "EXEC sp_dropdistributor 1".

Peng

|||

Hi, Peng,

I tried the command EXEC, it does not work either.

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\HCLLCLUS>sqlcmd -S myvirtualname
1> EXEC sp_dropdistributor 'myvirtualname'
2> GO
HResult 0x1FB2, Level 16, State 5
Error converting data type varchar to bit.
1>

Do you know how to fix? Do I need to log on machine instead of virtual name? I wonder how did this distributor setup. Is there any way I can check this?

Thanks,

|||

I need to mention one more thing. I did follow the error message and tried to find Disable Publication and Distributor Wizard. It was not there. It seems the only way left for me is the command line.

Thanks.

|||

It is really my bad. I use the command to drop off distributor.

1> EXEC sp_dropdistributor
2> GO
Msg 21043, Level 16, State 1, Server virtualserver, Procedure sp_dropdistributor,
Line 50
The Distributor is not installed.
1>

It is looks like the ditributor did not installed on the server. However if I tried to configure replication via wizard, the error message shows the distributor was installed.

SQL Server could not configure ‘virtualname’ as a Distributor.

Additional information.

An exception occurred while executing a Transact-SQL statement or batch.

[Microsoft.SqlServer.ConnectionInfo]

The server ‘Virtualname’ is already defined as a Distributor. To reconfigure the server as a Distributor, you must first uninstall the existing Distributor. Use the stored procedure sp_dropdistributor, or use the Disable Publishing and Distribution Wizard. Changed database context to ‘master’. [Microsoft SQL Server Error: 14099]

|||

Could you run the following command against your cluster instance and report the result back?

SELECT srvname FROM master.dbo.sysservers WHERE srvstatus & 8 <> 0

If you get any row back, it means that your server is already defined as distributor.

Peng

|||

Hi, Peng,

I am glad to tell you. I have resolved this problem. Actually, there was a security problem when I set up replication. I went to Local Security Settings >User Rights Assignment >Lock pages in memory, I put adminstrator user in it and I was able to setup replication. Thanks for your instruction.

I have an another problem. I did not realize that it need SQL Server 2005 Enterprise edition to setup P2P replication. I had bought upraged license. However, I do not know how to upgrade SQL server 2005 standard to Enterprise edition. Does anyone know how? Thank you.

|||Run setup from the command prompt. Here are instructions on how to do this.

http://msdn2.microsoft.com/en-us/library/ms144259.aspx#skuupgradesql

Can not get sqlcmd and unable to create peer-to-peer replication.

Hi, Pros,

I am new to SQL server 2005. We have installed SQL server 2005 cluster. I tried to setup peer-to-peer replication with another standard server. Unfortunately, when I creating publication, I got error message : SQL server cound not configure "MyServer" as a Distributor [New publication Wizard] Additional information: An exception occurred whild executing a Transact_SQL statement or batch.

The Server "Myserveris already defined as a Distributor. To reconfigure the server as a Distributor, you must first uninstall the exisitingDistributor. Use the stored procedure sp_dropdistributor, or use the Disable Publishing and Distribution Wizard. Changed database context to 'master'. [Microsoft SQL Server, Error: 14099]

I tried to use sqlcmd and I got another error message:

C:\>sqlcmd

HResult 0x2, Level 16, State 1

Named Pipes Provider: Could not open a connection to SQL Server [2].

Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi

shing a connection to the server. When connecting to SQL Server 2005, this failu

re may be caused by the fact that under the default settings SQL Server does not

allow remote connections..

Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

Does anyone have any idea how to get the sqlcmd work?

Thank you in advance.

Hi Vicent,

You should use "sqlcmd -S %VirtualInstanceName%" (replace %VirtualInstanceName% with the virtual server name of your cluster.

For the issue of setting up distributor, have you follow the instruction in your error message?

Peng

|||

Hi, Peng,

Thanks for your kind reply. I am so glad your command works. I got another error when I tried to drop distributor from my cluster because when I setup replication the message shows the cluster has been setup as distributor.

I use sqlcmd to drop distributor and get the error message below. Do you have any idea?

C:\>sqlcmd -S myvirtualname
1> sp_dropdistributor 'myvirtualname'
2> GO
HResult 0x1FB2, Level 16, State 5
Error converting data type varchar to bit.
1>

Thanks for your help.

|||

Hi Vincent,

The first parameter of sp_dropdistributor is not server name. Please see this page (http://msdn2.microsoft.com/en-us/library/ms173516.aspx) for the document. For example, you should say "EXEC sp_dropdistributor" or "EXEC sp_dropdistributor 1".

Peng

|||

Hi, Peng,

I tried the command EXEC, it does not work either.

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\HCLLCLUS>sqlcmd -S myvirtualname
1> EXEC sp_dropdistributor 'myvirtualname'
2> GO
HResult 0x1FB2, Level 16, State 5
Error converting data type varchar to bit.
1>

Do you know how to fix? Do I need to log on machine instead of virtual name? I wonder how did this distributor setup. Is there any way I can check this?

Thanks,

|||

I need to mention one more thing. I did follow the error message and tried to find Disable Publication and Distributor Wizard. It was not there. It seems the only way left for me is the command line.

Thanks.

|||

It is really my bad. I use the command to drop off distributor.

1> EXEC sp_dropdistributor
2> GO
Msg 21043, Level 16, State 1, Server virtualserver, Procedure sp_dropdistributor,
Line 50
The Distributor is not installed.
1>

It is looks like the ditributor did not installed on the server. However if I tried to configure replication via wizard, the error message shows the distributor was installed.

SQL Server could not configure ‘virtualname’ as a Distributor.

Additional information.

An exception occurred while executing a Transact-SQL statement or batch.

[Microsoft.SqlServer.ConnectionInfo]

The server ‘Virtualname’ is already defined as a Distributor. To reconfigure the server as a Distributor, you must first uninstall the existing Distributor. Use the stored procedure sp_dropdistributor, or use the Disable Publishing and Distribution Wizard. Changed database context to ‘master’. [Microsoft SQL Server Error: 14099]

|||

Could you run the following command against your cluster instance and report the result back?

SELECT srvname FROM master.dbo.sysservers WHERE srvstatus & 8 <> 0

If you get any row back, it means that your server is already defined as distributor.

Peng

|||

Hi, Peng,

I am glad to tell you. I have resolved this problem. Actually, there was a security problem when I set up replication. I went to Local Security Settings >User Rights Assignment >Lock pages in memory, I put adminstrator user in it and I was able to setup replication. Thanks for your instruction.

I have an another problem. I did not realize that it need SQL Server 2005 Enterprise edition to setup P2P replication. I had bought upraged license. However, I do not know how to upgrade SQL server 2005 standard to Enterprise edition. Does anyone know how? Thank you.

|||Run setup from the command prompt. Here are instructions on how to do this.

http://msdn2.microsoft.com/en-us/library/ms144259.aspx#skuupgrade

Sunday, March 25, 2012

Can not create Job on SQL2005

Could not create SQL jobs. Getting Error:

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type
'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)

- Tried several different job types, always same result.
- Installing SP1 or SP2 does not help.
- Installing with or without Integration Service does not help.

Any help is highly appreciated

Thanks.

Try this:

Dim strDBName As String
Dim strJobID As Guid
Dim jobDumpJob As Job
Dim jbsDumpJobStep As JobStep
Dim intStepID As Integer

' Connect to the server
Dim srvMgmtServer As Server
srvMgmtServer = New Server("MyServer")
Dim srvConn As ServerConnection
srvConn = srvMgmtServer.ConnectionContext
srvConn.LoginSecure = True

strDBName = dbDatabase.Name
jobDumpJob = New Job(srvMgmtServer.JobServer, "YourJobName")
jobDumpJob.Description = "Job Description"
jobDumpJob.Category = "[Uncategorized (Local)]"
jobDumpJob.OwnerLoginName = "sa"
jobDumpJob.Create()
strJobID = jobDumpJob.JobID

jbsDumpJobStep = New JobStep(jobDumpJob, "Step 1")
jbsDumpJobStep.DatabaseName = "UserDB"
jbsDumpJobStep.Command = "TSQL command"
jbsDumpJobStep.OnSuccessAction = StepCompletionAction.QuitWithSuccess
jbsDumpJobStep.OnFailAction = StepCompletionAction.QuitWithFailure
jbsDumpJobStep.Create()
intStepID = jbsDumpJobStep.ID

jobDumpJob.ApplyToTargetServer(srvMgmtServer.Name)
jobDumpJob.StartStepID = intStepID
jobDumpJob.Alter()

|||

Hi

I am also having this problem.

Im trying to create a job to run SQL Server Integration Package.

The Code that you have given above. What is that for?

Thanks

|||This code uses SMO in VB.Net to create a job to execute a TSQL command. Browse around in ObjectBrowser and you should find the properties necessary to execute a SSIS package.|||

I can execute the SISS Package.

But i want to execute it within a job.

Is there any tutorials for creating jobs that i could look at?

|||for some reason it works on an another machine. I dont no why.|||

I figured it out. Despite you could install Management Tool on any computer it will work only on machine that have SQL Server 2005 SP2 installed.

|||Try installing SP2 for the client components on all computers taht run management studio, reboot, then try again from management studio client.|||

Identical problems here--also tried the new hotfix as well.

We've held off rolling out SP2 due to these and other errors. Until someone deals with these problems I suppose my company is stuck.

|||Check whether Distributed Transaction Coordinator service is started. If not, start it and try again.|||

We have a sql2005 installation that I've created jobs on routinely for months and then today we hit this message. I'm not going to install SP2 just yet since some users report that it doesn't help.

The details from the error message are as follows. Any help would be much appreciated. I deleted all SSIS packages and Jobs with no luck. We've rebooted and cycled services per suggestions from users.

The original error message:

TITLE: Microsoft SQL Server Management Studio

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)


BUTTONS:

OK

Technical details

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

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)


Program Location:

at Microsoft.SqlServer.Management.Smo.Agent.JobCollection.GetObjectByKey(ObjectKeyBase key)
at Microsoft.SqlServer.Management.Smo.SimpleObjectCollectionBase.Contains(String name)
at Microsoft.SqlServer.Management.SqlManagerUI.JobData.JobExists(String jobName)
at Microsoft.SqlServer.Management.SqlManagerUI.JobData.ApplyChanges()
at Microsoft.SqlServer.Management.SqlManagerUI.JobPropertySheet.DoPreProcessExecution(RunType runType, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.DoPreProcessExecutionAndRunViews(RunType runType)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.ExecuteForSql(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.Microsoft.SqlServer.Management.SqlMgmt.IExecutionAwareSqlControlCollection.PreProcessExecution(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.RunNow(RunType runType, Object sender)

|||

Hi folks,

I too had the same exact error when trying to schedule a package. After reading numerous posts and forums, some people have said

SP2 solved their problems and some said it didn't.

Here's what I did to get it to work.

On our SQL Server 2005 development machine, we did install SP2

however, that doesn't solve the problem because the problem lies in scheduling your job using Management Studio through your local machine. If you logged onto your SQL 2005 server that has SP2, you should be able to schedule from there. But it's through Management Studio, which I'm guessing most of you are trying to create a job schedule for your packages. Usually, people don't think of upgrading their client tools as well.

I verified this by upgrading my local machine to SP2 for the client tools and was able to successfully schedule. You might also need to upgrade your server machine to SP2 to work as well.

I hope this helps.

-SX

|||

I finally uninstalled all SQL related products and services, reinstalled everything, added hot fixes and finally we have two of the three servers working--mostly. There are still occaisional errors, but most seem limited to SSMS' and its UI

I haven't rolled SP2 to production yet and won't be adding any new SQL servers to our mix until this mess settles. I thought we'd be going to some of the better features (like Mirroring) later this year but now it'll be Q1'08 at the earliest.

Haven't had this much fun since SQL2KSP4! Keep smiling....

|||

Hello Visgor Allen and others!

Thank you for reporting this problem, and sorry for the problems that you are experiencing.

I'd like to understand this issue better so we can provide guidance to other customers. Can somebody on this thread please provide more details on how to repro this problem:

1) What is the initial configuration on both server and client machines (if different)? Is it SQL Server 2005 RTM or SP1?

2) Does the problem reproduce after upgrading client/server/both machines to SP2?

3) From what machine (client/server) are you trying to create a new job?

Thanks in advance!

|||

Unable to create new jobs in sql 2005, SSIS service is running. Finally i was surfing net for solution and understood need to install SP2 in my machine. But if i need to create new jobs in remote system what should i do.

Please suggest me a solution.

Can not create Job on SQL2005

Could not create SQL jobs. Getting Error:

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type
'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)

- Tried several different job types, always same result.
- Installing SP1 or SP2 does not help.
- Installing with or without Integration Service does not help.

Any help is highly appreciated

Thanks.

Try this:

Dim strDBName As String
Dim strJobID As Guid
Dim jobDumpJob As Job
Dim jbsDumpJobStep As JobStep
Dim intStepID As Integer

' Connect to the server
Dim srvMgmtServer As Server
srvMgmtServer = New Server("MyServer")
Dim srvConn As ServerConnection
srvConn = srvMgmtServer.ConnectionContext
srvConn.LoginSecure = True

strDBName = dbDatabase.Name
jobDumpJob = New Job(srvMgmtServer.JobServer, "YourJobName")
jobDumpJob.Description = "Job Description"
jobDumpJob.Category = "[Uncategorized (Local)]"
jobDumpJob.OwnerLoginName = "sa"
jobDumpJob.Create()
strJobID = jobDumpJob.JobID

jbsDumpJobStep = New JobStep(jobDumpJob, "Step 1")
jbsDumpJobStep.DatabaseName = "UserDB"
jbsDumpJobStep.Command = "TSQL command"
jbsDumpJobStep.OnSuccessAction = StepCompletionAction.QuitWithSuccess
jbsDumpJobStep.OnFailAction = StepCompletionAction.QuitWithFailure
jbsDumpJobStep.Create()
intStepID = jbsDumpJobStep.ID

jobDumpJob.ApplyToTargetServer(srvMgmtServer.Name)
jobDumpJob.StartStepID = intStepID
jobDumpJob.Alter()

|||

Hi

I am also having this problem.

Im trying to create a job to run SQL Server Integration Package.

The Code that you have given above. What is that for?

Thanks

|||This code uses SMO in VB.Net to create a job to execute a TSQL command. Browse around in ObjectBrowser and you should find the properties necessary to execute a SSIS package.|||

I can execute the SISS Package.

But i want to execute it within a job.

Is there any tutorials for creating jobs that i could look at?

|||for some reason it works on an another machine. I dont no why.|||

I figured it out. Despite you could install Management Tool on any computer it will work only on machine that have SQL Server 2005 SP2 installed.

|||Try installing SP2 for the client components on all computers taht run management studio, reboot, then try again from management studio client.|||

Identical problems here--also tried the new hotfix as well.

We've held off rolling out SP2 due to these and other errors. Until someone deals with these problems I suppose my company is stuck.

|||Check whether Distributed Transaction Coordinator service is started. If not, start it and try again.|||

We have a sql2005 installation that I've created jobs on routinely for months and then today we hit this message. I'm not going to install SP2 just yet since some users report that it doesn't help.

The details from the error message are as follows. Any help would be much appreciated. I deleted all SSIS packages and Jobs with no luck. We've rebooted and cycled services per suggestions from users.

The original error message:

TITLE: Microsoft SQL Server Management Studio

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)


BUTTONS:

OK

Technical details

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

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)


Program Location:

at Microsoft.SqlServer.Management.Smo.Agent.JobCollection.GetObjectByKey(ObjectKeyBase key)
at Microsoft.SqlServer.Management.Smo.SimpleObjectCollectionBase.Contains(String name)
at Microsoft.SqlServer.Management.SqlManagerUI.JobData.JobExists(String jobName)
at Microsoft.SqlServer.Management.SqlManagerUI.JobData.ApplyChanges()
at Microsoft.SqlServer.Management.SqlManagerUI.JobPropertySheet.DoPreProcessExecution(RunType runType, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.DoPreProcessExecutionAndRunViews(RunType runType)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.ExecuteForSql(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.Microsoft.SqlServer.Management.SqlMgmt.IExecutionAwareSqlControlCollection.PreProcessExecution(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.RunNow(RunType runType, Object sender)

|||

Hi folks,

I too had the same exact error when trying to schedule a package. After reading numerous posts and forums, some people have said

SP2 solved their problems and some said it didn't.

Here's what I did to get it to work.

On our SQL Server 2005 development machine, we did install SP2

however, that doesn't solve the problem because the problem lies in scheduling your job using Management Studio through your local machine. If you logged onto your SQL 2005 server that has SP2, you should be able to schedule from there. But it's through Management Studio, which I'm guessing most of you are trying to create a job schedule for your packages. Usually, people don't think of upgrading their client tools as well.

I verified this by upgrading my local machine to SP2 for the client tools and was able to successfully schedule. You might also need to upgrade your server machine to SP2 to work as well.

I hope this helps.

-SX

|||

I finally uninstalled all SQL related products and services, reinstalled everything, added hot fixes and finally we have two of the three servers working--mostly. There are still occaisional errors, but most seem limited to SSMS' and its UI

I haven't rolled SP2 to production yet and won't be adding any new SQL servers to our mix until this mess settles. I thought we'd be going to some of the better features (like Mirroring) later this year but now it'll be Q1'08 at the earliest.

Haven't had this much fun since SQL2KSP4! Keep smiling....

|||

Hello Visgor Allen and others!

Thank you for reporting this problem, and sorry for the problems that you are experiencing.

I'd like to understand this issue better so we can provide guidance to other customers. Can somebody on this thread please provide more details on how to repro this problem:

1) What is the initial configuration on both server and client machines (if different)? Is it SQL Server 2005 RTM or SP1?

2) Does the problem reproduce after upgrading client/server/both machines to SP2?

3) From what machine (client/server) are you trying to create a new job?

Thanks in advance!

|||

Unable to create new jobs in sql 2005, SSIS service is running. Finally i was surfing net for solution and understood need to install SP2 in my machine. But if i need to create new jobs in remote system what should i do.

Please suggest me a solution.

Can not create Job on SQL2005

Could not create SQL jobs. Getting Error:

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type
'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)

- Tried several different job types, always same result.
- Installing SP1 or SP2 does not help.
- Installing with or without Integration Service does not help.

Any help is highly appreciated

Thanks.

Try this:

Dim strDBName As String
Dim strJobID As Guid
Dim jobDumpJob As Job
Dim jbsDumpJobStep As JobStep
Dim intStepID As Integer

' Connect to the server
Dim srvMgmtServer As Server
srvMgmtServer = New Server("MyServer")
Dim srvConn As ServerConnection
srvConn = srvMgmtServer.ConnectionContext
srvConn.LoginSecure = True

strDBName = dbDatabase.Name
jobDumpJob = New Job(srvMgmtServer.JobServer, "YourJobName")
jobDumpJob.Description = "Job Description"
jobDumpJob.Category = "[Uncategorized (Local)]"
jobDumpJob.OwnerLoginName = "sa"
jobDumpJob.Create()
strJobID = jobDumpJob.JobID

jbsDumpJobStep = New JobStep(jobDumpJob, "Step 1")
jbsDumpJobStep.DatabaseName = "UserDB"
jbsDumpJobStep.Command = "TSQL command"
jbsDumpJobStep.OnSuccessAction = StepCompletionAction.QuitWithSuccess
jbsDumpJobStep.OnFailAction = StepCompletionAction.QuitWithFailure
jbsDumpJobStep.Create()
intStepID = jbsDumpJobStep.ID

jobDumpJob.ApplyToTargetServer(srvMgmtServer.Name)
jobDumpJob.StartStepID = intStepID
jobDumpJob.Alter()

|||

Hi

I am also having this problem.

Im trying to create a job to run SQL Server Integration Package.

The Code that you have given above. What is that for?

Thanks

|||This code uses SMO in VB.Net to create a job to execute a TSQL command. Browse around in ObjectBrowser and you should find the properties necessary to execute a SSIS package.|||

I can execute the SISS Package.

But i want to execute it within a job.

Is there any tutorials for creating jobs that i could look at?

|||for some reason it works on an another machine. I dont no why.|||

I figured it out. Despite you could install Management Tool on any computer it will work only on machine that have SQL Server 2005 SP2 installed.

|||Try installing SP2 for the client components on all computers taht run management studio, reboot, then try again from management studio client.|||

Identical problems here--also tried the new hotfix as well.

We've held off rolling out SP2 due to these and other errors. Until someone deals with these problems I suppose my company is stuck.

|||Check whether Distributed Transaction Coordinator service is started. If not, start it and try again.|||

We have a sql2005 installation that I've created jobs on routinely for months and then today we hit this message. I'm not going to install SP2 just yet since some users report that it doesn't help.

The details from the error message are as follows. Any help would be much appreciated. I deleted all SSIS packages and Jobs with no luck. We've rebooted and cycled services per suggestions from users.

The original error message:

TITLE: Microsoft SQL Server Management Studio

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)


BUTTONS:

OK

Technical details

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

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)


Program Location:

at Microsoft.SqlServer.Management.Smo.Agent.JobCollection.GetObjectByKey(ObjectKeyBase key)
at Microsoft.SqlServer.Management.Smo.SimpleObjectCollectionBase.Contains(String name)
at Microsoft.SqlServer.Management.SqlManagerUI.JobData.JobExists(String jobName)
at Microsoft.SqlServer.Management.SqlManagerUI.JobData.ApplyChanges()
at Microsoft.SqlServer.Management.SqlManagerUI.JobPropertySheet.DoPreProcessExecution(RunType runType, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.DoPreProcessExecutionAndRunViews(RunType runType)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.ExecuteForSql(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.Microsoft.SqlServer.Management.SqlMgmt.IExecutionAwareSqlControlCollection.PreProcessExecution(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.RunNow(RunType runType, Object sender)

|||

Hi folks,

I too had the same exact error when trying to schedule a package. After reading numerous posts and forums, some people have said

SP2 solved their problems and some said it didn't.

Here's what I did to get it to work.

On our SQL Server 2005 development machine, we did install SP2

however, that doesn't solve the problem because the problem lies in scheduling your job using Management Studio through your local machine. If you logged onto your SQL 2005 server that has SP2, you should be able to schedule from there. But it's through Management Studio, which I'm guessing most of you are trying to create a job schedule for your packages. Usually, people don't think of upgrading their client tools as well.

I verified this by upgrading my local machine to SP2 for the client tools and was able to successfully schedule. You might also need to upgrade your server machine to SP2 to work as well.

I hope this helps.

-SX

|||

I finally uninstalled all SQL related products and services, reinstalled everything, added hot fixes and finally we have two of the three servers working--mostly. There are still occaisional errors, but most seem limited to SSMS' and its UI

I haven't rolled SP2 to production yet and won't be adding any new SQL servers to our mix until this mess settles. I thought we'd be going to some of the better features (like Mirroring) later this year but now it'll be Q1'08 at the earliest.

Haven't had this much fun since SQL2KSP4! Keep smiling....

|||

Hello Visgor Allen and others!

Thank you for reporting this problem, and sorry for the problems that you are experiencing.

I'd like to understand this issue better so we can provide guidance to other customers. Can somebody on this thread please provide more details on how to repro this problem:

1) What is the initial configuration on both server and client machines (if different)? Is it SQL Server 2005 RTM or SP1?

2) Does the problem reproduce after upgrading client/server/both machines to SP2?

3) From what machine (client/server) are you trying to create a new job?

Thanks in advance!

|||

Unable to create new jobs in sql 2005, SSIS service is running. Finally i was surfing net for solution and understood need to install SP2 in my machine. But if i need to create new jobs in remote system what should i do.

Please suggest me a solution.

Can not create Job on SQL2005

Could not create SQL jobs. Getting Error:

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type
'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)

- Tried several different job types, always same result.
- Installing SP1 or SP2 does not help.
- Installing with or without Integration Service does not help.

Any help is highly appreciated

Thanks.

Try this:

Dim strDBName As String
Dim strJobID As Guid
Dim jobDumpJob As Job
Dim jbsDumpJobStep As JobStep
Dim intStepID As Integer

' Connect to the server
Dim srvMgmtServer As Server
srvMgmtServer = New Server("MyServer")
Dim srvConn As ServerConnection
srvConn = srvMgmtServer.ConnectionContext
srvConn.LoginSecure = True

strDBName = dbDatabase.Name
jobDumpJob = New Job(srvMgmtServer.JobServer, "YourJobName")
jobDumpJob.Description = "Job Description"
jobDumpJob.Category = "[Uncategorized (Local)]"
jobDumpJob.OwnerLoginName = "sa"
jobDumpJob.Create()
strJobID = jobDumpJob.JobID

jbsDumpJobStep = New JobStep(jobDumpJob, "Step 1")
jbsDumpJobStep.DatabaseName = "UserDB"
jbsDumpJobStep.Command = "TSQL command"
jbsDumpJobStep.OnSuccessAction = StepCompletionAction.QuitWithSuccess
jbsDumpJobStep.OnFailAction = StepCompletionAction.QuitWithFailure
jbsDumpJobStep.Create()
intStepID = jbsDumpJobStep.ID

jobDumpJob.ApplyToTargetServer(srvMgmtServer.Name)
jobDumpJob.StartStepID = intStepID
jobDumpJob.Alter()

|||

Hi

I am also having this problem.

Im trying to create a job to run SQL Server Integration Package.

The Code that you have given above. What is that for?

Thanks

|||This code uses SMO in VB.Net to create a job to execute a TSQL command. Browse around in ObjectBrowser and you should find the properties necessary to execute a SSIS package.|||

I can execute the SISS Package.

But i want to execute it within a job.

Is there any tutorials for creating jobs that i could look at?

|||for some reason it works on an another machine. I dont no why.|||

I figured it out. Despite you could install Management Tool on any computer it will work only on machine that have SQL Server 2005 SP2 installed.

|||Try installing SP2 for the client components on all computers taht run management studio, reboot, then try again from management studio client.|||

Identical problems here--also tried the new hotfix as well.

We've held off rolling out SP2 due to these and other errors. Until someone deals with these problems I suppose my company is stuck.

|||Check whether Distributed Transaction Coordinator service is started. If not, start it and try again.|||

We have a sql2005 installation that I've created jobs on routinely for months and then today we hit this message. I'm not going to install SP2 just yet since some users report that it doesn't help.

The details from the error message are as follows. Any help would be much appreciated. I deleted all SSIS packages and Jobs with no luck. We've rebooted and cycled services per suggestions from users.

The original error message:

TITLE: Microsoft SQL Server Management Studio

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)


BUTTONS:

OK

Technical details

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

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)


Program Location:

at Microsoft.SqlServer.Management.Smo.Agent.JobCollection.GetObjectByKey(ObjectKeyBase key)
at Microsoft.SqlServer.Management.Smo.SimpleObjectCollectionBase.Contains(String name)
at Microsoft.SqlServer.Management.SqlManagerUI.JobData.JobExists(String jobName)
at Microsoft.SqlServer.Management.SqlManagerUI.JobData.ApplyChanges()
at Microsoft.SqlServer.Management.SqlManagerUI.JobPropertySheet.DoPreProcessExecution(RunType runType, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.DoPreProcessExecutionAndRunViews(RunType runType)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.ExecuteForSql(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.Microsoft.SqlServer.Management.SqlMgmt.IExecutionAwareSqlControlCollection.PreProcessExecution(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.RunNow(RunType runType, Object sender)

|||

Hi folks,

I too had the same exact error when trying to schedule a package. After reading numerous posts and forums, some people have said

SP2 solved their problems and some said it didn't.

Here's what I did to get it to work.

On our SQL Server 2005 development machine, we did install SP2

however, that doesn't solve the problem because the problem lies in scheduling your job using Management Studio through your local machine. If you logged onto your SQL 2005 server that has SP2, you should be able to schedule from there. But it's through Management Studio, which I'm guessing most of you are trying to create a job schedule for your packages. Usually, people don't think of upgrading their client tools as well.

I verified this by upgrading my local machine to SP2 for the client tools and was able to successfully schedule. You might also need to upgrade your server machine to SP2 to work as well.

I hope this helps.

-SX

|||

I finally uninstalled all SQL related products and services, reinstalled everything, added hot fixes and finally we have two of the three servers working--mostly. There are still occaisional errors, but most seem limited to SSMS' and its UI

I haven't rolled SP2 to production yet and won't be adding any new SQL servers to our mix until this mess settles. I thought we'd be going to some of the better features (like Mirroring) later this year but now it'll be Q1'08 at the earliest.

Haven't had this much fun since SQL2KSP4! Keep smiling....

|||

Hello Visgor Allen and others!

Thank you for reporting this problem, and sorry for the problems that you are experiencing.

I'd like to understand this issue better so we can provide guidance to other customers. Can somebody on this thread please provide more details on how to repro this problem:

1) What is the initial configuration on both server and client machines (if different)? Is it SQL Server 2005 RTM or SP1?

2) Does the problem reproduce after upgrading client/server/both machines to SP2?

3) From what machine (client/server) are you trying to create a new job?

Thanks in advance!

|||

Unable to create new jobs in sql 2005, SSIS service is running. Finally i was surfing net for solution and understood need to install SP2 in my machine. But if i need to create new jobs in remote system what should i do.

Please suggest me a solution.

sql

Can not create Job on SQL2005

Could not create SQL jobs. Getting Error:

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type
'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)

- Tried several different job types, always same result.
- Installing SP1 or SP2 does not help.
- Installing with or without Integration Service does not help.

Any help is highly appreciated

Thanks.

Try this:

Dim strDBName As String
Dim strJobID As Guid
Dim jobDumpJob As Job
Dim jbsDumpJobStep As JobStep
Dim intStepID As Integer

' Connect to the server
Dim srvMgmtServer As Server
srvMgmtServer = New Server("MyServer")
Dim srvConn As ServerConnection
srvConn = srvMgmtServer.ConnectionContext
srvConn.LoginSecure = True

strDBName = dbDatabase.Name
jobDumpJob = New Job(srvMgmtServer.JobServer, "YourJobName")
jobDumpJob.Description = "Job Description"
jobDumpJob.Category = "[Uncategorized (Local)]"
jobDumpJob.OwnerLoginName = "sa"
jobDumpJob.Create()
strJobID = jobDumpJob.JobID

jbsDumpJobStep = New JobStep(jobDumpJob, "Step 1")
jbsDumpJobStep.DatabaseName = "UserDB"
jbsDumpJobStep.Command = "TSQL command"
jbsDumpJobStep.OnSuccessAction = StepCompletionAction.QuitWithSuccess
jbsDumpJobStep.OnFailAction = StepCompletionAction.QuitWithFailure
jbsDumpJobStep.Create()
intStepID = jbsDumpJobStep.ID

jobDumpJob.ApplyToTargetServer(srvMgmtServer.Name)
jobDumpJob.StartStepID = intStepID
jobDumpJob.Alter()

|||

Hi

I am also having this problem.

Im trying to create a job to run SQL Server Integration Package.

The Code that you have given above. What is that for?

Thanks

|||This code uses SMO in VB.Net to create a job to execute a TSQL command. Browse around in ObjectBrowser and you should find the properties necessary to execute a SSIS package.|||

I can execute the SISS Package.

But i want to execute it within a job.

Is there any tutorials for creating jobs that i could look at?

|||for some reason it works on an another machine. I dont no why.|||

I figured it out. Despite you could install Management Tool on any computer it will work only on machine that have SQL Server 2005 SP2 installed.

|||Try installing SP2 for the client components on all computers taht run management studio, reboot, then try again from management studio client.|||

Identical problems here--also tried the new hotfix as well.

We've held off rolling out SP2 due to these and other errors. Until someone deals with these problems I suppose my company is stuck.

|||Check whether Distributed Transaction Coordinator service is started. If not, start it and try again.|||

We have a sql2005 installation that I've created jobs on routinely for months and then today we hit this message. I'm not going to install SP2 just yet since some users report that it doesn't help.

The details from the error message are as follows. Any help would be much appreciated. I deleted all SSIS packages and Jobs with no luck. We've rebooted and cycled services per suggestions from users.

The original error message:

TITLE: Microsoft SQL Server Management Studio

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)


BUTTONS:

OK

Technical details

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

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)


Program Location:

at Microsoft.SqlServer.Management.Smo.Agent.JobCollection.GetObjectByKey(ObjectKeyBase key)
at Microsoft.SqlServer.Management.Smo.SimpleObjectCollectionBase.Contains(String name)
at Microsoft.SqlServer.Management.SqlManagerUI.JobData.JobExists(String jobName)
at Microsoft.SqlServer.Management.SqlManagerUI.JobData.ApplyChanges()
at Microsoft.SqlServer.Management.SqlManagerUI.JobPropertySheet.DoPreProcessExecution(RunType runType, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.DoPreProcessExecutionAndRunViews(RunType runType)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.ExecuteForSql(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.Microsoft.SqlServer.Management.SqlMgmt.IExecutionAwareSqlControlCollection.PreProcessExecution(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.RunNow(RunType runType, Object sender)

|||

Hi folks,

I too had the same exact error when trying to schedule a package. After reading numerous posts and forums, some people have said

SP2 solved their problems and some said it didn't.

Here's what I did to get it to work.

On our SQL Server 2005 development machine, we did install SP2

however, that doesn't solve the problem because the problem lies in scheduling your job using Management Studio through your local machine. If you logged onto your SQL 2005 server that has SP2, you should be able to schedule from there. But it's through Management Studio, which I'm guessing most of you are trying to create a job schedule for your packages. Usually, people don't think of upgrading their client tools as well.

I verified this by upgrading my local machine to SP2 for the client tools and was able to successfully schedule. You might also need to upgrade your server machine to SP2 to work as well.

I hope this helps.

-SX

|||

I finally uninstalled all SQL related products and services, reinstalled everything, added hot fixes and finally we have two of the three servers working--mostly. There are still occaisional errors, but most seem limited to SSMS' and its UI

I haven't rolled SP2 to production yet and won't be adding any new SQL servers to our mix until this mess settles. I thought we'd be going to some of the better features (like Mirroring) later this year but now it'll be Q1'08 at the earliest.

Haven't had this much fun since SQL2KSP4! Keep smiling....

|||

Hello Visgor Allen and others!

Thank you for reporting this problem, and sorry for the problems that you are experiencing.

I'd like to understand this issue better so we can provide guidance to other customers. Can somebody on this thread please provide more details on how to repro this problem:

1) What is the initial configuration on both server and client machines (if different)? Is it SQL Server 2005 RTM or SP1?

2) Does the problem reproduce after upgrading client/server/both machines to SP2?

3) From what machine (client/server) are you trying to create a new job?

Thanks in advance!

|||

Unable to create new jobs in sql 2005, SSIS service is running. Finally i was surfing net for solution and understood need to install SP2 in my machine. But if i need to create new jobs in remote system what should i do.

Please suggest me a solution.

Can not create Job on SQL2005

Could not create SQL jobs. Getting Error:

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type
'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)

- Tried several different job types, always same result.
- Installing SP1 or SP2 does not help.
- Installing with or without Integration Service does not help.

Any help is highly appreciated

Thanks.

Try this:

Dim strDBName As String
Dim strJobID As Guid
Dim jobDumpJob As Job
Dim jbsDumpJobStep As JobStep
Dim intStepID As Integer

' Connect to the server
Dim srvMgmtServer As Server
srvMgmtServer = New Server("MyServer")
Dim srvConn As ServerConnection
srvConn = srvMgmtServer.ConnectionContext
srvConn.LoginSecure = True

strDBName = dbDatabase.Name
jobDumpJob = New Job(srvMgmtServer.JobServer, "YourJobName")
jobDumpJob.Description = "Job Description"
jobDumpJob.Category = "[Uncategorized (Local)]"
jobDumpJob.OwnerLoginName = "sa"
jobDumpJob.Create()
strJobID = jobDumpJob.JobID

jbsDumpJobStep = New JobStep(jobDumpJob, "Step 1")
jbsDumpJobStep.DatabaseName = "UserDB"
jbsDumpJobStep.Command = "TSQL command"
jbsDumpJobStep.OnSuccessAction = StepCompletionAction.QuitWithSuccess
jbsDumpJobStep.OnFailAction = StepCompletionAction.QuitWithFailure
jbsDumpJobStep.Create()
intStepID = jbsDumpJobStep.ID

jobDumpJob.ApplyToTargetServer(srvMgmtServer.Name)
jobDumpJob.StartStepID = intStepID
jobDumpJob.Alter()

|||

Hi

I am also having this problem.

Im trying to create a job to run SQL Server Integration Package.

The Code that you have given above. What is that for?

Thanks

|||This code uses SMO in VB.Net to create a job to execute a TSQL command. Browse around in ObjectBrowser and you should find the properties necessary to execute a SSIS package.|||

I can execute the SISS Package.

But i want to execute it within a job.

Is there any tutorials for creating jobs that i could look at?

|||for some reason it works on an another machine. I dont no why.|||

I figured it out. Despite you could install Management Tool on any computer it will work only on machine that have SQL Server 2005 SP2 installed.

|||Try installing SP2 for the client components on all computers taht run management studio, reboot, then try again from management studio client.|||

Identical problems here--also tried the new hotfix as well.

We've held off rolling out SP2 due to these and other errors. Until someone deals with these problems I suppose my company is stuck.

|||Check whether Distributed Transaction Coordinator service is started. If not, start it and try again.|||

We have a sql2005 installation that I've created jobs on routinely for months and then today we hit this message. I'm not going to install SP2 just yet since some users report that it doesn't help.

The details from the error message are as follows. Any help would be much appreciated. I deleted all SSIS packages and Jobs with no luck. We've rebooted and cycled services per suggestions from users.

The original error message:

TITLE: Microsoft SQL Server Management Studio

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)


BUTTONS:

OK

Technical details

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

Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)


Program Location:

at Microsoft.SqlServer.Management.Smo.Agent.JobCollection.GetObjectByKey(ObjectKeyBase key)
at Microsoft.SqlServer.Management.Smo.SimpleObjectCollectionBase.Contains(String name)
at Microsoft.SqlServer.Management.SqlManagerUI.JobData.JobExists(String jobName)
at Microsoft.SqlServer.Management.SqlManagerUI.JobData.ApplyChanges()
at Microsoft.SqlServer.Management.SqlManagerUI.JobPropertySheet.DoPreProcessExecution(RunType runType, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.DoPreProcessExecutionAndRunViews(RunType runType)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.ExecuteForSql(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.Microsoft.SqlServer.Management.SqlMgmt.IExecutionAwareSqlControlCollection.PreProcessExecution(PreProcessExecutionInfo executionInfo, ExecutionMode& executionResult)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.RunNow(RunType runType, Object sender)

|||

Hi folks,

I too had the same exact error when trying to schedule a package. After reading numerous posts and forums, some people have said

SP2 solved their problems and some said it didn't.

Here's what I did to get it to work.

On our SQL Server 2005 development machine, we did install SP2

however, that doesn't solve the problem because the problem lies in scheduling your job using Management Studio through your local machine. If you logged onto your SQL 2005 server that has SP2, you should be able to schedule from there. But it's through Management Studio, which I'm guessing most of you are trying to create a job schedule for your packages. Usually, people don't think of upgrading their client tools as well.

I verified this by upgrading my local machine to SP2 for the client tools and was able to successfully schedule. You might also need to upgrade your server machine to SP2 to work as well.

I hope this helps.

-SX

|||

I finally uninstalled all SQL related products and services, reinstalled everything, added hot fixes and finally we have two of the three servers working--mostly. There are still occaisional errors, but most seem limited to SSMS' and its UI

I haven't rolled SP2 to production yet and won't be adding any new SQL servers to our mix until this mess settles. I thought we'd be going to some of the better features (like Mirroring) later this year but now it'll be Q1'08 at the earliest.

Haven't had this much fun since SQL2KSP4! Keep smiling....

|||

Hello Visgor Allen and others!

Thank you for reporting this problem, and sorry for the problems that you are experiencing.

I'd like to understand this issue better so we can provide guidance to other customers. Can somebody on this thread please provide more details on how to repro this problem:

1) What is the initial configuration on both server and client machines (if different)? Is it SQL Server 2005 RTM or SP1?

2) Does the problem reproduce after upgrading client/server/both machines to SP2?

3) From what machine (client/server) are you trying to create a new job?

Thanks in advance!

|||

Unable to create new jobs in sql 2005, SSIS service is running. Finally i was surfing net for solution and understood need to install SP2 in my machine. But if i need to create new jobs in remote system what should i do.

Please suggest me a solution.