Showing posts with label deployment. Show all posts
Showing posts with label deployment. Show all posts

Thursday, March 8, 2012

CLR Deployment

I'm attempting to deploy CLR Stored Procedures from Visual Studio 2005.

I have a VS Database project with stored procedures for all of the tables in our database. (I would really like to keep everything together in 1 DLL), everything seems fine except...

I keep receiving the following error when attempting to deploy to SQL Server:

Error 1 Timeout expired. The timeout period elapsed prior to completion of
the operation or the server is not responding.

After some experimentation I have determined that its because the DLL is too
large: 1.8 mb. (I also have a larger one).

I have looked through various documentation sources but have found none
concerning this problem other than specifing something aboug a 100ms
execution timeout (not sure if this is the same).

Deployment works if I trim down the size of the DLL (i.e., remove procedures from the solution)

Is there anyway to deploy large DLLs to SQL Server without having to break
them up? If so, where is the setting to allow a longer timeout period for
deployment?

You could create script manualy. Just use CREATE ASSEMBLY/CREATE PROCEDURE and other statements.|||

Thanks for the reply.

Yes I know I could do that, but it is so much easier to use VS.

Also the major time consuming problem is the number of tables and procedures.

Heres the scenario.

We have 2 databases, 1 flat, 1 relational. (Same problem is occuring on both).

The flat database has been imported from FoxPro 2.6 DBF's for conversion into the relational to supply historic data to an application upgrade. Needless to say there are a large number of tables. I have utilized ApexSQL to generate CLR Stored Procedues for each table. (i.e., INSERT,UPDATE,DELETE,SELECT, and so on...)

VS Compiles the source with no errors, it is just during deployment to SQL Server. As a work around for now I have split the .CS files into somewhat logical groups and created a seperate VS solution for each, all of these deploy with no problems.

For documentation and maintenance I would rather keep everything together in one VS Solution for each Database.

Again thanks for your reply.

Glenn

CLR Deployment

I'm attempting to deploy CLR Stored Procedures from Visual Studio 2005.

I have a VS Database project with stored procedures for all of the tables in our database. (I would really like to keep everything together in 1 DLL), everything seems fine except...

I keep receiving the following error when attempting to deploy to SQL Server:

Error 1 Timeout expired. The timeout period elapsed prior to completion of
the operation or the server is not responding.

After some experimentation I have determined that its because the DLL is too
large: 1.8 mb. (I also have a larger one).

I have looked through various documentation sources but have found none
concerning this problem other than specifing something aboug a 100ms
execution timeout (not sure if this is the same).

Deployment works if I trim down the size of the DLL (i.e., remove procedures from the solution)

Is there anyway to deploy large DLLs to SQL Server without having to break
them up? If so, where is the setting to allow a longer timeout period for
deployment?

You could create script manualy. Just use CREATE ASSEMBLY/CREATE PROCEDURE and other statements.|||

Thanks for the reply.

Yes I know I could do that, but it is so much easier to use VS.

Also the major time consuming problem is the number of tables and procedures.

Heres the scenario.

We have 2 databases, 1 flat, 1 relational. (Same problem is occuring on both).

The flat database has been imported from FoxPro 2.6 DBF's for conversion into the relational to supply historic data to an application upgrade. Needless to say there are a large number of tables. I have utilized ApexSQL to generate CLR Stored Procedues for each table. (i.e., INSERT,UPDATE,DELETE,SELECT, and so on...)

VS Compiles the source with no errors, it is just during deployment to SQL Server. As a work around for now I have split the .CS files into somewhat logical groups and created a seperate VS solution for each, all of these deploy with no problems.

For documentation and maintenance I would rather keep everything together in one VS Solution for each Database.

Again thanks for your reply.

Glenn

Sunday, February 12, 2012

ClickOne Deployment and SQL Server Express

This is probably a dumb question. But if I embed a SQL Server Express database into my project and then attempt to deploy it via ClickOnce, will I be able to access that database using the SQL Server Management Studio Express CTP if it is installed on the same machine as the client that my app would be installed?

It depends...

ClickOnce deploys the database basically using XCopy and then VS employs a new feature of SQL Express called User Instances to allow the application to start up a special instance of SQL Server and attach the database to that instance at runtime. (Read more about User Instances)

You can use Management Studio to connect to this deployed database while the user instance is running and the database is attached, but not once it shuts down. User Instances eventually shut down when there are no connections open to them. You have to know the Pipe name to connect to a User Instance and you can learn more about how to get the Pipe name and use it to connect to the User Instance in this BOL topic.

Regards,

Mike Wachal
SQL Express team

-
Check out my tips for getting your answer faster and how to ask a good question: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=307712&SiteID=1

|||

Hi,

I encounter a problem when trying to deploy my project (VB2005 Express & SQL2005 Express) by using ClickOnce.

The connectionString is "

connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=;AttachDbFilename=|DataDirectory|\MyDB.mdf;Integrated Security=True;User Instance=True"

After the program is intalled on a client computer, when running, it throws an error: "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance." I checked the SQL server is runnning on the computer. The user name used to log on has administrator privilege. The computer has multiple user accounts.

If I change User Instance=False in the ConnectionString, it throws an exception when debuging run the program: "An attempt to attach an auto-named database for file C:\.....\bin\Debug\MyDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

I cann't figure out why. Any help would be appreciated.

Thanks.