Showing posts with label deploy. Show all posts
Showing posts with label deploy. Show all posts

Friday, March 9, 2012

How do I find the server name?

I need to deploy a multi-user application to several different customers. My app was built on VB.net and uses SQL Server Express. For remote client to connect to the server I understand that I need to use a connection string something like this:
“Server=ServerName;Database=myDB;Trusted_Connection=True;”

My question is, how will I know what the server name is? Can that be different for different customers? When I test this on my PC, I use (Server=.\SQLEXPRESS;), but what do I use for deployment?

Thanks.

hi,

for each "remote" client, you have to store (on each client) the server instance name they are pointing to...

if I have to connect form my machine to your SQLExpress instance, I should connect to YourMachineName\SQLExpress, as you installed a named instance...

you can perhaps have a look at http://www.sqldev.net/misc.htm for 3 different way to enlist SQL Server instances on the lan...

regards

|||

Thank you Andrea for your response. I would like to make the installation an automated process using InstallShield. I will have two install packages - one for Server and the other for Clients. How can I find the ServerName during the client install?

P.S: I was trying to locate a relevant article/info at the site you mentioned, but could not find any. I would appreciate it if you can point me to a specific article.

|||

hi,

unfortunately, usually you can't...

say you install the "clients" before SQL Server ()... how can you tell what the server name is?

you can perhaps, in your InstallShield code, try instantiating a SQL-DMO.SQLServer object to perform a network scan of installed instances, but this will fail if SQL-DMO has not been already locally installed on the client workstation..

but you can find "smart" solutions.. you can define a share where all your client will point to in order to read some "config" file where they can find the SQL Server they will connect to, but you are there again.. how can you define the network share your app should look for at install time?

so just provide, in your client application, a tool\dialog to define the server name.. at very first startup it could be void and the dialog can automatically pop up, so that the user can finally "browse for installed SQL Server instances" the way you like or is just required to type it's name as the local admin already reported him by internal mail

regards

|||

Thank you for your reply. I have written below what I am thinking as to how I may go about it. Please review and let me know if you have suggestions or comments.

On the install CD, there will be only a Server Install package. During the server installation, it creates a "Client Install" folder and copies Client Install files to that folder. Also it creates a text file called "ServerName.txt" in the same folder and writes the Server's Computer name on it.

To install a client, from the client machine user needs to access the folder on the server and run install. The Client install process reads the Server Computer Name and creates a registry entry on the client.

My application, when run, it reads the "Server's Computer Name" from the registry and coins the connection string and connects to the server.

Please let me know if I can make this process more efficient.

Thanks.

|||

hi,

yes, this can be a "smart" solution...

regards

Sunday, February 19, 2012

How do I deploy XSL file to Reports Server?

Hi:
I have developed a report that uses and XSLT file to format data found in a
CLOB field from our DB2 database. It works just great in Report Designer,
but when I deploy to the Reporting Server, it does not render the data from
the CLOB but rather an error.
The value of the text box is
= Code.transform(Fields!TXT.Value, "C:\XSL\ClearinghouseException.xsl")
I have created a C:\XSL directory on the Reports Server and placed a copy of
the ClearingHouseException.xsl file in it, but it just isn't working.
What am I doing wrong?
Thanks.
Bruce.If this works from development and not from production then you are hitting
a security problem. Could be one of two places, either the rights on the
c:\xsl directory OR (more likely) the rights for the code you are executing.
By default RS limits what code can do to only safe things, which accessing
the file system is definitely not safe. I suggest reading up on what you
would have to do if you were using your own assemblies (this isn't your own
assembly but it is the same thing). You might need to have thise be your own
assembly instead of code behind in order to get the proper security rights
but I am not sure. I feel pretty confident it is one of these two things.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"bwschiek@.hotmail.com" <bwschiekhotmailcom@.discussions.microsoft.com> wrote
in message news:8C18EF57-E9AC-47D8-9081-B761360C5F8E@.microsoft.com...
> Hi:
> I have developed a report that uses and XSLT file to format data found in
a
> CLOB field from our DB2 database. It works just great in Report Designer,
> but when I deploy to the Reporting Server, it does not render the data
from
> the CLOB but rather an error.
> The value of the text box is
> = Code.transform(Fields!TXT.Value, "C:\XSL\ClearinghouseException.xsl")
> I have created a C:\XSL directory on the Reports Server and placed a copy
of
> the ClearingHouseException.xsl file in it, but it just isn't working.
> What am I doing wrong?
> Thanks.
> Bruce.|||Hi Bruce:
Thanks for the reply, although the "assembly" approach seems like a lot of
work to get right...
I did read in one book on RS that you could upload the XSL file to the same
folder in Report Manager and it could be accessed from there. Of course, it
didn't say how the report would call the file, ie: the normal C:\ path
wouldn't work. Is it possible to point to the file in the Report Manger
folder?
Thanks again.
Bruce.
"Bruce L-C [MVP]" wrote:
> If this works from development and not from production then you are hitting
> a security problem. Could be one of two places, either the rights on the
> c:\xsl directory OR (more likely) the rights for the code you are executing.
> By default RS limits what code can do to only safe things, which accessing
> the file system is definitely not safe. I suggest reading up on what you
> would have to do if you were using your own assemblies (this isn't your own
> assembly but it is the same thing). You might need to have thise be your own
> assembly instead of code behind in order to get the proper security rights
> but I am not sure. I feel pretty confident it is one of these two things.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "bwschiek@.hotmail.com" <bwschiekhotmailcom@.discussions.microsoft.com> wrote
> in message news:8C18EF57-E9AC-47D8-9081-B761360C5F8E@.microsoft.com...
> > Hi:
> >
> > I have developed a report that uses and XSLT file to format data found in
> a
> > CLOB field from our DB2 database. It works just great in Report Designer,
> > but when I deploy to the Reporting Server, it does not render the data
> from
> > the CLOB but rather an error.
> >
> > The value of the text box is
> >
> > = Code.transform(Fields!TXT.Value, "C:\XSL\ClearinghouseException.xsl")
> >
> > I have created a C:\XSL directory on the Reports Server and placed a copy
> of
> > the ClearingHouseException.xsl file in it, but it just isn't working.
> >
> > What am I doing wrong?
> >
> > Thanks.
> >
> > Bruce.
>
>|||Sorry, I haven't tried to get to a file. Since I haven't had to mess with
the security stuff for assemblies I can't help too much there (or with
getting to the file). It does make sense for security reasons that they
would not by default allow access to the hard drive.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"bwschiek@.hotmail.com" <bwschiekhotmailcom@.discussions.microsoft.com> wrote
in message news:EE73655D-F3D0-4525-A03B-04DE703FB560@.microsoft.com...
> Hi Bruce:
> Thanks for the reply, although the "assembly" approach seems like a lot of
> work to get right...
> I did read in one book on RS that you could upload the XSL file to the
> same
> folder in Report Manager and it could be accessed from there. Of course,
> it
> didn't say how the report would call the file, ie: the normal C:\ path
> wouldn't work. Is it possible to point to the file in the Report Manger
> folder?
> Thanks again.
> Bruce.
> "Bruce L-C [MVP]" wrote:
>> If this works from development and not from production then you are
>> hitting
>> a security problem. Could be one of two places, either the rights on the
>> c:\xsl directory OR (more likely) the rights for the code you are
>> executing.
>> By default RS limits what code can do to only safe things, which
>> accessing
>> the file system is definitely not safe. I suggest reading up on what you
>> would have to do if you were using your own assemblies (this isn't your
>> own
>> assembly but it is the same thing). You might need to have thise be your
>> own
>> assembly instead of code behind in order to get the proper security
>> rights
>> but I am not sure. I feel pretty confident it is one of these two things.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "bwschiek@.hotmail.com" <bwschiekhotmailcom@.discussions.microsoft.com>
>> wrote
>> in message news:8C18EF57-E9AC-47D8-9081-B761360C5F8E@.microsoft.com...
>> > Hi:
>> >
>> > I have developed a report that uses and XSLT file to format data found
>> > in
>> a
>> > CLOB field from our DB2 database. It works just great in Report
>> > Designer,
>> > but when I deploy to the Reporting Server, it does not render the data
>> from
>> > the CLOB but rather an error.
>> >
>> > The value of the text box is
>> >
>> > = Code.transform(Fields!TXT.Value, "C:\XSL\ClearinghouseException.xsl")
>> >
>> > I have created a C:\XSL directory on the Reports Server and placed a
>> > copy
>> of
>> > the ClearingHouseException.xsl file in it, but it just isn't working.
>> >
>> > What am I doing wrong?
>> >
>> > Thanks.
>> >
>> > Bruce.
>>