Question about deploying a SQL compact database with Clickonce. Deploying the first time is straightforward and that works OK but I am not so sure about consequent releases, how do I deal with the that?
If I mark the file as dont deploy that will, of course, work fine for those that have installed the first release but not for thoses that havent.
What about if I make a change to the database, adding a table for example. How do I go about that? I obviously dont want to loose any of the existing data?
Am getting errors trying to deploy a dtsx created by ms (the reporting services execution log one) to which I have made zero changes, but it is not working (2 errors shown below)
error from deployment wizard: ===================================
Could not save the package "H:SSISRSlogRSExecutionLog_UpdateinDeploymentRSExecutionLog_Update.dtsx" to SQL Server "xxxxxxxxxxx". (Package Installation Wizard)
===================================
The SaveToSQLServer method has encountered OLE DB error code 0x80004005 (Login timeout expired). The SQL statement that was issued has failed.
I'm working on an app in Visual Studio 2005 that needs to have installed locally SQL Express to handle its own data.
This app is in a strong upgrading process. I've been using clickonce to publish the app and let my users upgrade automatically (by the way this works amazing ...).
Yet many times changes to the DB are made. Is there a simple way to upgrade their local SQL Express DB like click once does with the app?
SQL Express CTP 2 provides a checkbox that will enrol the user installing the software as a database administrator. If the user fails to check this box, they run as an ordinary user, and hence are not allowed to perform functions such as create database.
In the process of deploying an application via ClickOnce, if SQL Express is not present it will be installed automatically. Also, in the process of deploying a ClickOnce application, we should usually expect to need to create a new database. Currently, if the user takes the default install of SQL Express they will not be a database administrator and will not be able to create the database. The installation will thus fail.
Is anything being done with SQL Express for ClickOnce applications deploying to Vista that will allow us to automatically enrol the user installing SQL Express as a database administrator?
I have been using sql server everywhere for some time now in my desktop application. We use clickonce technology to deploy. I find that each time I update using clickonce my empty db file in the server gets updated with the application. Is it possible to do something such that the db file will not get updated with clickonce if it is present .
I'm working on a VB.Net 2005 application that uses SQLCE as a backend database.
Following the instructions on how to do a private installation (http://msdn2.microsoft.com/en-us/library/bb219482.aspx) so that admin rights were not needed, I successfully got it working as a ClickOnce deployment. But today during a demo for a client, they ran into this error while installing the latest version from our publishing URL:
"Unable to install or run the application. Application requires that assembly System.Data.SQLServerCe version 9.0.42 .... must be installed in the Global Assembly Cache."
Basically it's saying the user isn't an admin so they can't install. This is the problem I went to great lengths to try to avoid, and is the reason we are using SQL CE in the first place: admin rights are not required to install our application's database. To our knowledge, SQL CE is the only Microsoft product that fits this scenario.
Now, I haven't changed anything in the publishing of the application to my knowledge, and when I check the project prerequisites, the SQLCE engine still isn't in there (as summarized at the above URL). Again following the instructions at the URL above for private installation, the required assemblies are still part of the project's files.
It must be something I did to cause this, but I have no memory of changing anything in regards to this part of the application. Our deadline is in 4 days and I cannot continue development until I get past this issue.
Where do I look to fix this problem? A little help would be greatly appreciated.
I posted this in the SQL Server Express forum as well...
My app deployed via ClickOnce. It ships with a database creation script which creates the database in the ClickOnce data directory. Upon uninstall, the entire data folder is deleted successfully. But if you then reinstall the app, SQL Server Express still thinks the database exists. Right now, to get a re-install to work, I have to go into Management Studio Express, click on the db (get an pop-up error as the physical db file is no longer there) and then click delete.
So my question is... what system proc should I execute in the db creation script before I run the CREATE DATABASE command?
I'm trying to compact a SQL CE database programmatically. I've copied the code from MSDN, and it's fine as far as it goes, but there's a problem tying to compact a database in a ClickOnce application because you don't know the path to the database. You have to use the "|DataDirectory|" in your connection string to signify the path to the database. But when I try the file operations to replace the old database with the compacted version, I get an error message that the path "|DataDirectory|" is not valid. Here's the code:
I've written a ClickOnce app that deploys a Sql Server Express data file (.mdf) and log file (.ldf) along with the other application files. SQL Express SP2 is a prerequisite for this app. After the applicaiton installs and starts up it copies these files to a specific folder and attaches them by calling the AttachDatabase() method of a Microsoft.SqlServer.Management.Smo.Server object.
This method works fine using Windows XP, however when I run it on Windows Vista I get the following exception:
Microsoft.SqlServer.Management.Smo.FailedOperationException: Attach database failed for Server 'localhostSQLEXPRESS'. ---> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: Unable to open the physical file "C:WashMasterDatabasewasshmaster.mdf". Operating system error 5: "5(Access is denied.)".
This exception occurs when I try to programmatically attach the database.
I've searched through the MSDN forums for a solution and I've only found two suggestions:
1.) Create all database connections using a User Instance. 2.) Create the database (using SQL) in the target folder, rather than copying it over from the deployment folder.
I don't like the idea of using User Instances because my entire data access layer is currently written using Ole and I would rather not rewrite it if I don't have to. I cannot find any way to use User Instances with Ole.
I also don't like the idea of creating the database using SQL because it is fairly large.
Here are my questions:
1.) Can User Instances be used with Ole?
2.) Can I somehow programmatically set the permissions of the copied data and log files so that SQL Express can access them without error?
3.) Is there a better method for doing what I'm trying to do or am I destined to have to either rewrite in data access layer so I can use User Instances or create my large database rather than copy it to the target directory?
I'm attempting to grant rights to Report Builder as deployed as part of my TFS install. My problem is that I have to add my users to the builtinadmin group in order for them to see the report builder button on the SQL Server Reporting homepage & then have rights to launch the ReportBuilder click once app. I obviously do not want make users admins on the box, but I've tried adding them to all of the other groups having to do with SQLServer to no avail. How can I grant users access to launch the Report Builder app?
I'm posting this in the ClickOnce forums as well...
My application doesn't include the .mdf and .ldf files, rather it creates the database the first time the application is run using a script that is included in the build. I want to create the database in the ClickOnce data directory. The problem I'm having is that SQL Server complains when I execute the CREATE DATABASE command as follows:
CREATE DATABASE [C:Documents and SettingsxxxxxLocal SettingsApps2.0DataPQCK6EXN.5KGAW630RPT.VGOifie..tion_014028c05b1d6ec6_0001.0002_0e86966f19503c89DataiFieldMobile.mdf] ON PRIMARY ( NAME = N'myDatabase', FILENAME = N'C:Documents and SettingsxxxxxxLocal SettingsApps2.0DataPQCK6EXN.5KGAW630RPT.VGOifie..tion_014028c05b1d6ec6_0001.0002_0e86966f19503c89DatamyDatabase.mdf' , SIZE = 3136KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) LOG ON ( NAME = N'myDatabase_log', FILENAME = N'C:Documents and SettingsxxxxLocal SettingsApps2.0DataPQCK6EXN.5KGAW630RPT.VGOifie..tion_014028c05b1d6ec6_0001.0002_0e86966f19503c89DatamyDatabase_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) END
Here's the error:
System.Data.SqlClient.SqlException "The identifier that starts with 'C:Documents and SettingsxxxxxxLocal SettingsApps2.0DataPQCK6EXN.5KGAW630RPT.VGOifie..tion_014028c05b1d6ec6_0001.00' is too long. Maximum length is 128."
I have a sql express .mdf that is located in c:appdirectorymydb.mdf whilst developing an application. During development my connection string uses the above path to connect to the db. e.g.
I have published the app using click once in visual studio.net which places the db in : C:Documents and Settingsuser.nameLocal SettingsApps2.0DataJN1WL1DJ.X7B ... 08ed2810aab2abData
When i am executing the application following a clickonce install, what should I use in my connection string for the path to the db ? or where can I find the above path (e.g. in the registry) so that I can provide it to the connection string ?
Alternatively, can I specify where the DB is going to be installed (via click once). e.g. in my app directory under program files ?
I have tried searching what seems like everywhere for a solution to this problem and as a last resort thought it worth posting the question.
Dears,I have devoloped an application ASP.NET 2.0.Before I have builded the aspnetdb throught the command then I built some tables and stored procedures on this db. (My db is sql express 2005 and my hoster db is sql 2005 workgroup)My hoster doesn't allow connection Management studio express, doesn't allow attach or restore functionalities.Than I have built my script db (contains Tables, Views and Stored Procedures), I have substituted the dbo with my user account in the script because my hoster doesn't allow the dbo access.I have also transfered my site files (.aspx, img, etc.) on the server.When I try to access the db I receive this error (for example when I push on the button create user):The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file. Please could you help me? Thank you.
Hi All, Can anyone tell me,is it possible to create an exe or msi for sql stored procedures,tables and triggers?I want to deploy the database objects(stored proc,tables,views and functions) as an exe file..just like publishing and deploying the asp.net application.Is it possible for sql server database objects.Pls,let me know.
I'm deploying an ASP .Net application on which 20 users will be working at the same time. The database will start at less than 100mb. Is SQL EXPRESS 2005 powerfull enough to use for such an application. Thanks in advance for your answers
I have a report that I am trying to deploy. I right-clicked my report in the solutions explorer, then select "deploy" but then I get the following error:
Microsoft Report Designer The project cannot be deployed because no target server is specified. Provide a value for the TargetServerURL property in the property page for this project.
So then I go to the properties page but there isn't a TargetServerURL field! There is only a file name and full path field. Does anyone know what is wrong? Could it be that I need IIS installed on my machine?
More info: Software installed from http://www.microsoft.com/express/sql/download/default.aspx: -Microsoft SQL Server 2005 Express Edition -SQL Server Management Studio Express -Install Microsoft SQL Server 2005 Express Edition with Advanced Services -Microsoft SQL Server 2005 Express Edition Toolkit
Hi all,I'm new to SQLServer (Express edition) so I was wondering: if the webhost supports SQLServer 2005 do I just need to move the .MDF file to mydirectory on the web host to be able to use it?Thanks,Lorenzo
Hi all, I have created a database in MS-Access. I want to deploy that database on the local server, how can i do it?
Let me clear, i have created a DSN for my database. I want to deploy a report on RServer(on SQL Server2005). This DSN will be the datasource for the report. When i am trying to deploy this report with this DSN i am getting an error message "Cannot create a connection to data source 'DataSource2'. (rsErrorOpeningConnection)". Could any one help me?
I have created a report project file on my local machine.Now I'm trying to deploy those reports to a development server. I have installed sql server and tools in my local machine but never configured reporting services. When I try to deploy those reports, it asks username and password for reporting services login. But usually as far as I know, i should be able to deploy my reports without entering password etc. Even if I enter username and password, still they dont work. Is that becase I install SQL server in my local machine? Does anyone know why?
I am trying to deploy a project to localhost, but I get the following error. I have only one package in this project.
"Could not save the package "C:......lah.dtsx" to SQL Server "localhost".
I tried deploying other projects that I've successfully deployed before and those also fail with the same message. Am I missing something really basic here?
I have a web project and created a setup project for it. And I have to create reports using sql server reporting services. For this I have created an reportserver project and created two reports.
I have to create a setup file to install these reports in a remote machine.
How to do this?
where this .rdl and .rds files will be stored in the reportserver.
I'm attemping to deploy a crypto class that we use on a desktop app to SQL Server. I'll use the encryptstring/decryptstring found in this class as User Defined Functions on SQL Server. When I try to deploy the class I'm getting this error:
Error 1 Method, property or field 'EncryptString' of class 'EncryptingDecryptingOASISPWDS.Crypto' in assembly 'EncryptingDecryptingOASISPWDS' is not static. EncryptingDecryptingOASISPWDS
Hello all, I've looked through this forum and haven't found an answer to my question, but I'll make this short and sweet, as I know your time is valuable. I've taken a MS Access database and turned it into an SQL database for our server, it works. However, I want to make an identical database (to distribute to 30-40 employees) in SQL CE, so that employees can work on their laptops offline and sync their data to the main database when they return to the office. Am I going in the right direction, or is there a better way to do this? I won't bother you for a step-by-step, but any and all info/guidance you could provide would be of great use to me. Thanks for your time!!!
Hi all, Ther is a DSN (fileDSN, SystemDSN, UerDSN) on the client machine. User of the client machine has created a DSN which is connecting to the MS-Access database of his own machine. When user deploy that DSN to the Local Server, Server getting problem to finding the DSN (which is made on client). Please help me how to Deploy this DSN to server.
I do not have access to VS, but I hear it can do this... how can I do it without VS?
I am using CREATE ASSEMBLY to load dll form my server to SQLServer on my server (Same machine). How can I load the dll to another server? Do I have to write it on a directory on that server first? I tried to run the command from my pc connected to the other server, and I get a "cannot find file" error.
I am trying to write an installation for my application.
I am using an SQL Express database as well as an ODBC driver to connect and querry an existing interbase database.
Therefore the install needs to do the following:
Install .NET - done
Install SQL Express - done
Install application - done
copy some XML files - done
Install ODBC Driver - done
Create database - not done
I am using a setup and deployment project to do the above. I have also written a small application to install the ODBC Driver and attepmt to create the database which I intend to run as a custom action if possible.
I have used the SQL management studio script wizard to write an sql script for creating the database with the intention of using an SQLconnection to run the script into the database but I can't seem to be able to make the connection.
I am trying using the following connection string...
Data Source=.SQLEXPRESS;AttachDbFilename=C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDatamaster.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True
But I get the following error message...
System.Data.SqlClient.SqlException: Unable to open the physical file "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDatamaster.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
An attempt to attach an auto-named database for file C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDatamaster.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I have a problam. I wanna deploy my application that it has data.mdf file.
When I install and test it I get this message:
--------------------------- Microsoft SQL Server Login --------------------------- Connection failed: SQLState: '42000' SQL Server Error: 5133 [Microsoft][SQL Native Client][SQL Server]Directory lookup for the file "C:Program FilesMyDicDatabaseData.mdf" failed with the operating system error 5(Access is denied.). Connection failed: SQLState: '42000' SQL Server Error: 1832 [Microsoft][SQL Native Client][SQL Server]Could not attach file 'C:Program FilesMyDicDatabaseData.mdf' as database 'MyDic'.
--------------------------- OK ---------------------------