Creating A Database For Deployment In SQL Server
Nov 15, 2005I am in the process of designing a Windows Forms 2.0 app, and need advice on the recommended deployment/creation of the database for my customers.
View 1 RepliesI am in the process of designing a Windows Forms 2.0 app, and need advice on the recommended deployment/creation of the database for my customers.
View 1 RepliesHey guys,I'm having a problem. I've been given a task to complete. I was given a database, and asked to wrap a website around it with certain functionality. I did this, and added seven stored procedures in the proccess. Everything works, Business Logic Layer, Data Access Layer, error validation, even screwed around with SQL-injection protection. Lovely, yes?However, when my little website gets tested, it's going to be plugged into a fresh database - the exact same database I was given, only with different data in the tables. My stored procedures won't be in that database. I can detect if my stored procedure doesn't exist easily enough by catching the error at runtime and checking the code. I would like to create the stored procedure inside that catch block. I just don't know how.The easy answer is just to use embedded SQL in my application instead of stored procedures. This isn't a commercial application, it's just a task I've been given to test my abilities. But embedded SQL is icky. I'd rather do it properly.
View 1 Replies View RelatedHi,
Please can you let me know which of the following 2 is a better method to deploy SSIS packages
File System deplyment OR SQL Server deployment
What are the advantages of one over the other?
Thanks,
Mrinali
Good Afternoon.
I am trying to write a short application within which I would like to embed a SQL Server Express database, all of which would be deployed via ClickOnce through a web site. The installation process seems to be working without trouble, including installation of the .NET Framework 2.0 and SQL Server Express 2005.
When the application launches on the new machine, however, I get a big Microsoft .NET Framework "Unhandled exception" error dialog box that indicates the database already exists and that the database file could not be attached. I am working with a clean virtual machine that I know has never had the database installed on it.
I fear I am overlooking something quite straightforward, but since this is the first time I have ever attempted to build a data-bound application, I am not sure where I am going wrong.
Perhaps the source of the problem, or a related problem, might be revealed even when I run the application in debug mode from within Visual Studio. I can run the application once, but if I try to run it again, I get an error when I try to open the database connection that is similar in content (database already exists...could not attach). I can run the SSEUtil and detach the database and then run the application again in debug mode and it works no problem (the first time!).
Lastly, if I install the application on the machine on which it was developed and make sure the database is detached, it will run without any trouble (even repeatedly). But, on a new blank machine, there is no database listed that matches my database name, so I cannot try to detach anything!?
My apologies for such a novice question!
Sean
Hi,
I am using SQL Server 7.0..When I go to the Enterprise Manager and try to Create a New database, the Datafile defaults to C:MSSQL7 and the Transaction Log Defaults to C:MSSQL7 folders...
Is there some setting on the Server itself so that the defaults are different..Like D:Data etc....
I know I can type in the correct folder but my main question is that is there some setting in Enterprise Manager or some System Table so that a new database and its Transaction Log is created on a different default drive..
Thankx
KP
Hi guys,
This is the first time I ever touched on SQL database. Is there any tutorial or guide online that I can read on. Because at the moment I don't even know where to begin. I don't even know how to create the tables in SQL server.
Basically I need to transfer data from MS access tables and save them in the SQL server. Say, hourly basis. But I only want the new data at every hour. So how should I go about the procedure?
By the way, is there a limit to the size of the SQL server? or I can have unlimited amount of data?
ThxThx a lot!!!!
I have two problems on creating new SQL server database in Visual Web Developer 2005 Express using SQL server 2005 Express.
The 1st problem: (It is resolved)
After installed SQL Server 2005 express and Visual Web Developer 2005 Express. When I tried to create a SQL server database in VWD the following error occurred:
"connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=49251"
I was stuck with this problem for few days. I did several times of install/reinstall of VWPExpress and SQL server Express, made very sure following proper de-installation sequence as specified in the release readme. But it did not resolve the problem.
Latter I found out that if I login with another Windows XP user account, I don't get the problem.
Changing the security authority of XP file systems and IIS didn't help.
And to prove that I was doing the installation correctly, I tried a new installation of the VWDExpress with SQL server 2005 express in another machine, it worked and I could create new empty SQL database.
After 2 days of frustrating changing of options, parameters, server names, messing with the registry etc.... Finally, I found a way to overcome this problem.
The solution is:
In Visual Web Developer 2005 Express, select:
Tools -> Options -> Database Tools -> Data Connections,
Change the setting: "SQL Server Instance Name (blank for default)" to "SQLEXPRESS". (where SQLEXPRESS is the default server instance name)
That solved this 1st problem.
I still don't know the exact reason for this problem. But I recalled I did installed the VWDExpress few weeks ago, I might have installed it without selecting SQL server 2005 express at that point. I guess the subsequent install/re-install did not clean up those junk in the registry.
I still have the 2nd problem:
The "Create new SQL database..." option is always grayed out when I right click on the Data connections in the "Database Explorer" tab.
I have a bypass for this difficulty for time being:
I have to do it by using the "Add connection....", put in the server name: "myserver/SQLEXPRESS" and a new database name.
Any input form anyone ? Appreciated!
can i create a table within the aspnetdb.mdf???
I created a database from SQL server set up wizard, and the
database i make copy exactly what a aspnetdb.mdf(from tables to
stored procedure) has..Can i change or add some files,tbles and
stored procedure to it...
I'll using SQL Express Edition...
can i know what is the best way to implement the database i created
if im going to setup ,manually my database (without set up
wizard)can I copy the tables and stored procedure in aspnetdb.mdf
in my database??
thanks for the answer...
thanks and more power...
Hi,
platform window xp, SQL Server
I have created a new server registration called 'MASTECH'
with this registration I have created a database called 'youngerNow'
As far as I am aware, no username nor password have been created.
I wish to access the database through asp.
I attempt to create connection with below code
strConn = "Provider=SQLOLEDB; Data Source=mastech; Initial Catalog=youngerNow"
Set Conn=Server.createObject("ADODB.Connection")
Conn.Open strConn
Conn.Close
however I am getting the below error.
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Login failed for user 'IUSR_MASTECH'. Reason: Not associated with a trusted SQL Server connection.
/younger now/books.asp, line 199
Anyway help would be appreciated.
regards
steve
Hello all,
I am new to MS SQL Server and am having troubles figuring out how to create a new database file. I have installed everything I can and and still cannot find any where to add a database file. I am upgrading from Access to SQL and feel like I am missing something... I will eventually need to create a couple of SQL databases and connect from Classic ASP and ASP.net in different applications. Before I worry about how to connect I need ot create something to connect to.
Any help would be greatly appreciated.
Thanks
Panhead
Hi all, I'm new to sql server ce and would like to know how can I create the sdf file?
Is it the sdf file have to be published from sql server 2005? Are there any other ways to do? Coz I planned to write a win32 application to create the sdf file then deploy it the mobile device, but I found I cannot add the System.Data.SqlServerCe reference into the win form in Visual Studio.
Thx a million~
I have a newbie question here. I have a SQL Server Database and I need to create a column that displays the row number. I tried adding an Identity Primary Key which worked until a row got deleted and the count was off. How do I create a column that displays the row number and recounts when a row is deleted. Thanks!
View 1 Replies View RelatedPlease forgive me if I'm in the wrong category...
How do you deploy changes to a database? Is there something you can run to compare the two versions and create a script to do this? I've heard about the DTS package (now DTSX I believe) but am not sure how to set one up. If anyone could point me to an article or something that might clear things up, it would be greatly appreciated. Thank you!
Hello
I am currently developing a big winforms project that connects to a SQL Server 2005 database.
The idea is that the application will be deployed on random clients whenever needed. These clients have neither SQL Server installed, nor is there a server to provide a central database. The only option is to include the database file with the deploy.
Now, I've searched all around the internet on how to do this. I just can't seem to connect to the database-file from my deployed version. Is there something special that needs to be done?
Regards
- Varcour
when i trying to create a new database diagram
it shows :
An unexpected error happened during this operation
[Ms design tools] - Invalid class string
can any 1 explain for me?
thank you
Hi all,
I hope someone can help me with linked servers.
In one of my applications running on a MSSQL database, I need to issue a select call to an Oracle database to pull information into my application.
To accomplish this,
1. the ORacle Admin has created a view of the Oracle database for me.
2. I have installed the Oracle client on the SQl server box.
3. A friend has told me that one way to accomplish this is create a linked server from SQL to use OLE/DB for Oracle to connect to the Oracle database
4. So I create the linked server successfully; create the server login sp_addlinkedsrvlogin successfully
5. When I go to query the database, I get the error below:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDAORA' reported an error.
[OLE/DB provider returned message: The Oracle(tm) client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 (or greater) client software installation.
You will be unable to use this provider until these components have been installed.]
Anybody understand this?
Thanks in advance,
Faustina
Hi All,I want to use MS sql server edition 2000. I have installed the server. Now iwant to create the database on this server with tables and triggers. Canplease someone suggest me how to do this ?Thanks a lot,Dinesh
View 1 Replies View RelatedHi,
We have recently been looking into creating our SQL Server 2005 database as a unicode database using UTF-8 encoding. However initial search's suggest that SQL Server 2005 does not support the creation of UTF-8 db's and only supports UCS-2. Is this the case? If so then why is it not supported as most other vendors (Oracle, IBM) support it. If it is possible to create a UTF-8 database could you provide some details on how to go about this?
Thanks,
Cathal
I have an application being developed in VS 2005 using SQL Express. I've built up some new roles and have several users pre-populated that I'd like to deploy to a shared hosting evironment.
The problem is that I seem to keep getting:
Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists. Choose a different database name.Cannot attach the file 'd:hostingmember
2agilitysite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.
I saw another post with a similar issue, but that resolution has not seemed to help. Can anybody give me insights as to where the "asanga" is coming from? That might help me diagnose the issue.
Thanks in advance
Greetings,I've been looking around all morning and can't seem to find a good answer on this so I thought I'd post a message here.I'm using the recommended practice of keeping the ASPNETDB.MDF data separate from my site data. (I have my site data located in separate databases but still keep them in the App_Data directory.)I'm using SQL Server 2005 Express on a Server 2003 box and I've implemented scheduled backups on the databases in the Sql Server.The questions I'm having are:1. Why isn't the ASPNETDB.MDF database getting attached to the server? Is it using User Instances?2. If it is using User Instance then isn't this degrading performance? If so, how to force it to not use User Instance?3. If User Instance is how it is supposed to work then how are we supposed to do a full backup of the ASPNETDB.MDF database if it isn't attached in the server? (xcopy doesn't seem to work on User Instances because of the dreaded "is being used by another process" error.)Any recommendations, advice, links, or answers to my questions would be greatly appreciated.
View 1 Replies View RelatedThis question has been asked before, with vague responses
I'm using Visual Web Developer 2005 Express, SQL Server 2005 Express and SQL Server Management Studio Express.
When I create an application with Login controls, VWD automaticlly creates a ASPENTDB.MDF security database. I also create my own database for my application e.g. abc.mdf. In other words, I have two databases. However, my hosting company supports only one database. What do I (we) do?
I have seen articles on: aspnet_regsql . Does this create a new database with all the security features of ASPNETDB.MDF built into my new database i.e. abc.mdf?
(A) If yes, how do you run it with SQL Server Managment Studio Express? It sounds silly, but I need instructions here please ... Also, do you run this against abc.mdf or do you use it create abc.mdf?
(B) If not, how do you achieve a single database scenario?
I'm sure this is a very common deployment question, which is very confusing for most of us hobbyists that want to deploy their web applications
I have a Visual Studio 2005 Database Project, with SQL Server 2005 scripts in it.
How do I make a deployment package with it?
How do guys deploy your database objects/scripts?
I have SQL Server 2005 installed with Sql Server Management Studio Express and when I open up the Management Studio program and try to create a new Database Engine I am getting the below errors:
Create failed for Database 'rufnek'. (Microsoft.SqlServer.Express.Smo)
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
I'm not a DBA, so I don't know where to look for information on this.
In SQL Server 2005, I can simply no longer create a user for the database I created. It asks that the user be associated with a login. That login is found in the Security folder of the database instance.
The question is: what is this instance security folder for? I don't recall having to do this in SQL Server 2000.
Any elaboration or links to such information would be appreciated.
I am creating a program that will take a master database and create separate databases for class room training.creating my own app to do this since it will have other stuff to do.i will have a master database that i will need to create multiple copies of. 2-20 copies, it is about 7GB large. it is used in a classroom training course for our company software. it will also copy a folder on the server onto multiple subfolders.each computer in the classroom will access its own copy of the database/windows folders.
What i am looking for is a fast/reliable way to create the multiple database copies. then when the training class is over and a new one is getting started, we will run my program to reset everything back to start.Should i detach/copy/attach or create a master backup and restore it 20 times. What kind of user access pitfalls will i need to look out for.
How to Deploy SQL server Database to another PC, How to create apackage that craetes Database as well as ODBC driver for accessing dataat enduser PC, using .Net VB
View 2 Replies View RelatedMy exploit environment:
VS.net 2003, SQL Server 2000 SP4, SQL Server CE 2.0 SP4
I write next codes:
Private cn As New SqlCeConnection("data source=my documentsSQLCECF.sdf")
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
If Not System.IO.File.Exists("my documentsSQLCECF.sdf") Then
Dim en As New SqlCeEngine("data source=my documentsSQLCECF.sdf")
en.CreateDatabase() 'create a blank database to subscribe
Synch()
End If
Catch err As SqlCeException
ShowErrors(err)
Catch err As Exception
MsgBox("There was an error:" & err.ToString())
End Try
End Sub
Sub Synch()
Try
Dim rep As SqlCeReplication = New SqlCeReplication
With rep
.Publisher = "192.168.0.222"
.PublisherDatabase = "CFLab"
.PublisherLogin = "sa"
.PublisherPassword = "sa"
.Publication = "CFLab"
.Subscriber = "SQLCENETCF"
.SubscriberConnectionString = "Provider=Microsoft.SQLServer.OLEDB.CE.2.0;Data Source=My DocumentsSQLCECF.sdf"
.InternetUrl = "http://192.168.0.222/SQLCE/sscesa20.dll"
' Create the Local SSCE Database subscription
rep.AddSubscription(AddOption.CreateDatabase)
rep.Synchronize() 'subscribe
End With
Catch err As SqlCeException
ShowErrors(err)
Finally
End Try
End Sub
Public Sub ShowErrors(ByRef e As SqlCeException)
Dim errorCollection As SqlCeErrorCollection = e.Errors
Dim bld As System.Text.StringBuilder = New System.Text.StringBuilder
Dim inner As Exception = e.InnerException
If Not inner Is Nothing Then
MessageBox.Show(("Inner Exception:" & inner.ToString()))
End If
For Each err As SqlCeError In errorCollection
bld.Append("/n Error Code: " + err.HResult.ToString("X", System.Globalization.CultureInfo.CurrentCulture))
bld.Append("/n Message : " + err.Message)
bld.Append("/n Minor Err.: " + err.NativeError.ToString())
bld.Append("/n Source : " + err.Source)
For Each numPar As Int32 In err.NumericErrorParameters
If 0 <> numPar Then
bld.Append("/n Num. Par. : " + numPar.ToString())
End If
Next
For Each errPar As String In err.ErrorParameters
If String.Empty <> errPar Then
bld.Append("/n Err. Par. : " + errPar)
End If
Next errPar
MessageBox.Show(bld.ToString())
bld.Remove(0, bld.Length)
Next err
End Sub
Private Sub btnShow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShow.Click
connect()
Dim query As String = "select * from FlightData"
Dim dap As New SqlCeDataAdapter(query, cn)
Dim dataset1 As New DataSet
dap.Fill(dataset1, "FlightData")
Disconnect()
End Sub
Sub connect()
Synch()
Try
cn.Open()
Catch err As SqlCeException
ShowErrors(err)
End Try
End Sub
Sub Disconnect()
Try
cn.Close()
Catch err As SqlCeException
ShowErrors(err)
End Try
End Sub
Private Sub dgdResults_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dgdResults.Click
End Sub
End Class
I want to synchronize the data from a SQLCE SERVER 2000
When i run the code above, the errors show:
Error Code:80040E17
MessageQL Server CE encountered problems in creating the SQL Sever CE database.
Error Code:80040E17
A data source with the specified name already exists.
I do not know what's going wrong..=(
Who can help me??!!! HELP~~~~~~~~~
thanks..
HiI'm using sqlexpress on development machine and on client server. I'm building a webapp using membership and role provided for asp. In web.config I have definet membership provider and role provider to point to my database.After web site deployment I get allways message : Failed to update database "c:appapp.MDF" because the database is read-only, and I'm forced to apply rights for ASPNET. More than that somethimes I must re-register users.I have tried to modify in web.config with <remove name="LocalSqlServer"/> <add name="LocalSqlServer"...> but I get errors if I try to design my dataset file:"Cannot get web application service".TIAPaul
View 4 Replies View Related
Hi Guys/Gals,
I have developed a database in Visual Studio 2005 (c#) ,using SQL Express as my database, on my local machine and deployed it to a different machine where it is being used in a live environment. No problems.
However, I have continued developing the application on my local machine and have made numerous additions to the structure of the database (on the development machine).
My question...How do I go about deploying the new database structure to the live machine without losing the live data?
Best regards
Jonny M.
Hi everyone,
we have some reference tables in in a specific database. that other applications need to have access to them. Is it possible to create a view in the application's database to retrive data from ref database while users just have access to the application Database not the view's underlying tables?
Thanks
I was attempting to create a linked server from SQL-Server2000 to an Access97 mdb file using the following scripts
EXEC sp_addlinkedserver
@server='REMOTE_OFFICE',
@srvproduct='Jet 4.0',
@provider='Microsoft.Jet.OLEDB.4.0',
@datasrc='F:RealEstate_Office1.mdb'
and
EXEC sp_addlinkedsrvlogin
@rmtsrvname='REMOTE_OFFICE',
@useself='false',
@locallogin='sa',
@rmtuser='Admin',
@rmtpassword=NULL
And while querying the linked server from the query analyzer using the following select command
SELECT *
FROM REMOTE_OFFICE.RealEstate_Office1.dbo.E_GOV_RE_OK
I got the following error
Server: Msg 7312, Level 16, State 1, Line 1
Invalid use of schema and/or catalog for OLE DB provider 'Microsoft.Jet.OLEDB.4.0'. A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog and/or schema.
OLE DB error trace [Non-interface error].
could you explain why this happen
I am trying to deploy a SQL Server Express database to a remote SQL Server 2005 host. I was planning to copy and paste the data from my local tables to the remote tables using Management Studio Express but my ISP (NTL) appears to be blocking port 1433 and preventing me from getting a connection to the remote database.
Will an upgrade to SQL Server 2005 Developer Edition help me? I understand that it has a Backup & Restore Wizard but how does this work? Does it rely on a remote connection and will it fall foul of the NTL port blocking? Or, can the file that the Backup stage produces be copied into the web-based MSSQL Manager, that my web host provides, to restore to the remote database?
Any help would be much appreciated.
Hi,
I work with a large team developing ASP.NET application that has a large database with over 50 complex stored procedures. It is proving more and more difficult and time consuming to centralise the development and update of the database changes and I was wondering if there were any best practises/tools that could be recommended. I have looked on the web for good articles and haven't found anything difinitive (except that Team Foundation Server is the way forward)..
A brief background to the current process is that everyone develops on the same database, and then updates the stored procedure scripts in source safe (manually). Then when we do a new release someone builds a script of all the database updates and runs it. There are issues related to developers updating there stored procedures over other peoples and other concurrency.
I am looking to move all the developers to start using local databases so that there work only effects them, but then this brings up problems of keeping all the local databases up to date whenever they get the latest source code. The only way I currently see is to build a database update program, that will run and update to the latest version.
Surely this must be a common issue? Anyone have any good ideas/concepts?
Also our setup is Visual Studio 2005, SQL Server 2005 and Source Safe 2005.
Cheers,
Andrew Thomas