Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Thursday, March 29, 2012

DeriveParameters throws when called against a C# function?

When I call DeriveParameters against a function written in SQLCLR function it throws an exception. I've been working on this a little while and haven't found a fix. I understand that I could write additional code to do the same work DeriveParameters does, but it seems like this should work.

This is the exception thrown:

[InvalidOperationException: The stored procedure 'GSI.Utils.IsMatch' doesn't exist.]

The function is defined as

CREATE FUNCTION [Utils].[IsMatch](@.Value [nvarchar](4000), @.RegularExpression [nvarchar](4000))
RETURNS [bit] WITH EXECUTE AS CALLER
AS
EXTERNAL NAME [RegularExpressionsHelper].[UserDefinedFunctions].[IsMatch]

The C# function is defined as:

[Microsoft.SqlServer.Server.SqlFunction(IsDeterministic=true)]
public static SqlBoolean IsMatch(SqlString Value, SqlString RegularExpression)
{
Regex rx = new Regex( RegularExpression.ToString() );
string s = Value.ToString();

return new SqlBoolean(rx.IsMatch(s));
}

This is the code I'm using to call DeriveParameters:

static void Main(string[] args)
{
using (SqlConnection conn = new SqlConnection(m_GetConnectionString()))
{
conn.Open();

SqlCommand myCommand = new SqlCommand("GSI.Utils.IsMatch", conn);
myCommand.CommandType = System.Data.CommandType.StoredProcedure;
SqlCommandBuilder.DeriveParameters(myCommand);
}
}

I found that DeriveParameters seems to call sp_procedure_params_managed and when I call it myself it returns the parameters correctly for T-SQL functions, but returns no records when I specify a SQLCLR function.

DECLARE @.procedure_name sysname;
DECLARE @.group_number int;
DECLARE @.procedure_schema sysname;
DECLARE @.parameter_name sysname;

SET @.procedure_name = 'IsMatch';
SET @.group_number = 1;
SET @.procedure_schema = 'Utils';
SET @.parameter_name = null;

DECLARE @.RC int

EXECUTE @.RC = [GSI].[Sys].[sp_procedure_params_managed]
@.procedure_name
,@.group_number
,@.procedure_schema
,@.parameter_name


I'm able to execute the function without issue and I'm able to use DeriveParameters against everything in the database except C# based functions (and I've tried others besides IsMatch). I'm attempting to run DeriveParameters from a console application and from ASP.NET, both running .NET 2.0.

I've experienced the same behavior in these versions:

SQL Server 2005 Enterprise Edition RTM (MSDN Image on Virtual Server)
SQL Server 2005 Enterprise Edition SP1 (MSDN Image on Virtual Server)
SQL Server 2005 Enterprise Edition SP1 + Hotfix kb918222 (MSDN Image on Virtual Server)
SQL Server 2005 Developer Edition SP1

Has anyone else seen similar behavior?

Any advice would be greatly appreciated -- Thanks

Steve

I verified the behavior and filed a bug on it. Hopefully it can be fixed soon - feel free to file a bug on connect.microsoft.com if you want to track the status.

You can always get the parameters from querying sys.parameters, but of course it doesn't do the magic that DeriveParameters does.

Steven

|||

Any status on this bug?

Derived parameters calls:

exec sp_procedure_params_managed @.procedure_name=N'GetServerTimeZoneName'

(Which Returns nothing for CLR based stored procedures)... thats the bug!

sp_help GetServerTimeZoneName and executing the CLR procedure work just fine...

Thanks

Ron Keen

|||

I submitted the bug here:

http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=185170

Someone else submitted it here:

http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=214251

Tuesday, March 27, 2012

DeriveParameters throws when called against a C# function?

When I call DeriveParameters against a function written in SQLCLR function it throws an exception. I've been working on this a little while and haven't found a fix. I understand that I could write additional code to do the same work DeriveParameters does, but it seems like this should work.

This is the exception thrown:

[InvalidOperationException: The stored procedure 'GSI.Utils.IsMatch' doesn't exist.]

The function is defined as

CREATE FUNCTION [Utils].[IsMatch](@.Value [nvarchar](4000), @.RegularExpression [nvarchar](4000))
RETURNS [bit] WITH EXECUTE AS CALLER
AS
EXTERNAL NAME [RegularExpressionsHelper].[UserDefinedFunctions].[IsMatch]

The C# function is defined as:

[Microsoft.SqlServer.Server.SqlFunction(IsDeterministic=true)]
public static SqlBoolean IsMatch(SqlString Value, SqlString RegularExpression)
{
Regex rx = new Regex( RegularExpression.ToString() );
string s = Value.ToString();

return new SqlBoolean(rx.IsMatch(s));
}

This is the code I'm using to call DeriveParameters:

static void Main(string[] args)
{
using (SqlConnection conn = new SqlConnection(m_GetConnectionString()))
{
conn.Open();

SqlCommand myCommand = new SqlCommand("GSI.Utils.IsMatch", conn);
myCommand.CommandType = System.Data.CommandType.StoredProcedure;
SqlCommandBuilder.DeriveParameters(myCommand);
}
}

I found that DeriveParameters seems to call sp_procedure_params_managed and when I call it myself it returns the parameters correctly for T-SQL functions, but returns no records when I specify a SQLCLR function.

DECLARE @.procedure_name sysname;
DECLARE @.group_number int;
DECLARE @.procedure_schema sysname;
DECLARE @.parameter_name sysname;

SET @.procedure_name = 'IsMatch';
SET @.group_number = 1;
SET @.procedure_schema = 'Utils';
SET @.parameter_name = null;

DECLARE @.RC int

EXECUTE @.RC = [GSI].[Sys].[sp_procedure_params_managed]
@.procedure_name
,@.group_number
,@.procedure_schema
,@.parameter_name


I'm able to execute the function without issue and I'm able to use DeriveParameters against everything in the database except C# based functions (and I've tried others besides IsMatch). I'm attempting to run DeriveParameters from a console application and from ASP.NET, both running .NET 2.0.

I've experienced the same behavior in these versions:

SQL Server 2005 Enterprise Edition RTM (MSDN Image on Virtual Server)
SQL Server 2005 Enterprise Edition SP1 (MSDN Image on Virtual Server)
SQL Server 2005 Enterprise Edition SP1 + Hotfix kb918222 (MSDN Image on Virtual Server)
SQL Server 2005 Developer Edition SP1

Has anyone else seen similar behavior?

Any advice would be greatly appreciated -- Thanks

Steve

I verified the behavior and filed a bug on it. Hopefully it can be fixed soon - feel free to file a bug on connect.microsoft.com if you want to track the status.

You can always get the parameters from querying sys.parameters, but of course it doesn't do the magic that DeriveParameters does.

Steven

|||

Any status on this bug?

Derived parameters calls:

exec sp_procedure_params_managed @.procedure_name=N'GetServerTimeZoneName'

(Which Returns nothing for CLR based stored procedures)... thats the bug!

sp_help GetServerTimeZoneName and executing the CLR procedure work just fine...

Thanks

Ron Keen

|||

I submitted the bug here:

http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=185170

Someone else submitted it here:

http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=214251

Sunday, March 25, 2012

Deprecated features in 2005

Hello folks,
I am currently working on a project plan to move from SQL7/NT4 to
SQL2005/Win2003 and I am putting together a documentation for our developers
regarding new features and deprecated features in 2005.
Can you point me to a detailed ducumentation on the programming side?
Thanks a lot.http://msdn2.microsoft.com/en-us/library/ms143729(en-US,SQL.90).aspx
and
http://msdn2.microsoft.com/en-us/library/ms144262.aspx
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials
"Ata John" <AtaJohn@.discussions.microsoft.com> wrote in message
news:67622D5C-D5C8-4F16-89FA-2CDFD6730F01@.microsoft.com...
> Hello folks,
> I am currently working on a project plan to move from SQL7/NT4 to
> SQL2005/Win2003 and I am putting together a documentation for our
> developers
> regarding new features and deprecated features in 2005.
> Can you point me to a detailed ducumentation on the programming side?
> Thanks a lot.|||On Tue, 23 May 2006 22:22:23 +0100, "Tony Rogerson"
<tonyrogerson@.sqlserverfaq.com> wrote:

>http://msdn2.microsoft.com/en-us/library/ms143729(en-US,SQL.90).aspx
>and
>http://msdn2.microsoft.com/en-us/library/ms144262.aspx
One level up the tree from those:
http://msdn2.microsoft.com/en-us/library/ms143532.aspx
there are two more important links:
"Database Engine feature changes that might require changes to
applications."
http://msdn2.microsoft.com/en-us/library/ms143179.aspx
"Other changes in behavior to database features in this release."
http://msdn2.microsoft.com/en-us/library/ms143359.aspx
Roy Harvey
Beacon Falls, CTsql

Thursday, March 22, 2012

Deployment of Reports and Data Sources

What is the best way to deploy reports to production considering the fact that different developers would be working on different reports and different data sources. Also consider that the data sources connect to local machines of the developers during report creation and a different database server on deployment.

One way is to use VS2005 to deploy it to production but I am not sure if that is the way to go?

Any ideas?

Thanks

I'd probably create an RSS script which will publish the report to the whatever server it needs to and then actually "fixes up" the report to point to a "production datasource" which already exists on the production box. This "production datasource" points to the correct database on the server.

Use the CreateReport() API to publish the report, and here's a quick sample on fixing up the datasource on a report:

DataSourceReference reference = new DataSourceReference();
DataSource[] dsarray = new DataSource[1];
DataSource ds = new DataSource();
reference.Reference = "/Data Sources/AdventureWorks";
ds.Item = (DataSourceReference)reference;
ds.Name = "AdventureWorks";
dsarray[0] = ds;
rs.SetItemDataSources("/AdventureWorks Sample Reports/Company Sales", dsarray)

It bascially sets the datasource of the Company Sales report to point to the AdventureWorks datasource int he /Data Sources folder.

The nice thing about this idea is that if you have only a few different databases to deal with, you could actually write the RSS script to that it acts on all reports in filesystem folder, and then does some thinking and points each report to the correct "production" data source during the "fix up" phase...

deployment not working

I have a freshly installed reporting server/sql server and I have an older
visual studio reporting project.
Now I wanted to change the deployment url to the new server, but whenever I
try to deploy I get the message: "The permissions granted to user 'user' are
insufficient for performing this operation."
What permissions and where do I need to change to get this right?Give the user 'user' the Content Manager role on the folder to which you
want to deploy.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"Servé La" <blabla@.bestaatniet.nl> wrote in message
news:O0%23tvvk$EHA.2580@.TK2MSFTNGP15.phx.gbl...
>I have a freshly installed reporting server/sql server and I have an older
> visual studio reporting project.
> Now I wanted to change the deployment url to the new server, but whenever
> I
> try to deploy I get the message: "The permissions granted to user 'user'
> are
> insufficient for performing this operation."
> What permissions and where do I need to change to get this right?
>

Wednesday, March 21, 2012

Deployment Issue

Hi,
I had a few sets of Reports, who were working fine. today I added a report
to my solution file at my dev machine and deployed it on the reportserver.
The Report got deployed successfully but when I browse the Report from the
browser before opening it shows the windows dialog box for "File Download"
and with the message "some files can harm your computer...." with the name
of the file as <reportfilename>.html. After clicking cancel the browser does
not shows the report. On clicking Save/Open the browser tries to download
some file which never ends.
Ironically it can preview my report from the dev machine.
My dev machine is Win XP and the Report server is Win 2000. I m using
Enterprise SQL Server MS Reports.
Is there any setting in reports/IE for this sudden behaviour
any idea will be highly appreciated..
siajHi,
I found the solution to my problem ...
There appears to be a bug in the MS RS version 8.00.743.00. If we name the
rdl file with a keyword containing "Attachmnet" Then we can deploy the file
but cant view the file..
I had named the file as "Look for Attachment.rdl" It did not work. I changed
the name it worked.
Would appreciate if some MS guy woule comment on this.
Cheers,
Jai
"siaj" wrote:
> Hi,
> I had a few sets of Reports, who were working fine. today I added a report
> to my solution file at my dev machine and deployed it on the reportserver.
> The Report got deployed successfully but when I browse the Report from the
> browser before opening it shows the windows dialog box for "File Download"
> and with the message "some files can harm your computer...." with the name
> of the file as <reportfilename>.html. After clicking cancel the browser does
> not shows the report. On clicking Save/Open the browser tries to download
> some file which never ends.
> Ironically it can preview my report from the dev machine.
> My dev machine is Win XP and the Report server is Win 2000. I m using
> Enterprise SQL Server MS Reports.
> Is there any setting in reports/IE for this sudden behaviour
> any idea will be highly appreciated..
> siaj

Deployment Help

I'm trying to test my ASP.NET application. Everything is working to the point of getting to my login page to open. When I try to login I receive and error that the database does not exist or access is denied. I used the developer version of SQL Server to create the database and installed the MSDE on my test PC. Then I copied the mdf and ldf files to the new PC. Is there something else I should be doing? Or any suggestions?

Thank you,::Then I copied the mdf and ldf files to the new PC

did you "attach" the database ??

hth|||The test PC only has the MSDE installed. I don't know of a way to run the attach sp without query analyzer, is there a way?

Thank you,|||I tested, and I can connect the SQL Server database to a Access adp. Would this mean that I should be able to connect to my ASP.NET web pages? Could there be a problem with my connection string when I moved the app to the new PC? What is the simplest connect string to a SQL Server database, so I can test it?

Thanks you any suggestions,|||Can you install SQL Server tools (only)?
That would be easier to attach a db via Enterprise Manager (right-click DB / all tasks).|||I was trying to do this as if those tools were not available. I read that it was possible, but I cannot find the listing again.

Thank you,sql

Deployment File System installation

Hallo,

i created a solution that is working fine in development. I would now like to deploy it on an other server.

We have choosen for a file system -based deployment because this seems to require the least specialized SQL Server-knowledge from the user who will be utilizing this system. I changed the properties of the solution to

CreateDeploymentUtility: true

DeploymentOutputPath : bin\Deployment

Subsequently I build the solution and in the bin\Deployment-folder dtsx-files have been created.

Can anyone tell me what I need to do next to deploy them on an other machine?

Do I need to deploy a complete version of SQL SERVER 2005 Devenv included or is there a lighter installation possible that only contains what I need to run the packages?

Can I shedule the packages to run at a specified moment without DTultil coming up?

When you once found an answer to these many questions i would be most gratefull if you woulkd let me know.

Kind regards,

Paul

I seem to have found a solution to my own questions?

Can anyone tell me what I need to do next to deploy them on an other machine?

Do I need to deploy a complete version of SQL SERVER 2005 Devenv included or is there a lighter installation possible that only contains what I need to run the packages?

I did the test and only succeeded in running the packages after a complete install of SQLServer 2005.

Can I shedule the packages to run at a specified moment without DTultil coming up?

Using the MS-sheduler I sheduled the execution of a batch-file. this batchfile contains the Command line instructions created using DTUtil, preceded by 'DTexec '. for instance. 'DTEXEC /FILE "C:\Program Files\JACBE_IF_CAB\FMC_People.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI'

There might be a more elegant solution but this seems to work .

Kind regards,

Paul

|||

You don't need devenv at all. Devenv comes with the client tools install.

The only thing you need to run packages is to install Integration Services. This is different to the client install.

-Jamie

|||

Hallo Jamie,

Thanks for your swift reply.

I admit i'm not a SQL server specilist but while installing SQL Server 2005 from CD (Microsoft SQL Server 2005 Enterprise Edition December 2005) or DVD the option 'Integration services' is disabled. So I can not single it out for installation. . Is there still an other installation dvd I need or can I download the SSIS server component from somewhere? I did not seem to find it in the download center

With kind regards,

Paul

|||

That's bizarre. I have installed off that CD a number of times and the option is never greyed out. Very strange indeed - I don't know what would cuse this.

I would contact your reseller and ask them why you can't install the software that you have paid for!

-Jamie

sql

Deployment

I'm working through Ch 3 of "SQL Server 2005 Reporting Services Step by Step" by Stacia Misner, published by Microsoft Press, but I can't get the example report in Ch3 to deploy. I get a long error message, which says this:

TITLE: Microsoft Report Designer

A connection could not be made to the report server http://localhost/ReportServer.


ADDITIONAL INFORMATION:

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<html>
<head>
<title>
SQL Server Reporting Services
</title><meta name="Generator" content="Microsoft SQL Server Reporting Services 9.00.2047.00" />
<meta name="HTTP Status" content="500" />
<meta name="ProductLocaleID" content="9" />
<meta name="CountryLocaleID" content="1033" />
<meta name="StackTrace" content=" at Microsoft.ReportingServices.Diagnostics.RSConfiguration.Load()
at Microsoft.ReportingServices.Diagnostics.RSConfiguration.Construct(String configFileName)
at Microsoft.ReportingServices.Diagnostics.RSConfiguration..ctor(String configFileName, String location)
at Microsoft.ReportingServices.Diagnostics.RSConfigurationManager..ctor(String configFileName, String configLocation)
at Microsoft.ReportingServices.Library.Global.get_ConfigurationManager()
at Microsoft.ReportingServices.WebServer.Global.StartApp()
at Microsoft.ReportingServices.WebServer.Global.Application_BeginRequest(Object sender, EventArgs e)" />
<style>
BODY {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE: 8pt; COLOR:black}
H1 {FONT-FAMILY:Verdana; FONT-WEIGHT:700; FONT-SIZE:15pt}
LI {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE:8pt; DISPLAY:inline}
.ProductInfo {FONT-FAMILY:Verdana; FONT-WEIGHT:bold; FONT-SIZE: 8pt; COLOR:gray}
A:link {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none}
A:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#FF3300; TEXT-DECORATION:underline}
A:visited {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none}
A:visited:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; color:#FF3300; TEXT-DECORATION:underline}

</style>
</head><body bgcolor="white">
<h1>
Reporting Services Error<hr width="100%" size="1" color="silver" />
</h1><ul>
<li>The report server has encountered a configuration error. See the report server log files for more information. (rsServerConfigurationError) </li><ul>
<li>Access to the path 'C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\RSReportServer.config' is denied.</li>
</ul>
</ul><hr width="100%" size="1" color="silver" /><span class="ProductInfo">SQL Server Reporting Services</span>
</body>
</html>
--. (Microsoft.ReportingServices.Designer)


BUTTONS:

OK

This is your problem:

<li>Access to the path 'C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\RSReportServer.config' is denied.</li>

Looks like the account that SSRS is running under doesn't have permissions on \ReportServer. Make sure the account in question can read from the folder.

|||

Thanks, but it still doesn't work even with admin permissions. I restarted IIS and RS and that reduced the error to the following:

TITLE: Microsoft Report Designer

A connection could not be made to the report server http://localhost/ReportServer.


ADDITIONAL INFORMATION:

Unable to connect to the remote server (Microsoft.ReportingServices.Designer)

No connection could be made because the target machine actively refused it (System)


BUTTONS:

OK|||

I went to the Surface Area Configuration for Features and Reporting Services is enabled. But when I select "Windows Integrated Security" I get this error:

TITLE: Surface Area Configuration

Unable to connect to the remote server (System)


ADDITIONAL INFORMATION:

No connection could be made because the target machine actively refused it (System)


BUTTONS:

OK|||I should mention that I have SQL Server 2005 installed on my machine and am trying to deploy to it. I'm not working over a net.|||

Hey Roger,

Did you ever find a solution or cause to your problem? I am now experiencing the same problem.

I am not trying to deploy a report, rather install SQL 2005 SP1, which fails stating I could not authenticate to all instances. Then, when poking around in the Surface Area Configuration Manager, clicking on SQL Server Reporting Services - Windows Integrated Security, I get the same error you get:

"Unable to connect to remote server (System)"

"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond (System)"

Thanks!

Dan

Deployment

I'm working through Ch 3 of "SQL Server 2005 Reporting Services Step by Step" by Stacia Misner, published by Microsoft Press, but I can't get the example report in Ch3 to deploy. I get a long error message, which says this:

TITLE: Microsoft Report Designer

A connection could not be made to the report server http://localhost/ReportServer.


ADDITIONAL INFORMATION:

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<html>
<head>
<title>
SQL Server Reporting Services
</title><meta name="Generator" content="Microsoft SQL Server Reporting Services 9.00.2047.00" />
<meta name="HTTP Status" content="500" />
<meta name="ProductLocaleID" content="9" />
<meta name="CountryLocaleID" content="1033" />
<meta name="StackTrace" content=" at Microsoft.ReportingServices.Diagnostics.RSConfiguration.Load()
at Microsoft.ReportingServices.Diagnostics.RSConfiguration.Construct(String configFileName)
at Microsoft.ReportingServices.Diagnostics.RSConfiguration..ctor(String configFileName, String location)
at Microsoft.ReportingServices.Diagnostics.RSConfigurationManager..ctor(String configFileName, String configLocation)
at Microsoft.ReportingServices.Library.Global.get_ConfigurationManager()
at Microsoft.ReportingServices.WebServer.Global.StartApp()
at Microsoft.ReportingServices.WebServer.Global.Application_BeginRequest(Object sender, EventArgs e)" />
<style>
BODY {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE: 8pt; COLOR:black}
H1 {FONT-FAMILY:Verdana; FONT-WEIGHT:700; FONT-SIZE:15pt}
LI {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE:8pt; DISPLAY:inline}
.ProductInfo {FONT-FAMILY:Verdana; FONT-WEIGHT:bold; FONT-SIZE: 8pt; COLOR:gray}
A:link {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none}
A:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#FF3300; TEXT-DECORATION:underline}
A:visited {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none}
A:visited:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; color:#FF3300; TEXT-DECORATION:underline}

</style>
</head><body bgcolor="white">
<h1>
Reporting Services Error<hr width="100%" size="1" color="silver" />
</h1><ul>
<li>The report server has encountered a configuration error. See the report server log files for more information. (rsServerConfigurationError) </li><ul>
<li>Access to the path 'C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\RSReportServer.config' is denied.</li>
</ul>
</ul><hr width="100%" size="1" color="silver" /><span class="ProductInfo">SQL Server Reporting Services</span>
</body>
</html>
--. (Microsoft.ReportingServices.Designer)


BUTTONS:

OK

This is your problem:

<li>Access to the path 'C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\RSReportServer.config' is denied.</li>

Looks like the account that SSRS is running under doesn't have permissions on \ReportServer. Make sure the account in question can read from the folder.

|||

Thanks, but it still doesn't work even with admin permissions. I restarted IIS and RS and that reduced the error to the following:

TITLE: Microsoft Report Designer

A connection could not be made to the report server http://localhost/ReportServer.


ADDITIONAL INFORMATION:

Unable to connect to the remote server (Microsoft.ReportingServices.Designer)

No connection could be made because the target machine actively refused it (System)


BUTTONS:

OK

|||

I went to the Surface Area Configuration for Features and Reporting Services is enabled. But when I select "Windows Integrated Security" I get this error:

TITLE: Surface Area Configuration

Unable to connect to the remote server (System)


ADDITIONAL INFORMATION:

No connection could be made because the target machine actively refused it (System)


BUTTONS:

OK

|||I should mention that I have SQL Server 2005 installed on my machine and am trying to deploy to it. I'm not working over a net.|||

Hey Roger,

Did you ever find a solution or cause to your problem? I am now experiencing the same problem.

I am not trying to deploy a report, rather install SQL 2005 SP1, which fails stating I could not authenticate to all instances. Then, when poking around in the Surface Area Configuration Manager, clicking on SQL Server Reporting Services - Windows Integrated Security, I get the same error you get:

"Unable to connect to remote server (System)"

"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond (System)"

Thanks!

Dan

Deployment

I'm working through Ch 3 of "SQL Server 2005 Reporting Services Step by Step" by Stacia Misner, published by Microsoft Press, but I can't get the example report in Ch3 to deploy. I get a long error message, which says this:

TITLE: Microsoft Report Designer

A connection could not be made to the report server http://localhost/ReportServer.


ADDITIONAL INFORMATION:

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<html>
<head>
<title>
SQL Server Reporting Services
</title><meta name="Generator" content="Microsoft SQL Server Reporting Services 9.00.2047.00" />
<meta name="HTTP Status" content="500" />
<meta name="ProductLocaleID" content="9" />
<meta name="CountryLocaleID" content="1033" />
<meta name="StackTrace" content=" at Microsoft.ReportingServices.Diagnostics.RSConfiguration.Load()
at Microsoft.ReportingServices.Diagnostics.RSConfiguration.Construct(String configFileName)
at Microsoft.ReportingServices.Diagnostics.RSConfiguration..ctor(String configFileName, String location)
at Microsoft.ReportingServices.Diagnostics.RSConfigurationManager..ctor(String configFileName, String configLocation)
at Microsoft.ReportingServices.Library.Global.get_ConfigurationManager()
at Microsoft.ReportingServices.WebServer.Global.StartApp()
at Microsoft.ReportingServices.WebServer.Global.Application_BeginRequest(Object sender, EventArgs e)" />
<style>
BODY {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE: 8pt; COLOR:black}
H1 {FONT-FAMILY:Verdana; FONT-WEIGHT:700; FONT-SIZE:15pt}
LI {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE:8pt; DISPLAY:inline}
.ProductInfo {FONT-FAMILY:Verdana; FONT-WEIGHT:bold; FONT-SIZE: 8pt; COLOR:gray}
A:link {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none}
A:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#FF3300; TEXT-DECORATION:underline}
A:visited {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none}
A:visited:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; color:#FF3300; TEXT-DECORATION:underline}

</style>
</head><body bgcolor="white">
<h1>
Reporting Services Error<hr width="100%" size="1" color="silver" />
</h1><ul>
<li>The report server has encountered a configuration error. See the report server log files for more information. (rsServerConfigurationError) </li><ul>
<li>Access to the path 'C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\RSReportServer.config' is denied.</li>
</ul>
</ul><hr width="100%" size="1" color="silver" /><span class="ProductInfo">SQL Server Reporting Services</span>
</body>
</html>
--. (Microsoft.ReportingServices.Designer)


BUTTONS:

OK

This is your problem:

<li>Access to the path 'C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\RSReportServer.config' is denied.</li>

Looks like the account that SSRS is running under doesn't have permissions on \ReportServer. Make sure the account in question can read from the folder.

|||

Thanks, but it still doesn't work even with admin permissions. I restarted IIS and RS and that reduced the error to the following:

TITLE: Microsoft Report Designer

A connection could not be made to the report server http://localhost/ReportServer.


ADDITIONAL INFORMATION:

Unable to connect to the remote server (Microsoft.ReportingServices.Designer)

No connection could be made because the target machine actively refused it (System)


BUTTONS:

OK|||

I went to the Surface Area Configuration for Features and Reporting Services is enabled. But when I select "Windows Integrated Security" I get this error:

TITLE: Surface Area Configuration

Unable to connect to the remote server (System)


ADDITIONAL INFORMATION:

No connection could be made because the target machine actively refused it (System)


BUTTONS:

OK|||I should mention that I have SQL Server 2005 installed on my machine and am trying to deploy to it. I'm not working over a net.|||

Hey Roger,

Did you ever find a solution or cause to your problem? I am now experiencing the same problem.

I am not trying to deploy a report, rather install SQL 2005 SP1, which fails stating I could not authenticate to all instances. Then, when poking around in the Surface Area Configuration Manager, clicking on SQL Server Reporting Services - Windows Integrated Security, I get the same error you get:

"Unable to connect to remote server (System)"

"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond (System)"

Thanks!

Dan

sql

Monday, March 19, 2012

Deploying web app, which SQL files do I upload?..

I'm working on a web application that uses SQL Server 2000. Once I'm ready to upload my website to a production server, I need to know how to upload my SQL Server database files to the server. Are there actual files that can be uploaded? I've only deployed a website that works with MySQL to a production server, and there were no files to upload... the database had to be created on the server, and then the data itself had to be exported to text files (on my computer), then imported/uploaded to the production server using SQL statements...

How do I do this?

Thanks~::I need to know how to upload my SQL Server database files to the server.

Ask your provider, systemadministrator or whoever manages this.

Our hosting operation does NOT allow uploads of sql database fiules - you are supposed to create a new database and use the copy database wizard out of SQL Server's enterprise manager.|||hi
i saw http://europe.webmatrixhosting.net, do you know that all hosts provide like this host utilities to work with SQL Server? utilities like http://www.aspenterprisemanager.com??

i'm developing an asp.net storefront that uses SQL Server Database, but i'm worry about after developing that, i want to do what?!! how to manage my database?
tahnk

Friday, March 9, 2012

Deploying multiple files through a package

Hi

I am working on on SQL Server Integration Services and facing few problems in it.

Actually am supposed to create a package that would automatically pick excel spreadsheets with a specific format and import it onto the SQL server.
(Lets say , there is a company named AB and they have got various products named CD,EF and GH and each product has its own spreadsheet in which its monthly sales(JAN, FEB,...NOV, DEC) is given. So i have to build a generic package for each product (lets say CD) so that i don't have to import every spreadsheet seperately for each month.
To summarize i just have to build a package where i can deploy the various spreadshhets again and agian instead of building a package for each and every month spreadsheet seperately.

I have tried and used lots of combinations like Loop
conatiners etc. but still am not able to find a solution to it.

Please help me out on this.

If the metadata (i.e. Number of columns, column names, column types) of each file is different then you cannot load everything using the same data-flow. You need a seperate data-flow for each one.

You can still put everything into one package. You need to decide, at execution-time, which data-flow(s) to execute based on which file you want to process. In other words, you need conditional workflow: http://www.sqlis.com/default.aspx?306

-Jamie

|||

But the format of all the monthly spreadsheets are the same. So still i have to cosider conditional flow or it can be done through any other way also.

Cheers

|||

Oh OK, well you're all right then. You just need to set the name of the file that you want to process dynamically. You do this by putting a property expression on the Excel Connection Manager's ConnectionString property.

-Jamie

|||

Hi

I am really sorry to bother again but actually ,as i am new to these services, can you please guide me how to do it or may be direct me to some useful article.

Thanks a lot .Its been really helpful though.

Cheers

|||

Sure, this: http://blogs.conchango.com/jamiethomson/archive/2005/05/30/1489.aspx provides all that you need to know.

There's probably more in there than you need but you can pick out the bits that are important. Make sure you download the demo which will show you how all this works.

-Jamie

|||

Thanks a lot. I really appreciate it. Its working fine now.

Actually i have twisted the previous question a bit. I don't know why but i am just keen to learn whatever comes my way.

Lets say we have a database table(eg XYZ) with certain attributes (A,B,C,D,E,F) and now we want to build a package which would take excel file(eg XUV) as a source and export the data onto the table which has already been created in the database(i.e XYZ). But in the excel file we only have few attributes that match the destination column(lets say A,C,F). Now in order to get it working we have to map the columns manually. Then perform the normal procedures and it would be loaded.

This package would deploy only one source file(i.e XUV). Actually what i was curious about is that if there are hundreds of excel source files(with the same attributes like the former excel source XUV) waiting to be loaded then am i supposed to do mapping for each and every file.

Thanks in advance.

|||

Not quite sure I fully understand what you're saying but the important thing is you have to build a data-flow for each type of source file. By "type" I mean all files that have the same metadata are of the same type.

-Jamie

|||

Hi

Actually am still facing some problem with my last query.

There is no connection manager in the property listings in the expressions.

|||

Where are you looking? What object are you looking at the properties of?

You have to change the ConnectionString property of the connection manager.

-Jamie

|||Really sorry was a mistake.

Wednesday, March 7, 2012

Deploying Data Processing Extension to Report Designer

I have a problem getting my reports working in the designer in vs.net
2005. I have migrated a sql server 2000 report server project to 2005
and added my custom data processing extension to the config files. The
reports works in the report server but although I have added data
extension to both RSReportDesigner.config and given it full trust in
RSPreviewPolicy.config in much the same way as in the reportserver
config files I cant get it to work.
This is my entry in the RSReportDesigner.config in the Data Section:
<Extension Name="HM_SQL_3"
Type="HM.IPS.Report.DataExtension.PermissionProvider.Connection,
HM.IPS.Report.DataExtension"/>
And this is my entry in the RSPreviewPolicy.config:
<CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="FullTrust" Name="HM_IPSPermission3"
Description="Group for HM DataExtension3">
<IMembershipCondition
class="UrlMembershipCondition" version="1"
Url="C:\Program Files\Microsoft Visual
Studio 8\Common7\IDE\PrivateAssemblies
\HM.IPS.Report.DataExtension.dll"/>
</CodeGroup>
and I still get :
an attempt has been made to use a data extension 'HM_SQL_3' that is
not registered for this report server
when I try to preview reports.
Does anyone have any idea what to try next? This worked flawlessly in
vs.net 2003 and as mentioned before it works when I use the Report
Server through the web.On Apr 11, 6:52 am, jonas.rosqv...@.ecru.se wrote:
> I have a problem getting my reports working in the designer in vs.net
> 2005. I have migrated a sql server 2000 report server project to 2005
> and added my custom data processing extension to the config files. The
> reports works in the report server but although I have added data
> extension to both RSReportDesigner.config and given it full trust in
> RSPreviewPolicy.config in much the same way as in the reportserver
> config files I cant get it to work.
> This is my entry in the RSReportDesigner.config in the Data Section:
> <Extension Name="HM_SQL_3"
> Type="HM.IPS.Report.DataExtension.PermissionProvider.Connection,
> HM.IPS.Report.DataExtension"/>
> And this is my entry in the RSPreviewPolicy.config:
> <CodeGroup class="UnionCodeGroup" version="1"
> PermissionSetName="FullTrust" Name="HM_IPSPermission3"
> Description="Group for HM DataExtension3">
> <IMembershipCondition
> class="UrlMembershipCondition" version="1"
> Url="C:\Program Files\Microsoft Visual
> Studio 8\Common7\IDE\PrivateAssemblies
> \HM.IPS.Report.DataExtension.dll"/>
> </CodeGroup>
> and I still get :
> an attempt has been made to use a data extension 'HM_SQL_3' that is
> not registered for this report server
> when I try to preview reports.
> Does anyone have any idea what to try next? This worked flawlessly in
> vs.net 2003 and as mentioned before it works when I use the Report
> Server through the web.
This link might be helpful (refer to Bryan E's final response):
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/e1289b66066a07b9/0ba37f7653d8a851?lnk=st&q=an+attempt+has+been+made+to+use+a+data+extension+that+is&rnum=1#0ba37f7653d8a851
Regards,
Enrique Martinez
Sr. Software Consultant

Deploying a managed code trigger

I am working on a managed code trigger using visual studio 2005 and SQL 2005
.
When I try to deploy it I get the following error:
Incorrect syntax near 'EXTERNAL'. You may need to set the compatibility
level of the current database to a higher value to enable this feature. See
help for the stored procedure sp_dbcmptlevel.
I have set the assembly permission level to safe.
The database I am using is one I restored from SQL 2000 into SQL 2005. I
tried setting the datbase compatibility level to 8, and then to 7, and still
get the same error. Any ideas?
Ron Coffee, MCSD> The database I am using is one I restored from SQL 2000 into SQL 2005. I
> tried setting the datbase compatibility level to 8, and then to 7, and
> still
> get the same error. Any ideas?
CLR triggers were introduced in SQL 2005. Have you tried setting the
database compatibility level to 90 (SQL 2005)?
Hope this helps.
Dan Guzman
SQL Server MVP
"Ron_Coffee" <Ron_Coffee@.discussions.microsoft.com> wrote in message
news:181E0D5F-D699-477C-B266-31D2AE5B464E@.microsoft.com...
>I am working on a managed code trigger using visual studio 2005 and SQL
>2005.
> When I try to deploy it I get the following error:
> Incorrect syntax near 'EXTERNAL'. You may need to set the compatibility
> level of the current database to a higher value to enable this feature.
> See
> help for the stored procedure sp_dbcmptlevel.
>
> I have set the assembly permission level to safe.
> The database I am using is one I restored from SQL 2000 into SQL 2005. I
> tried setting the datbase compatibility level to 8, and then to 7, and
> still
> get the same error. Any ideas?
> --
> Ron Coffee, MCSD|||You'll need compatibility level 9 -- SQL 2005 is version 9.0
"Ron_Coffee" wrote:

> I am working on a managed code trigger using visual studio 2005 and SQL 20
05.
> When I try to deploy it I get the following error:
> Incorrect syntax near 'EXTERNAL'. You may need to set the compatibility
> level of the current database to a higher value to enable this feature. Se
e
> help for the stored procedure sp_dbcmptlevel.
>
> I have set the assembly permission level to safe.
> The database I am using is one I restored from SQL 2000 into SQL 2005. I
> tried setting the datbase compatibility level to 8, and then to 7, and sti
ll
> get the same error. Any ideas?
> --
> Ron Coffee, MCSD|||Thanks! That solved it
--
Ron Coffee, MCSD
"Dan Guzman" wrote:

> CLR triggers were introduced in SQL 2005. Have you tried setting the
> database compatibility level to 90 (SQL 2005)?
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Ron_Coffee" <Ron_Coffee@.discussions.microsoft.com> wrote in message
> news:181E0D5F-D699-477C-B266-31D2AE5B464E@.microsoft.com...
>
>

Saturday, February 25, 2012

Deployed report with custom assembly fail when calling web service

Hi,
I'm developing a report that calls a web service using a custom assembly.
I've got the code working in VS.NET, but when I deploy to my local Report
Server, I get this:
System.Security.SecurityException: Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed
I have added the following to RSReportServer.config:
<CustomAssemblies>
<Assembly Name="cmcs.wsclient.dll, Version=1.0.xxx.xxxx,
Culture=neutral, PublicKeyToken=xxx">
<PermissionSet class="System.Security.PermissionSet">
<IPermission
class="System.Security.Permissions.SecurityPermission"
version="1"
Flags="Execution, Assertion"
/>
<IPermission class="System.Security.Permissions.WebPermission"
version="1"
Unrestricted="true"
/>
<IPermission
class="System.Security.Permissions.EnvironmentPermission"
version="1"
Unrestricted="true"
/>
</PermissionSet>
</Assembly>
<Assembly Name="cmcs.msrs.webserviceclient, Version=1.0.xxx.xxxx,
Culture=neutral, PublicKeyToken=xxx">
<PermissionSet class="System.Security.PermissionSet">
<IPermission
class="System.Security.Permissions.SecurityPermission"
version="1"
Flags="Execution, Assertion"
/>
<IPermission class="System.Security.Permissions.WebPermission"
version="1"
Unrestricted="true"
/>
<IPermission
class="System.Security.Permissions.EnvironmentPermission"
version="1"
Unrestricted="true"
/>
</PermissionSet>
</Assembly>
<Default>
<PermissionSet class="System.Security.PermissionSet">
<IPermission
class="System.Security.Permissions.SecurityPermission"
version="1"
Flags="Execute"
/>
</PermissionSet>
</Default>
</CustomAssemblies>
In rssrvpolicy.config, I have changed the PermissionSet for
Report_Expressions_Default_Permissions to FullTrust and added the following:
<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Attributes="LevelFinal"
Name="ReportServer-cmcs.msrs.webserviceclient"
Description="Codegroup generated by the .NET
Configuration tool">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="file://C:/Program
Files/Microsoft SQL Server/MSSQL/Reporting
Services/ReportServer/bin/cmcs.msrs.webserviceclient.dll"/>
</CodeGroup>
It works to call a HelloWorld method returning a string from the custom
assembly, so there is no total failure, but calling the method to invoke the
web service fails.
Please help, I feel that I'm totally stuck!
JonasBy moving my CodeGroup in rssrvpolicy.config to right under the first
default CodeGroup, it I got it to work ...
<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="Nothing">
<IMembershipCondition
class="AllMembershipCondition"
version="1"
/>
***** RIGHT UNDER HERE *****
It seems like my CodeGroup wasn't used by ReportServer until the move. We'll
just have to see how long time it will work before it breaks again ;-)
Jonas" <Jonas@.nospam.pl> wrote in message
news:u$YVj30IGHA.1032@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I'm developing a report that calls a web service using a custom assembly.
> I've got the code working in VS.NET, but when I deploy to my local Report
> Server, I get this:
> System.Security.SecurityException: Request for the permission of type
> System.Security.Permissions.SecurityPermission, mscorlib,
> Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed
> I have added the following to RSReportServer.config:
> <CustomAssemblies>
> <Assembly Name="cmcs.wsclient.dll, Version=1.0.xxx.xxxx,
> Culture=neutral, PublicKeyToken=xxx">
> <PermissionSet class="System.Security.PermissionSet">
> <IPermission
> class="System.Security.Permissions.SecurityPermission"
> version="1"
> Flags="Execution, Assertion"
> />
> <IPermission class="System.Security.Permissions.WebPermission"
> version="1"
> Unrestricted="true"
> />
> <IPermission
> class="System.Security.Permissions.EnvironmentPermission"
> version="1"
> Unrestricted="true"
> />
> </PermissionSet>
> </Assembly>
> <Assembly Name="cmcs.msrs.webserviceclient, Version=1.0.xxx.xxxx,
> Culture=neutral, PublicKeyToken=xxx">
> <PermissionSet class="System.Security.PermissionSet">
> <IPermission
> class="System.Security.Permissions.SecurityPermission"
> version="1"
> Flags="Execution, Assertion"
> />
> <IPermission class="System.Security.Permissions.WebPermission"
> version="1"
> Unrestricted="true"
> />
> <IPermission
> class="System.Security.Permissions.EnvironmentPermission"
> version="1"
> Unrestricted="true"
> />
> </PermissionSet>
> </Assembly>
> <Default>
> <PermissionSet class="System.Security.PermissionSet">
> <IPermission
> class="System.Security.Permissions.SecurityPermission"
> version="1"
> Flags="Execute"
> />
> </PermissionSet>
> </Default>
> </CustomAssemblies>
> In rssrvpolicy.config, I have changed the PermissionSet for
> Report_Expressions_Default_Permissions to FullTrust and added the
following:
> <CodeGroup class="UnionCodeGroup"
> version="1"
> PermissionSetName="FullTrust"
> Attributes="LevelFinal"
>
Name="ReportServer-cmcs.msrs.webserviceclient"
> Description="Codegroup generated by the .NET
> Configuration tool">
> <IMembershipCondition class="UrlMembershipCondition"
> version="1"
> Url="file://C:/Program
> Files/Microsoft SQL Server/MSSQL/Reporting
> Services/ReportServer/bin/cmcs.msrs.webserviceclient.dll"/>
> </CodeGroup>
> It works to call a HelloWorld method returning a string from the custom
> assembly, so there is no total failure, but calling the method to invoke
the
> web service fails.
> Please help, I feel that I'm totally stuck!
> Jonas
>