Saving Original SQL Database And My.Settings When Reinstalling Or Updating
Apr 27, 2007
Hello all...
I am working on a project that contains several databases in SQL and many settings. The problem I am encountering is that I want to be able to update the program for all my customers. That is no problem.
The problem I am meeting is where, when the program is updated, all the settings and all the information in the databases reverts to the default values, or the values that were compiled with the new update.
I want to be able to update their program without deleting all the settings they have.
What's the diffrence between the Built-In account 'SERVICES' and the 'NT SERVICEALL SERVICES' ?I want to dploy a group poicy for 'user right assignment' -Â 'log on a service' to a server, which curretnly has among other things the 'NT SERVICEALL SERVICES'Â however i can't replicate this account for my GPO, (even locally on the server),I deploy the GPO and overwrite the server settings for 'user right assignment' -Â 'log on a service' and won't be able to revert back to the original settings..
Hi, I have an application where I'm filling a dataset with values from a table. This table has no primary key. Then I iterate through each row of the dataset and I compute the value of one of the columns and then update that value in the dataset row. The problem I'm having is that when the database gets updated by the SqlDataAdapter.Update() method, the same value shows up under that column for all rows. I think my Update Command is not correct since I'm not specifying a where clause and hence it is using just the value lastly computed in the dataset to update the entire database. But I do not know how to specify a where clause for an update statement when I'm actually updating every row in the dataset. Basically I do not have an update parameter since all rows are meant to be updated. Any suggestions? SqlCommand snUpdate = conn.CreateCommand(); snUpdate.CommandType = CommandType.Text; snUpdate.CommandText = "Update TestTable set shipdate = @shipdate"; snUpdate.Parameters.Add("@shipdate", SqlDbType.Char, 10, "shipdate"); string jdate =""; for (int i = 0; i < ds.Tables[0].Rows.Count - 1; i++) { jdate = ds.Tables[0].Rows[i]["shipdate"].ToString(); ds.Tables[0].Rows[i]["shipdate"] = convertToNormalDate(jdate); } da.Update(ds, "Table1"); conn.Close();
I have a task I wrote which does not always update the property value (as seen in the properties pane) Basically, change something on the form, then update the task host property with: this.taskHostValue.Properties["Duration"].SetValue(this.taskHostValue, Convert.ToInt32(spnDuration.Value));
Stepping through this, it does exactly what it is supposed to. Having a look at the property value, it confirms it has changed. Reopening the UI and resetting all the controls returns the expected results.
The package however does not realise it has changed. There is no * next to the package name in the top tabs. As long as the package thinks it is unchanged, SaveXML does not get called either so the tasks do not persist.
Changing the value on the properties pane works fine though.
The frustrating thing is this is slightly random. Slight in the sense that sometimes it works but most of the time it does not.
The sample code I used was the MS download IncrementTask (Which works BTW) so I can't see it as being a VS / SSIS bug but rather something I am / am not doing. 3 tasks I have written all behave the same. I have to "nudge" them before savign the package.
Hello,i am in great trouble. I want to revert back to original state ofdatabase before i performed restore database on my sql server 2KDatabase. Accidently i didn't take backup of my Database and i didrestore, so is there any way to get the original state back of myDatabase?Any suggestion will be highly appriciated.Regards,S. Domadia.
I have an original database that I want to copy once to another database. Then I want to update the data weekly with the data of the original database. I don€™t change any tables or columns in that part of the database. Just some tables more in the €˜new€™ database (than the tables from the original database) with some references to the tables that have to be updated weekly. How can I do this? (if you know what I mean... it's a sort of a datawarehouse where different sources come together.. that part that represents the original database is just a part of the datawarehouse. That part is exactly the same structure as the original database.)
I am trying to use SQL Express to support unit testing of functionality which requires database access.
I created an express database (.mdf) which contains a database snapshot which is the database environment that each test expects to see when it starts. Through the execution of the test the database will be modified arbitrarily and I need to reset the database to the original state before the next test executes.
Here's what I do today:
Before Test:
The original database is copied to a unique location in the temp directory A unique database name is generated (GUID-based) I connect to the new database file with:
When I do this, everything seems to work correctly but when I re-open the original database it has changed unexpectedly and includes the modifications that were made by the test as it ran.
Can anyone explain why this is happening and/or provide a solution?
Hi,Good morning to All. While doing practice I did some modifications to some tables in Northwind database.Now, how can I get my original tables back again? Take Oracle for example:We can modify table data. But when we run demobld.sql script then all tables will replaces with original entries. Like this I want in SQL Server also. Is there any such facility available in SQL Server? Thanks in advance,Ashok kumar.
I made a copy of a database "sac_prod" and named the new copy "vgs_prod". Now, when I do a backup of the new database, it still shows the name of the original. Is there any way to change this so it will be the same as the new database name?Here is the BACKUP script:BACKUPdatabase vgs_prod TODISK='\sac-srvr1data$TechnicalSharedProductionSQLBackup LasVegasvgs_prod_CopyOnly.BAK' with COPY_ONLYHere is the messages I received from this BACKUP:Processed 1752 pages for database 'vgs_prod', file 'sac_prod' on file 1.Processed 6 pages for database 'vgs_prod', file 'sac_prod_log' on file 1.BACKUP DATABASE successfully processed 1758 pages in 0.412 seconds (34.955 MB/sec). I would like to change the file 'sac_prod' to be 'vgs_prod' in lines 1 and 2 just above. Thanks,
I cannot open now my database after changing it name from the folder where it is save and also changed back to its original name.Message recovery pending now is appearing as shown below.Any chance that I could recover my database back?
How do i find who has changed the settings in the database.
basically when i looked at this morning i saw a database which is set in single user mode.when i tried to look at the errorlog i found nothing except the spid's of different people and as far as i know i think that spid's are assigned randomly depending on there availability.
Now this has happened twice recently and now i want to find out who the culprit is his username, machine name but not spid.
Can i do it if how can i.
how do i track each and every users info what he is doin and at what time.
do i need to set up or configure any options.
sometimes i also see that there is a dbcc command run by as it says winnt/system what does this mean how is this running.
I just upgraded to SQl Server 2000 from 7, and realized that all my reports created with existing scripts no longer work fine. The reports appear corrupt. Below is an example of a report script:
declare @vSubject varchar(30), @vMessage varchar(20) Begin
I had an idea to put all my web design settings, css text and web content in the database..This way it would be easy for others to edit remotely. Do you guys think this would have an impact on performance if I do this?
Hi,I would like to know how to get a list of configuration settings for adatabase.Is there a table that I can select this info from?Or a file (perhaps an ini file?) of some kind?Things like timeout settings, rollback space, table space, etc.Thanks
In SQL Visual Basic 2005 Express Edition, I was wondering if it is possible in the Add Connection dialog under Advanced settings to change the Data Source SQL server from the local .sqlexpress to a network SQL Express server. It seems as though the option is locked. I am in a doman, and using Windows Authentication. I also have TCP/IP enabled on the SQL server, and no firewall restrictions for the SQL service. Also, my account permissions should also allow me to do this.
I'm using Visual Studio 2005 (8.0.50727.42) and going into the menu option Website > ASP.Net Configuration, access the security tab and all I get is an error message stating that there is a problem with the selected data store "Unable to Connect to the SQL Server Database"
I have SQL Server 2005 (Express Edition). I have created a database "NetDev" with the right connection, etc.
I can use the SQL server fine for my Windows applications, but somehow this ASp.Net Configuration tool is not making any sense.
I also used the aspnet_regsql command from framework 2.0 to create a DataBase to no avail.
Does anyone out there knows if there is a bug with this tool???
I am trying to automate a basic task using SQL Server 2005 Express.
Currently I have a query script that I run and then save the results as a CSV file. I need to do this on a daily basis and so I am looking to find out how best to go about this. There are a multitude of third party tools that claim to be able to do this - can anyone recommend this or enlighten me of the best way to set up this automation.
Script to Reverse Engineer / Script out your EXISTING database mail settings?
I set up a profile to use gMail, and it seems logical for me to export out the settings to a script, then run the script on my laptop, other servers, etc.
There's no built in option, so I figured i'd ping the forum before i do it myself.
There are example scripts where you fill in the blanks, examples how to set up dbmail, but i did not find anything that scripts out existing settings.
database file is not full and not limited to growth. As a matter of fact batch transactions are done but our proble is very slow. 28 records has been successfully save after 45 mins. Before it's just 5 minutes. Then some other process are not working. Is there anything that I must do? We have 460 tables in our software using SQL server 2000 and our application is using VB 6.0
Hello,I use SQL Server 2005 Express and I would liketo save on db of mine...Have I only to save the .mdf and .ldf data fileor I need to stop some service or other programs?Can I use some utility to schedule this?ThanksM.
My install of SQL Server 2005 runs like a dog. The SQL Management Studio splash screen lasts for 10 minutes, then when the Studio window appears it takes another 5 minutes to initialize.
I have SQL server installed on a Germane Server running Windows Server 2K, SP4. It has quad Xeon 2.8 GHz processors with 2GB RAM. 4 300GB drives in a RAID 5 configuration.
I have created 2 databases which I would like to save, uninstall SQL, then reinstall it. (I didn't install it the first time.)
Hi. I am new to SQL Server management. I created a new database and also a table names customer. Saved my works. Want ot know where the SQL database file has been saved because i cant find in the the sql server management folder located in my documents. Also i tried to connect to that database from vb 2008 but in vain. i just cant see the database.
I understand that you must sp_detach_db and sp_attach_db to move databases to a new server. What if you want to reinstall SQL 7.0 to a different drive on the same server? My situation is this:
We have C:, D:, and E: drives. I accidentally installed SQL 7 on the C: drive instead of the D: drive. I need to reinstall on D: and I need the data. Any suggestions?
please ... really need some guidance... I have removed the old and reinstalled SQL server 2005 standard... Getting the following message: Your OS doesn't meet Service pack levels requirements for this SQL server releaseSo I installed Microsoft SQL Server 2005 Service Pack 1 (SP1) Getting the following message: This machine does not have a product that matches this installation package.
I have Windows XP Professional 2002 32-bit (Dell), Windows XP Service Pack 2, IIS, NET Framework 2.0., 13GB , processor intel 1,5 GHz, 256MB RAM
4 app servers with regional date and time settings of locale A.
1 database server with locale settings B.
What is happening is that timestamps are being generated on the app servers, these are then in a sql command which fails on the database server since the timestamp format is invalid.
It was suggested that we change the regional locale settings of the database server, but will this not have serious implications , for example every current timestamp format in the datbase will become invalid?
In a nutshell is it safe to change a database servers regional date time locale settings ? Or are there serious implications?
I have 3 strings delimitted by a * character that I would like to save to a database. Each string will always have the same number of elements. strUserID = "1*2*3" strCompanyID="12931*12937*12945" strCompanyName="International Business Machines, Inc*Ford Motor Company*Delta Airlines" What I need to do is to save each record like this INSERT INTO tableA (UserID, CompanyID, CompanyName) VALUES (1, 12931, 'International Business Machines, Inc') INSERT INTO tableA (UserID, CompanyID, CompanyName) VALUES (2, 12937, 'Ford Motor Company') INSERT INTO tableA (UserID, CompanyID, CompanyName) VALUES (3, 12945, 'Delta Airlines') I've done something like this before with a single string, but don't know how to handle 3 of them. Dim strAlerts As String() = NothingstrAlerts = values.Split(",")Dim s As String For Each s In strAlerts SqlText = "INSERT INTO tableA (UserID, CompanyID, CompanyName) VALUES (" & lblUserID.Text & ", '" & lblCompanyID.Text & "','" & s & "')" cmd = New SqlCommand(SqlText, strSQLConn) cmd.ExecuteNonQuery() Next s Thanks for any help
has anyone got any opinions on the pros/cons of storing mp3 files in the database instead of the file system ? How could this be done ? Would it be a binary data type ?
Im using MS visual web developer. I have created a website and used the database they set up by using admin tools. One page requires the take the users comment and to save it into the database. I've tried a formview and connected it to the database which worked. the problem is i cannot save whatever the user types into the textbox. {insert query didnt work with this set up }INSERT INTO aspnet_Membership(Comment) VALUES ('CommentTextBox.Text') Error: cannot set userId or to null. and if i make it allow nulls its going to move on to the next column. I would appreciate some help please. Thank you in advance.
hi I have two questions: 1. I want a code to save data typed in a textbox during runtime using SQL server database. The database has a table with several colums where i have to reference the necessary column. 2. Can i use a Gridview to enter data during runtime and save the same data to the database? that is, INSERTING data to the database.