Showing posts with label management. Show all posts
Showing posts with label management. Show all posts

Tuesday, March 27, 2012

Can not find Microsoft.SqlServer.InstApi when trying to run a SMO trace

I install the follwing components

1.Microsoft SQL Server 2005 Management Objects Collection

2.Microsoft Core XML Services (MSXML) 6.0

3.Microsoft SQL Server Native Client

(available from http://www.microsoft.com/downloads/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&DisplayLang=en)

on a clean machine with no SQL Server 2005 client tools.

I get the following error.

Failed to initialize object as reader.
Could not load file or assembly 'Microsoft.SqlServer.Instapi, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

A gacutil tells me that this assembly is not installed.

Is there are way to run SMO trace without having to install the 2005 client tools and only the Management Objects Collection and necessary components?

Sample code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.SqlServer.Management.Trace;
using Microsoft.SqlServer.Management.Common;


namespace SMOTraceTestProgram
{
public partial class Form1 : Form
{

public Form1()
{
InitializeComponent();
}


private void bStart_Click(object sender, EventArgs e)
{


TraceServer smoTraceServerReader;

ConnectionInfoBase cInfoBase = new SqlConnectionInfo();
SetupConnectionInfoBase((cInfoBase as SqlConnectionInfo));

smoTraceServerReader = new TraceServer();

try
{
smoTraceServerReader.InitializeAsReader(cInfoBase, "2005NOSPIDFilter.tdf");
smoTraceServerReader.Stop();
MessageBox.Show("Trace Started and stopped successfully");
}
catch (Exception exception)
{
StringBuilder sb = new StringBuilder();
sb.Append(exception.Message);

Exception ex = exception.InnerException;
while(ex != null)
{
sb.Append(ex.Message);
ex = ex.InnerException;
}
MessageBox.Show(sb.ToString());
}

}

private void SetupConnectionInfoBase(SqlConnectionInfo sqlConnectionInfo)
{
sqlConnectionInfo.ServerName = eSeverName.Text;


if (eUserName.Text.Length > 0)
{
sqlConnectionInfo.UserName = eUserName.Text;
sqlConnectionInfo.Password = ePassword.Text;
sqlConnectionInfo.UseIntegratedSecurity = false;
}
else
{
sqlConnectionInfo.UseIntegratedSecurity = true;
}

}

}
}

I have reproduced this issue in house and can confirm that this is a problem with the Microsoft SQL Server 2005 Management Objects Collection. We will consider this issue for inclusion in Service Pack 2.

As for workarounds, I don't have one. I tried Gac'cing the missing DLL, but there is apparently more registration required, as evidenced by the new error message I got. ("Failed to initialize object as reader.Failed to get SQL Tools directory path from InstAPI.")

|||

Thanks James,

Appreciate the feedback. For the time being I will get the users of my profiling tool to install management tools from the SQL Server 2005 Install. This seems to install the necessary components for SMO Trace to work.

Look forward to a fix though, as this installs a lot more than is required.

sql

can not drop user from database

I can not delete user from a database in sql2005 beta 3.
the message errror is :

TITLE: SQL Server Management Studio
-

Drop failed for User 'Amministratore'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft SQL Server&ProdVer=9.00.0981.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+User&LinkId=20476

-
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

-

The database principal owns a schema and cannot be dropped. (Microsoft SQL Server, Error: 15138)

in sql 2000 I can delete the user very easy, but in sql 2005 I don't understant How to do it.

In SQL Server 2005, schemas are real entities. You cannot drop a user that owns schemas; you first have to either drop the schemas or change their owner to be another user.

Thanks
Laurentiu

|||

The previous answer is helpful. I am just elaborating for newbies in SQL 2005.

1) Expand Schemas(should be like a folder under <yourdatabase> -> Security) .
2) Delete the unwanted "userSchema".
3) Then, go back to the User(a folder like thing) and delete it.

|||

Hi,

I am having the same problem. When i went to delete the schema..i got the error message "drop failed for schema"

Cannot drop schema 'wch1' because it is being referenced by object 'Alert_List'. (.Net SqlClient Data Provider)

any suggestions?

|||

Before dropping a schema, it must be empty. Looks like in your case, you still have an object in the schema: Alert_List. You may either choose to drop this object first or you may choose to move it to another schema (using ALTER SCHEMA TRANSFER). When the schema will be empty, you will be able to drop it.

Thanks
Laurentiu

|||Is there any way i can tell what objects my schema has?|||

You can query the catalogs. For example, you can execute the following query:

select * from sys.objects where schema_id = schema_id('s')

to find out the objects that reside in schema 's'.

Thanks
Laurentiu

|||

I also had this problem.I was not able to find out which Schema that the login owned.I do not know of a stored proc function that will list ownership of schemas given an owner.Maybe someone can add that to this thread.

I was able to see which schemas were owned by the login by viewing the properties of each schema and seeing who what listed as the owner.

Example:

I opened the properties window of schema db_datareader and notices that the owner was User1.I changed the owner to be db_datareader and then was able to drop user1.

Regards,

DataSort

|||

Schemas are owned by users, not by logins. In SQL Server, logins and users are not the same thing.

To find out the schemas owned by a user, you can run the following query:

select * from sys.schemas where principal_id = user_id('user_name')

Thanks
Laurentiu

|||Thank you!

can not drop user from database

I can not delete user from a database in sql2005 beta 3.
the message errror is :

TITLE: SQL Server Management Studio
-

Drop failed for User 'Amministratore'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft SQL Server&ProdVer=9.00.0981.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+User&LinkId=20476

-
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

-

The database principal owns a schema and cannot be dropped. (Microsoft SQL Server, Error: 15138)

in sql 2000 I can delete the user very easy, but in sql 2005 I don't understant How to do it.

In SQL Server 2005, schemas are real entities. You cannot drop a user that owns schemas; you first have to either drop the schemas or change their owner to be another user.

Thanks
Laurentiu

|||

The previous answer is helpful. I am just elaborating for newbies in SQL 2005.

1) Expand Schemas(should be like a folder under <yourdatabase> -> Security) .
2) Delete the unwanted "userSchema".
3) Then, go back to the User(a folder like thing) and delete it.

|||

Hi,

I am having the same problem. When i went to delete the schema..i got the error message "drop failed for schema"

Cannot drop schema 'wch1' because it is being referenced by object 'Alert_List'. (.Net SqlClient Data Provider)

any suggestions?

|||

Before dropping a schema, it must be empty. Looks like in your case, you still have an object in the schema: Alert_List. You may either choose to drop this object first or you may choose to move it to another schema (using ALTER SCHEMA TRANSFER). When the schema will be empty, you will be able to drop it.

Thanks
Laurentiu

|||Is there any way i can tell what objects my schema has?|||

You can query the catalogs. For example, you can execute the following query:

select * from sys.objects where schema_id = schema_id('s')

to find out the objects that reside in schema 's'.

Thanks
Laurentiu

|||

I also had this problem.I was not able to find out which Schema that the login owned.I do not know of a stored proc function that will list ownership of schemas given an owner.Maybe someone can add that to this thread.

I was able to see which schemas were owned by the login by viewing the properties of each schema and seeing who what listed as the owner.

Example:

I opened the properties window of schema db_datareader and notices that the owner was User1.I changed the owner to be db_datareader and then was able to drop user1.

Regards,

DataSort

|||

Schemas are owned by users, not by logins. In SQL Server, logins and users are not the same thing.

To find out the schemas owned by a user, you can run the following query:

select * from sys.schemas where principal_id = user_id('user_name')

Thanks
Laurentiu

|||Thank you!

can not drop user from database

I can not delete user from a database in sql2005 beta 3.
the message errror is :

TITLE: SQL Server Management Studio
-

Drop failed for User 'Amministratore'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft SQL Server&ProdVer=9.00.0981.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+User&LinkId=20476

-
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

-

The database principal owns a schema and cannot be dropped. (Microsoft SQL Server, Error: 15138)

in sql 2000 I can delete the user very easy, but in sql 2005 I don't understant How to do it.

In SQL Server 2005, schemas are real entities. You cannot drop a user that owns schemas; you first have to either drop the schemas or change their owner to be another user.

Thanks
Laurentiu

|||

The previous answer is helpful. I am just elaborating for newbies in SQL 2005.

1) Expand Schemas(should be like a folder under <yourdatabase> -> Security) .
2) Delete the unwanted "userSchema".
3) Then, go back to the User(a folder like thing) and delete it.

|||

Hi,

I am having the same problem. When i went to delete the schema..i got the error message "drop failed for schema"

Cannot drop schema 'wch1' because it is being referenced by object 'Alert_List'. (.Net SqlClient Data Provider)

any suggestions?

|||

Before dropping a schema, it must be empty. Looks like in your case, you still have an object in the schema: Alert_List. You may either choose to drop this object first or you may choose to move it to another schema (using ALTER SCHEMA TRANSFER). When the schema will be empty, you will be able to drop it.

Thanks
Laurentiu

|||Is there any way i can tell what objects my schema has?|||

You can query the catalogs. For example, you can execute the following query:

select * from sys.objects where schema_id = schema_id('s')

to find out the objects that reside in schema 's'.

Thanks
Laurentiu

|||

I also had this problem.I was not able to find out which Schema that the login owned.I do not know of a stored proc function that will list ownership of schemas given an owner.Maybe someone can add that to this thread.

I was able to see which schemas were owned by the login by viewing the properties of each schema and seeing who what listed as the owner.

Example:

I opened the properties window of schema db_datareader and notices that the owner was User1.I changed the owner to be db_datareader and then was able to drop user1.

Regards,

DataSort

|||

Schemas are owned by users, not by logins. In SQL Server, logins and users are not the same thing.

To find out the schemas owned by a user, you can run the following query:

select * from sys.schemas where principal_id = user_id('user_name')

Thanks
Laurentiu

|||Thank you!

can not drop user from database

I can not delete user from a database in sql2005 beta 3.
the message errror is :

TITLE: SQL Server Management Studio
-

Drop failed for User 'Amministratore'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft SQL Server&ProdVer=9.00.0981.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+User&LinkId=20476

-
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

-

The database principal owns a schema and cannot be dropped. (Microsoft SQL Server, Error: 15138)

in sql 2000 I can delete the user very easy, but in sql 2005 I don't understant How to do it.

In SQL Server 2005, schemas are real entities. You cannot drop a user that owns schemas; you first have to either drop the schemas or change their owner to be another user.

Thanks
Laurentiu

|||

The previous answer is helpful. I am just elaborating for newbies in SQL 2005.

1) Expand Schemas(should be like a folder under <yourdatabase> -> Security) .
2) Delete the unwanted "userSchema".
3) Then, go back to the User(a folder like thing) and delete it.

|||

Hi,

I am having the same problem. When i went to delete the schema..i got the error message "drop failed for schema"

Cannot drop schema 'wch1' because it is being referenced by object 'Alert_List'. (.Net SqlClient Data Provider)

any suggestions?

|||

Before dropping a schema, it must be empty. Looks like in your case, you still have an object in the schema: Alert_List. You may either choose to drop this object first or you may choose to move it to another schema (using ALTER SCHEMA TRANSFER). When the schema will be empty, you will be able to drop it.

Thanks
Laurentiu

|||Is there any way i can tell what objects my schema has?|||

You can query the catalogs. For example, you can execute the following query:

select * from sys.objects where schema_id = schema_id('s')

to find out the objects that reside in schema 's'.

Thanks
Laurentiu

|||

I also had this problem.I was not able to find out which Schema that the login owned.I do not know of a stored proc function that will list ownership of schemas given an owner.Maybe someone can add that to this thread.

I was able to see which schemas were owned by the login by viewing the properties of each schema and seeing who what listed as the owner.

Example:

I opened the properties window of schema db_datareader and notices that the owner was User1.I changed the owner to be db_datareader and then was able to drop user1.

Regards,

DataSort

|||

Schemas are owned by users, not by logins. In SQL Server, logins and users are not the same thing.

To find out the schemas owned by a user, you can run the following query:

select*fromsys.schemaswhere principal_id =user_id('user_name')

Thanks
Laurentiu

|||Thank you!

can not drop user from database

I can not delete user from a database in sql2005 beta 3.
the message errror is :

TITLE: SQL Server Management Studio
-

Drop failed for User 'Amministratore'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft SQL Server&ProdVer=9.00.0981.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+User&LinkId=20476

-
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

-

The database principal owns a schema and cannot be dropped. (Microsoft SQL Server, Error: 15138)

in sql 2000 I can delete the user very easy, but in sql 2005 I don't understant How to do it.

In SQL Server 2005, schemas are real entities. You cannot drop a user that owns schemas; you first have to either drop the schemas or change their owner to be another user.

Thanks
Laurentiu

|||

The previous answer is helpful. I am just elaborating for newbies in SQL 2005.

1) Expand Schemas(should be like a folder under <yourdatabase> -> Security) .
2) Delete the unwanted "userSchema".
3) Then, go back to the User(a folder like thing) and delete it.

|||

Hi,

I am having the same problem. When i went to delete the schema..i got the error message "drop failed for schema"

Cannot drop schema 'wch1' because it is being referenced by object 'Alert_List'. (.Net SqlClient Data Provider)

any suggestions?

|||

Before dropping a schema, it must be empty. Looks like in your case, you still have an object in the schema: Alert_List. You may either choose to drop this object first or you may choose to move it to another schema (using ALTER SCHEMA TRANSFER). When the schema will be empty, you will be able to drop it.

Thanks
Laurentiu

|||Is there any way i can tell what objects my schema has?|||

You can query the catalogs. For example, you can execute the following query:

select * from sys.objects where schema_id = schema_id('s')

to find out the objects that reside in schema 's'.

Thanks
Laurentiu

|||

I also had this problem.I was not able to find out which Schema that the login owned.I do not know of a stored proc function that will list ownership of schemas given an owner.Maybe someone can add that to this thread.

I was able to see which schemas were owned by the login by viewing the properties of each schema and seeing who what listed as the owner.

Example:

I opened the properties window of schema db_datareader and notices that the owner was User1.I changed the owner to be db_datareader and then was able to drop user1.

Regards,

DataSort

|||

Schemas are owned by users, not by logins. In SQL Server, logins and users are not the same thing.

To find out the schemas owned by a user, you can run the following query:

select * from sys.schemas where principal_id = user_id('user_name')

Thanks
Laurentiu

|||Thank you!
sql

Can not drop a member from a role

I've just changed server from SQL2000 to SQL2005 (by backup/restore).
But I can not drop a user from a role. I did it from Management Studio.
It didn't give any error message but even I refresh the db, I can still
see same user in the role.
Then I've tried sp_droprolemember 'X','Y' but same result. Does not
give any error message, looks like it did it. But user is still in the
role.
Even I'm server admin, I can not do it. I'll be happy if someone can
help me to solve the issue.
Thx
AvniCheck out sp_change_users_login. Run it to find the mismatched users, as
well as to correct the problem. Then, drop the role member.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
<avni.cengel@.gmail.com> wrote in message
news:1141984205.157637.62570@.u72g2000cwu.googlegroups.com...
I've just changed server from SQL2000 to SQL2005 (by backup/restore).
But I can not drop a user from a role. I did it from Management Studio.
It didn't give any error message but even I refresh the db, I can still
see same user in the role.
Then I've tried sp_droprolemember 'X','Y' but same result. Does not
give any error message, looks like it did it. But user is still in the
role.
Even I'm server admin, I can not do it. I'll be happy if someone can
help me to solve the issue.
Thx
Avni

Can not drop a member from a role

I've just changed server from SQL2000 to SQL2005 (by backup/restore).
But I can not drop a user from a role. I did it from Management Studio.
It didn't give any error message but even I refresh the db, I can still
see same user in the role.
Then I've tried sp_droprolemember 'X','Y' but same result. Does not
give any error message, looks like it did it. But user is still in the
role.
Even I'm server admin, I can not do it. I'll be happy if someone can
help me to solve the issue.
Thx
AvniCheck out sp_change_users_login. Run it to find the mismatched users, as
well as to correct the problem. Then, drop the role member.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
<avni.cengel@.gmail.com> wrote in message
news:1141984205.157637.62570@.u72g2000cwu.googlegroups.com...
I've just changed server from SQL2000 to SQL2005 (by backup/restore).
But I can not drop a user from a role. I did it from Management Studio.
It didn't give any error message but even I refresh the db, I can still
see same user in the role.
Then I've tried sp_droprolemember 'X','Y' but same result. Does not
give any error message, looks like it did it. But user is still in the
role.
Even I'm server admin, I can not do it. I'll be happy if someone can
help me to solve the issue.
Thx
Avni

Can not drop a member from a role

I've just changed server from SQL2000 to SQL2005 (by backup/restore).
But I can not drop a user from a role. I did it from Management Studio.
It didn't give any error message but even I refresh the db, I can still
see same user in the role.
Then I've tried sp_droprolemember 'X','Y' but same result. Does not
give any error message, looks like it did it. But user is still in the
role.
Even I'm server admin, I can not do it. I'll be happy if someone can
help me to solve the issue.
Thx
Avni
Check out sp_change_users_login. Run it to find the mismatched users, as
well as to correct the problem. Then, drop the role member.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
<avni.cengel@.gmail.com> wrote in message
news:1141984205.157637.62570@.u72g2000cwu.googlegro ups.com...
I've just changed server from SQL2000 to SQL2005 (by backup/restore).
But I can not drop a user from a role. I did it from Management Studio.
It didn't give any error message but even I refresh the db, I can still
see same user in the role.
Then I've tried sp_droprolemember 'X','Y' but same result. Does not
give any error message, looks like it did it. But user is still in the
role.
Even I'm server admin, I can not do it. I'll be happy if someone can
help me to solve the issue.
Thx
Avni
sql

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.

Thursday, March 22, 2012

can not connect to Report server from SQL SERVER 2005 Management studio

Hi All,

I have a brand new install of sql server 2005 on brand new WINDOWS SERVER2003 with latest versions. Every thing works fine excepting I get a 404 when I connect to report server from management studio..

I am even able to publish reports and all the

url://localhost/reportserver

url://localhost/reports

url://localhost/reportserver/reportbuilder/reportbuilder.application

all work fine on local machine and with in the network behind the fire wall.

But when I try to connect to report server using management studio on the local server or remote server, I get the following error.

"

TITLE: Microsoft SQL Server Management Studio

The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. (Microsoft.SqlServer.Management.UI.RSClient)


ADDITIONAL INFORMATION:

The request failed with HTTP status 404: Not Found. (Microsoft.SqlServer.Management.UI.RSClient)

"

More techinal details

"===================================

Cannot connect to xxxxxxxxxxxx.

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

The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. (Microsoft.SqlServer.Management.UI.RSClient)


Program Location:

at Microsoft.SqlServer.ReportingServices2005.RSConnection.MissingEndpointException.ThrowIfEndpointMissing(WebException e)
at Microsoft.SqlServer.ReportingServices2005.RSConnection.ValidateConnection()
at Microsoft.SqlServer.Management.UI.RSClient.RSClientConnection.CreateConnection(String connectionString)
at Microsoft.SqlServer.Management.UI.RSClient.RSConnectionInfo.CreateConnectionObject()
at Microsoft.SqlServer.Management.UI.RSClient.RSConnectionInfo.RSTypeImpl.GetConnectionObject(UIConnectionInfo ci)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.RSType.GetConnectionObject(UIConnectionInfo ci)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

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

The request failed with HTTP status 404: Not Found. (Microsoft.SqlServer.Management.UI.RSClient)


Program Location:

at Microsoft.SqlServer.ReportingServices2005.RSConnection.GetSecureMethods()
at Microsoft.SqlServer.ReportingServices2005.RSConnection.IsSecureMethod(String methodname)
at Microsoft.SqlServer.ReportingServices2005.RSConnection.ValidateConnection()

"

Any help would be greatly appreciated.

Bob

What are you passing in as the server name to Management Studio?

You can connect several ways

http://localhost/reportserver

servername

servername\instance

|||

I passed both the servername and the servername\instance to the management studio.

My IIS and uses port 80. I can access Reportserver, report manager and report bilder thru the Internet. I just can not connect to Report server from Management studio.

I will try connecting to RS is Management studo using http://localhost/reportserver.

Regards

Bobba

|||

Hi Brad Syputa,

Thank you for the suggestion. I worked. I was not able to try your suggestion immediatly as I was out of town.

Now I have this big question:

Why am I only able to connect to "report server" from "management studio" using

1. http://localhost/reportserver

and not using

2. servername

3. servername\instance.

Your help would save me a lot of time

Regards

Bobba(Bob)

|||

bobba wrote:

Hi Brad Syputa,

Thank you for the suggestion. I worked. I was not able to try your suggestion immediatly as I was out of town.

Now I have this big question:

Why am I only able to connect to "report server" from "management studio" using

1. http://localhost/reportserver

and not using

2. servername

3. servername\instance.

Your help would save me a lot of time

Regards

Bobba(Bob)

|||

Indeed, I am very interested in disvoering the answer. We had a developer in our organization with the same problem and could only connect by enterting http://localhost/reportserver. The DBA team is fine using servername\instance.

Is this a bug that will be resolved?

thanks in advance,

Jason Wall

|||You should be able to connect using machine\instance. This method uses WMI to get the url for SOAP calls. Will you try opening the report server config tool? Can this tool connect to the machine? Are you specifying the same instance name listed in the config tool connection dialog?|||

I have the same problem.

I can connect to the reporting service by using machine\instance in report server config tool.

But I cannot connect to the reporting service through managment studio by providing machine\instance, instead, if I use http://localhost/reportserver, I can connect to the report server through management studio.

I even tried to uninstall the report service, and reinstall it again. This problem still exists.

But the same thing does not happen on my colleague's machine.

I think it is better to look into this issue...

|||

I managed to solve this problem...

If you want to use machine\instance to connect Management studio.

You need to make sure in rsreportservice.config, element <UrlRoot>http://localhost/reportserver</UrlRoot> is correctly configured. (You can test this by visit this url)

I guess, the machine\instance will eventurally be translated to the <UrlRoot>. If the <UrlRoot> is not correct, then you will not be able to use machine\instance to connect report service.

|||the attempt to connect to the report server failed. check your connection information and that the report server is a compatible version(.Net 2003 version)|||I am try to solve this problem i give for this error"
  • The request failed with HTTP status 400: Bad Request. "
  • plz send me Slution|||hi all,
    i have SQL 2205 with SP1 installed on my machine.
    and i m not bale to connect to Report Server using SQL management studio as well as from web.

    i have installed reporting server and database on same machine. i tried using

    "http://localhost/reportserver"
    "http://localhost/reports"
    "http://localhost/reportmanager"

    but i am not bale to connect i am getting "Service Unavailable" page.

    and when i try to connect using SQL Management Studio with "servername/instance" as well as "http://localhost/reportserver" i am getting a error saying.

    ===================================
    Cannot connect to http://localhost/reportserver.

    The request failed with HTTP status 503: Service Unavailable. (Microsoft.SqlServer.Management.UI.RSClient)

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

    but if i try and connect to other reporting server on other machine using web http://servername/reportserver i m able to connect it.
    but dont know whats the problem on my machine.

    do i need to start any services for this...

    so anybody knows how to troubleshoot this issue.

    Thanks in advance...

    |||

    Hi,

    Any solution for the above mentioned problem?

    have SQL 2005 without SP1 installed on my machine.
    and i m not bale to connect to Report Server using SQL management studio as well as from web.

    i have installed reporting server and database on same machine. i tried using

    "http://localhost/reportserver"
    "http://localhost/reports"
    "http://localhost/reportmanager"

    but i am not bale to connect i am getting "Service Unavailable" page.

    and when i try to connect using SQL Management Studio with "servername/instance" it says, "No connection could not be made because the target machine actively refused it"


    ===================================
    Cannot connect to http://localhost/reportserver.

    The request failed with HTTP status 503: Service Unavailable. (Microsoft.SqlServer.Management.UI.RSClient)

    Please post your suggestion, if you resolved it already.

    Regards,

    Bhuvana

    |||i tried visiting this URL. it says 503, service un available error. Please give me the solution.|||

    Something to try:

    I had the same issue, what I did to fix is goto C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services and ensure that the ASPNET user has read,read&Execute and List Folder security permissions applied to all the subdirectories also ensure that you click the 'Advance' button when applying the permissions to ensure the security settings are applied to all child objects. During my installation for some reason it did not assign the proper permissions to the ASPNET user (aspnet_wp account). It couldn't even read the config files.

    good luck

    sql
  • can not connect to Report server from SQL SERVER 2005 Management studio

    Hi All,

    I have a brand new install of sql server 2005 on brand new WINDOWS SERVER2003 with latest versions. Every thing works fine excepting I get a 404 when I connect to report server from management studio..

    I am even able to publish reports and all the

    url://localhost/reportserver

    url://localhost/reports

    url://localhost/reportserver/reportbuilder/reportbuilder.application

    all work fine on local machine and with in the network behind the fire wall.

    But when I try to connect to report server using management studio on the local server or remote server, I get the following error.

    "

    TITLE: Microsoft SQL Server Management Studio

    The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. (Microsoft.SqlServer.Management.UI.RSClient)


    ADDITIONAL INFORMATION:

    The request failed with HTTP status 404: Not Found. (Microsoft.SqlServer.Management.UI.RSClient)

    "

    More techinal details

    "===================================

    Cannot connect to xxxxxxxxxxxx.

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

    The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. (Microsoft.SqlServer.Management.UI.RSClient)


    Program Location:

    at Microsoft.SqlServer.ReportingServices2005.RSConnection.MissingEndpointException.ThrowIfEndpointMissing(WebException e)
    at Microsoft.SqlServer.ReportingServices2005.RSConnection.ValidateConnection()
    at Microsoft.SqlServer.Management.UI.RSClient.RSClientConnection.CreateConnection(String connectionString)
    at Microsoft.SqlServer.Management.UI.RSClient.RSConnectionInfo.CreateConnectionObject()
    at Microsoft.SqlServer.Management.UI.RSClient.RSConnectionInfo.RSTypeImpl.GetConnectionObject(UIConnectionInfo ci)
    at Microsoft.SqlServer.Management.UI.ConnectionDlg.RSType.GetConnectionObject(UIConnectionInfo ci)
    at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
    at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

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

    The request failed with HTTP status 404: Not Found. (Microsoft.SqlServer.Management.UI.RSClient)


    Program Location:

    at Microsoft.SqlServer.ReportingServices2005.RSConnection.GetSecureMethods()
    at Microsoft.SqlServer.ReportingServices2005.RSConnection.IsSecureMethod(String methodname)
    at Microsoft.SqlServer.ReportingServices2005.RSConnection.ValidateConnection()

    "

    Any help would be greatly appreciated.

    Bob

    What are you passing in as the server name to Management Studio?

    You can connect several ways

    http://localhost/reportserver

    servername

    servername\instance

    |||

    I passed both the servername and the servername\instance to the management studio.

    My IIS and uses port 80. I can access Reportserver, report manager and report bilder thru the Internet. I just can not connect to Report server from Management studio.

    I will try connecting to RS is Management studo using http://localhost/reportserver.

    Regards

    Bobba

    |||

    Hi Brad Syputa,

    Thank you for the suggestion. I worked. I was not able to try your suggestion immediatly as I was out of town.

    Now I have this big question:

    Why am I only able to connect to "report server" from "management studio" using

    1. http://localhost/reportserver

    and not using

    2. servername

    3. servername\instance.

    Your help would save me a lot of time

    Regards

    Bobba(Bob)

    |||

    bobba wrote:

    Hi Brad Syputa,

    Thank you for the suggestion. I worked. I was not able to try your suggestion immediatly as I was out of town.

    Now I have this big question:

    Why am I only able to connect to "report server" from "management studio" using

    1. http://localhost/reportserver

    and not using

    2. servername

    3. servername\instance.

    Your help would save me a lot of time

    Regards

    Bobba(Bob)

    |||

    Indeed, I am very interested in disvoering the answer. We had a developer in our organization with the same problem and could only connect by enterting http://localhost/reportserver. The DBA team is fine using servername\instance.

    Is this a bug that will be resolved?

    thanks in advance,

    Jason Wall

    |||You should be able to connect using machine\instance. This method uses WMI to get the url for SOAP calls. Will you try opening the report server config tool? Can this tool connect to the machine? Are you specifying the same instance name listed in the config tool connection dialog?|||

    I have the same problem.

    I can connect to the reporting service by using machine\instance in report server config tool.

    But I cannot connect to the reporting service through managment studio by providing machine\instance, instead, if I use http://localhost/reportserver, I can connect to the report server through management studio.

    I even tried to uninstall the report service, and reinstall it again. This problem still exists.

    But the same thing does not happen on my colleague's machine.

    I think it is better to look into this issue...

    |||

    I managed to solve this problem...

    If you want to use machine\instance to connect Management studio.

    You need to make sure in rsreportservice.config, element <UrlRoot>http://localhost/reportserver</UrlRoot> is correctly configured. (You can test this by visit this url)

    I guess, the machine\instance will eventurally be translated to the <UrlRoot>. If the <UrlRoot> is not correct, then you will not be able to use machine\instance to connect report service.

    |||the attempt to connect to the report server failed. check your connection information and that the report server is a compatible version(.Net 2003 version)|||I am try to solve this problem i give for this error"
  • The request failed with HTTP status 400: Bad Request. "
  • plz send me Slution|||hi all,
    i have SQL 2205 with SP1 installed on my machine.
    and i m not bale to connect to Report Server using SQL management studio as well as from web.

    i have installed reporting server and database on same machine. i tried using

    "http://localhost/reportserver"
    "http://localhost/reports"
    "http://localhost/reportmanager"

    but i am not bale to connect i am getting "Service Unavailable" page.

    and when i try to connect using SQL Management Studio with "servername/instance" as well as "http://localhost/reportserver" i am getting a error saying.

    ===================================
    Cannot connect to http://localhost/reportserver.

    The request failed with HTTP status 503: Service Unavailable. (Microsoft.SqlServer.Management.UI.RSClient)

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

    but if i try and connect to other reporting server on other machine using web http://servername/reportserver i m able to connect it.
    but dont know whats the problem on my machine.

    do i need to start any services for this...

    so anybody knows how to troubleshoot this issue.

    Thanks in advance...

    |||

    Hi,

    Any solution for the above mentioned problem?

    have SQL 2005 without SP1 installed on my machine.
    and i m not bale to connect to Report Server using SQL management studio as well as from web.

    i have installed reporting server and database on same machine. i tried using

    "http://localhost/reportserver"
    "http://localhost/reports"
    "http://localhost/reportmanager"

    but i am not bale to connect i am getting "Service Unavailable" page.

    and when i try to connect using SQL Management Studio with "servername/instance" it says, "No connection could not be made because the target machine actively refused it"


    ===================================
    Cannot connect to http://localhost/reportserver.

    The request failed with HTTP status 503: Service Unavailable. (Microsoft.SqlServer.Management.UI.RSClient)

    Please post your suggestion, if you resolved it already.

    Regards,

    Bhuvana

    |||i tried visiting this URL. it says 503, service un available error. Please give me the solution.|||

    Something to try:

    I had the same issue, what I did to fix is goto C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services and ensure that the ASPNET user has read,read&Execute and List Folder security permissions applied to all the subdirectories also ensure that you click the 'Advance' button when applying the permissions to ensure the security settings are applied to all child objects. During my installation for some reason it did not assign the proper permissions to the ASPNET user (aspnet_wp account). It couldn't even read the config files.

    good luck

  • can not connect to Report server from SQL SERVER 2005 Management studio

    Hi All,

    I have a brand new install of sql server 2005 on brand new WINDOWS SERVER2003 with latest versions. Every thing works fine excepting I get a 404 when I connect to report server from management studio..

    I am even able to publish reports and all the

    url://localhost/reportserver

    url://localhost/reports

    url://localhost/reportserver/reportbuilder/reportbuilder.application

    all work fine on local machine and with in the network behind the fire wall.

    But when I try to connect to report server using management studio on the local server or remote server, I get the following error.

    "

    TITLE: Microsoft SQL Server Management Studio

    The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. (Microsoft.SqlServer.Management.UI.RSClient)


    ADDITIONAL INFORMATION:

    The request failed with HTTP status 404: Not Found. (Microsoft.SqlServer.Management.UI.RSClient)

    "

    More techinal details

    "===================================

    Cannot connect to xxxxxxxxxxxx.

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

    The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. (Microsoft.SqlServer.Management.UI.RSClient)


    Program Location:

    at Microsoft.SqlServer.ReportingServices2005.RSConnection.MissingEndpointException.ThrowIfEndpointMissing(WebException e)
    at Microsoft.SqlServer.ReportingServices2005.RSConnection.ValidateConnection()
    at Microsoft.SqlServer.Management.UI.RSClient.RSClientConnection.CreateConnection(String connectionString)
    at Microsoft.SqlServer.Management.UI.RSClient.RSConnectionInfo.CreateConnectionObject()
    at Microsoft.SqlServer.Management.UI.RSClient.RSConnectionInfo.RSTypeImpl.GetConnectionObject(UIConnectionInfo ci)
    at Microsoft.SqlServer.Management.UI.ConnectionDlg.RSType.GetConnectionObject(UIConnectionInfo ci)
    at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
    at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

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

    The request failed with HTTP status 404: Not Found. (Microsoft.SqlServer.Management.UI.RSClient)


    Program Location:

    at Microsoft.SqlServer.ReportingServices2005.RSConnection.GetSecureMethods()
    at Microsoft.SqlServer.ReportingServices2005.RSConnection.IsSecureMethod(String methodname)
    at Microsoft.SqlServer.ReportingServices2005.RSConnection.ValidateConnection()

    "

    Any help would be greatly appreciated.

    Bob

    What are you passing in as the server name to Management Studio?

    You can connect several ways

    http://localhost/reportserver

    servername

    servername\instance

    |||

    I passed both the servername and the servername\instance to the management studio.

    My IIS and uses port 80. I can access Reportserver, report manager and report bilder thru the Internet. I just can not connect to Report server from Management studio.

    I will try connecting to RS is Management studo using http://localhost/reportserver.

    Regards

    Bobba

    |||

    Hi Brad Syputa,

    Thank you for the suggestion. I worked. I was not able to try your suggestion immediatly as I was out of town.

    Now I have this big question:

    Why am I only able to connect to "report server" from "management studio" using

    1. http://localhost/reportserver

    and not using

    2. servername

    3. servername\instance.

    Your help would save me a lot of time

    Regards

    Bobba(Bob)

    |||

    bobba wrote:

    Hi Brad Syputa,

    Thank you for the suggestion. I worked. I was not able to try your suggestion immediatly as I was out of town.

    Now I have this big question:

    Why am I only able to connect to "report server" from "management studio" using

    1. http://localhost/reportserver

    and not using

    2. servername

    3. servername\instance.

    Your help would save me a lot of time

    Regards

    Bobba(Bob)

    |||

    Indeed, I am very interested in disvoering the answer. We had a developer in our organization with the same problem and could only connect by enterting http://localhost/reportserver. The DBA team is fine using servername\instance.

    Is this a bug that will be resolved?

    thanks in advance,

    Jason Wall

    |||You should be able to connect using machine\instance. This method uses WMI to get the url for SOAP calls. Will you try opening the report server config tool? Can this tool connect to the machine? Are you specifying the same instance name listed in the config tool connection dialog?|||

    I have the same problem.

    I can connect to the reporting service by using machine\instance in report server config tool.

    But I cannot connect to the reporting service through managment studio by providing machine\instance, instead, if I use http://localhost/reportserver, I can connect to the report server through management studio.

    I even tried to uninstall the report service, and reinstall it again. This problem still exists.

    But the same thing does not happen on my colleague's machine.

    I think it is better to look into this issue...

    |||

    I managed to solve this problem...

    If you want to use machine\instance to connect Management studio.

    You need to make sure in rsreportservice.config, element <UrlRoot>http://localhost/reportserver</UrlRoot> is correctly configured. (You can test this by visit this url)

    I guess, the machine\instance will eventurally be translated to the <UrlRoot>. If the <UrlRoot> is not correct, then you will not be able to use machine\instance to connect report service.

    |||the attempt to connect to the report server failed. check your connection information and that the report server is a compatible version(.Net 2003 version)|||I am try to solve this problem i give for this error"
  • The request failed with HTTP status 400: Bad Request. "
  • plz send me Slution|||hi all,
    i have SQL 2205 with SP1 installed on my machine.
    and i m not bale to connect to Report Server using SQL management studio as well as from web.

    i have installed reporting server and database on same machine. i tried using

    "http://localhost/reportserver"
    "http://localhost/reports"
    "http://localhost/reportmanager"

    but i am not bale to connect i am getting "Service Unavailable" page.

    and when i try to connect using SQL Management Studio with "servername/instance" as well as "http://localhost/reportserver" i am getting a error saying.

    ===================================
    Cannot connect to http://localhost/reportserver.

    The request failed with HTTP status 503: Service Unavailable. (Microsoft.SqlServer.Management.UI.RSClient)

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

    but if i try and connect to other reporting server on other machine using web http://servername/reportserver i m able to connect it.
    but dont know whats the problem on my machine.

    do i need to start any services for this...

    so anybody knows how to troubleshoot this issue.

    Thanks in advance...

    |||

    Hi,

    Any solution for the above mentioned problem?

    have SQL 2005 without SP1 installed on my machine.
    and i m not bale to connect to Report Server using SQL management studio as well as from web.

    i have installed reporting server and database on same machine. i tried using

    "http://localhost/reportserver"
    "http://localhost/reports"
    "http://localhost/reportmanager"

    but i am not bale to connect i am getting "Service Unavailable" page.

    and when i try to connect using SQL Management Studio with "servername/instance" it says, "No connection could not be made because the target machine actively refused it"


    ===================================
    Cannot connect to http://localhost/reportserver.

    The request failed with HTTP status 503: Service Unavailable. (Microsoft.SqlServer.Management.UI.RSClient)

    Please post your suggestion, if you resolved it already.

    Regards,

    Bhuvana

    |||i tried visiting this URL. it says 503, service un available error. Please give me the solution.|||

    Something to try:

    I had the same issue, what I did to fix is goto C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services and ensure that the ASPNET user has read,read&Execute and List Folder security permissions applied to all the subdirectories also ensure that you click the 'Advance' button when applying the permissions to ensure the security settings are applied to all child objects. During my installation for some reason it did not assign the proper permissions to the ASPNET user (aspnet_wp account). It couldn't even read the config files.

    good luck

  •