I need some advice about the best way to setup log shipping in conjunction with full backups and other system maint. such as DBCC's. I'd like to know what others are doing.
What is your schedule, 24/7, other?
When do you take full backups of the databases? Do you restore these backups to the destination server then startup log shipping again?
I considered doing log ship from 7:00 - 19:00. Then do a full backup at 19:30 that is restored to the destination server. I understand that your schedule may vary due to app. requirements.
I found plenty of info. about the mechanics of setting up log ship but nothing from a broader perspective. If you know of an article that I can reference please pass that on as well.
I could not able to find Forums in regards to 'Log Shipping' thats why posting this question in here. Appriciate if someone can provide me answers depends on their experience.
Can we switch database recovery model when log shipping is turned on ?
We want to switch from Full Recovery to Bulk Logged Recovery to make sure Bulk Insert operations during the after hours load process will have some performance gain.
I am using the article, " Storing Binary Files Directly in the Database Using ASP.NET 2.0 By Scott Mitchell "
http://aspnet.4guysfromrolla.com/articles/120606-1.aspx I have tried to modify the code and my datatable to replicate the function, but I am getting an error, "MIMEType" is not a SQL Parameter
An SqlParameter with ParameterName 'Type' is not contained by this SqlParameterCollection. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IndexOutOfRangeException: An SqlParameter with ParameterName 'Type' is not contained by this SqlParameterCollection.Source Error:
Line 53: Line 54: 'Specify the values for the MIMEType and ImageData parameters Line 55: e.Command.Parameters("Type").Value = MIMEType Line 56: Line 57: 'Load FileUpload's InputStream into Byte arraySource File: E:homeDefaultetances.ushtdocshomeadminaddNews.aspx Line: 55 Code: Protected Sub AddNewsBut_Click(ByVal sender As Object, ByVal e As System.EventArgs) If Page.IsValid Then InsertDs.Insert() Response.Redirect("~/news/default.aspx") End If
End Sub
Protected Sub InsertDs_Inserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs) 'Reference the FileUpload control
'Make sure a file has been successfully uploaded If UploadedFile.PostedFile Is Nothing OrElse String.IsNullOrEmpty(UploadedFile.PostedFile.FileName) OrElse UploadedFile.PostedFile.InputStream Is Nothing Then Label1.Text = "If there is no photo of this event, please use a stock photo if you have none available. Else, please upload a photo of the event." e.Cancel = True Exit Sub End If
'Make sure we are dealing with a JPG or GIF file Dim extension As String = Path.GetExtension(UploadedFile.PostedFile.FileName).ToLower() Dim MIMEType As String = Nothing
Select Case extension Case ".gif" MIMEType = "image/gif" Case ".jpg", ".jpeg", ".jpe" MIMEType = "image/jpeg" Case ".png" MIMEType = "image/png"
Case Else 'Invalid file type uploaded Label1.Text = "Please use the correct file type: .jpg, .jpe, .gif, or .png." e.Cancel = True Exit Sub End Select
'Specify the values for the MIMEType and ImageData parameters e.Command.Parameters("Type").Value = MIMEType
'Load FileUpload's InputStream into Byte array Dim imageBytes(UploadedFile.PostedFile.InputStream.Length) As Byte UploadedFile.PostedFile.InputStream.Read(imageBytes, 0, imageBytes.Length) e.Command.Parameters("Photo").Value = imageBytes
Dear readers, On my page people can opload foto's with a <asp:FileUpload ID="myfile" runat="server" BorderWidth="3px" BorderColor="Silver" BorderStyle="Inset" /> and stored the filePath in the database Now i want, that when there is no picture selected, the path to Noimage.jpg picture who is in my image map will stored on my datadbase. my script start like this If Not (myfile.HasFile) Then
////how can i select a standard image from my imageMap and store path to database /////
Dim cnn As Data.SqlClient.SqlConnection
Dim cmd As Data.SqlClient.SqlCommand
Dim strSQL As String
Dim connString As String = (ConfigurationManager.ConnectionStrings("Personal").ConnectionString) strSQL = "Insert Into tblMateriaal(ArtikelGroep,Artikelnaam,ArtikelType,ArtikelMaat,Aantal,Prijs,ContactPersoon,EmailAdress,Aanvul) Values(@ArtikelGroep,@ArtikelNaam,@ArtikelType,@ArtikelMaat,@Aantal,@Prijs,@ContactPersoon,@EmailAdress,@Aanvul)" cnn = New Data.SqlClient.SqlConnection(connString)
cmd = New Data.SqlClient.SqlCommand(strSQL, cnn)
Dim plaatje As New Data.SqlClient.SqlParameter("@plaatje", System.Data.SqlDbType.NVarChar) plaatje.Value = " " cmd.Parameters.Add(plaatje)
Dim ArtikelGroep As New Data.SqlClient.SqlParameter("@ArtikelGroep", System.Data.SqlDbType.NVarChar) ArtikelGroep.Value = ddl1.SelectedValue cmd.Parameters.Add(ArtikelGroep)
Dim ArtikelNaam As New Data.SqlClient.SqlParameter("@ArtikelNaam", System.Data.SqlDbType.NVarChar) ArtikelNaam.Value = tb1.Text cmd.Parameters.Add(ArtikelNaam)
Hi, My question is how can i get a page show all of my pictures i got in folder c:..Images? by using Database. Becouse I want some of the pictures to be shown in one page for theirselves. Database looks like: ID | Pname | Pact | 1 | picture1 | Yes | 2 | picture2 | No | etc. Now i want picture 1 and 2 to be shown in my Allpictures.aspx I tried by using <asp:repeater...>... But i got a problem when i wanted the <img src=<%#EVAL(Pname)/>... becouse i cant do it that way... Thanks, Even Knutli
Can any say Is it possible to store a picture in sqlserver?? If it possible then Send me some code in C# to store picture file by browseing from my PC.Also which type of field i have to create to store Picture. plz help me,..
I'm looking for information that could tell me how to saving picture in a SQL database. The site is build on asp.net 2.0 and c#, and I'm using Visual Web Developer 2005 Express Edition. I would be thankful for some help.
I'v been looking for a sample that illustrate how to send an Image(jpeg/gif/bmp) using SSB. The initiating client should pick an image stored locally on a folder in that machine and send it over to the target broker instance using TCP. The target should verify the contents of the message and then insert the image in a table, which i assume should have a column of type varbinary(max).
I 'm sure I am missing something obvious, hopefully someone could point it out. After a failover log shipping, I want to fail back to my inital Primary server database; however, my database is marked as loading. How can I mark it as normal?
I did the failover as follow:
I did a failover log shipping from the 2 server Sv1 (Primary) and Sv2 (Secondary) by doing the following
1) Stop the primary database by using sp_change_primary_role (Sv1)
2) Change the 2nd server to primary server by running sp_change_secondary_role (Sv2)
3) Change the monitor role by running sp-change_monitor_role (Sv2)
4) Resolve the log ins - (Sv2)
5) Now I want to fail back - I copy the TRN files to Sv1 - use SQL Ent to restore the database at point in time. The task is done; however, the database is still mark as loading. I could not use sp_dboption.
Hello, I'd like to use a background picture in my report and I have some problems with its resolution. When it is 72 dpi the quality of printed background picture is very bad and when the resolution is 300 dpi a picture does not hold in one sheet of report. Help me please.
I am trying to save an uploaded picture filepath to a sql database record. The record that the filepath will be saved to will be the record determined by the logged in userid. I get an error stating Object not set to an instance of an object. This is my code for when the upload button is hitProtected Sub uploadbutton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles uploadbutton.Click If UploadTest.HasFile = False Then ' No file uploaded! UploadDetails.Text = "Please first select a file to upload..." Else ' Display the uploaded file's detailsUploadDetails.Text = String.Format( _ "Uploaded file: {0}<br />" & _"File size (in bytes): {1:N0}<br />" & _"Content-type: {2}", _ UploadTest.FileName, _ UploadTest.FileBytes.Length, _ UploadTest.PostedFile.ContentType) ' Save the fileDim filePath As String = Server.MapPath("~/ProfilePictures/" & UploadTest.FileName) UploadTest.SaveAs(filePath)Dim datasources1 As New SqlDataSourcedatasources1.ConnectionString = ConfigurationManager.ConnectionStrings("aspnetdb_connection").ToString() datasources1.UpdateCommandType = SqlDataSourceCommandType.Text Dim myUserID As String = Membership.GetUser().ProviderUserKey.ToStringdatasources1.UpdateParameters("userid").DefaultValue = myUserID datasources1.UpdateCommand = "UPDATE into profile_details (pic) VALUES (@filepath) WHERE ([UserId] = @UserId)" End If End Sub
How do I store an image/photo/picture in a database?
I have a database called database1 with a table called table1 like:
Table1: Personid Name1 Name2 Address
and I want to stora a picture of the person in the database (SQL Sever 7) c:picture.jpg. How could I do that? I would like to use a stored procedure to do it. Something with BLOB?bulk insert? how does it work?
17:04:32 Process Exit Code: (-1) 17:04:40 Setup failed to configure the server. Refer to the server error logs and C:WINDOWSsqlstp.log for more information. 17:04:40 Action CleanUpInstall: 17:04:40 C:WINDOWSTEMPSqlSetupBinscm.exe -Silent 1 -Action 4 -Service SQLSERVERAGENT 17:04:40 Process Exit Code: (1060) the currect service are not found as installed service.
I am new to SQL Server and I have got this problem and I am wondering if anyone could provide me with a solution, please.
I created a Product database table using Visual Basic 2005 Express and SQL Server 2005 Express. I have just added a new column [Picture] with IMAGE datatype to the database table, which of course, should store an image or picture of a product. I am writing to kindly ask you guys for help.
i) How do I store a picture or image for each record of this column [Picture] of database table? I have tried and all that I can see is < binary data > in the picture column, and when I start the VB 2005 Express form is a blank picture box!
ii) How do I get this image to display on Visual Basic 2005 Express form, so that when a product is selected the product image is displayed too? All text data appears but not the picture!
Okay. Simple request. I have a local report in my VS2005 project. I want to embed my company logo in the header. How do I do this?? When I put an image item on the page it wants me to put something in the value for this? I've tried sending through a dataset but SSRS can't load data set information into the header! Why is this so complicated? I don't want to embed a dynamic database image, just a static image that will be embedded in my program. Any help on this would be appreciated.
Sir, Is there any way to insert picture to image datatype in sql server 2000 without using front end. If so please let me know. Thanks in Advance,Arun.
I would like to create a table which can store a VLOB or BLOB.. which are pictures and images.. How do I insert them into the database and how do I select them into the data base for playing in a media player
I really do not have a background on this.. much.. I just know how to connect to a database and insert texts.. and updating and stuffs...
I want my users to be able to insert the logo when they create reports using report builder. Documentation tells that under Insert tab you can click on "Picture" and then browse to the location of the file and insert a picture. But I dont see "Picture" option under Insert menu. I only see 3 options "text box","Filter Description" and "Total Row Count".
I need to create a RO copy of a production DB owned by an outside company. We are connectd via a WAN link, but cannot use replication. They are proposing using an initial load via tape, and sending us a text file nightly with the days changes to the DB. We will then need to load that data using BCP, DTS or some other method. Does any one have any ideas on using log shipping instead of the text file. It would only be practical to get a fresh load of the entire DB once a quarter or once a month at most. It is a 40+ GB database and we are expecting 100 to 200 MB of logs per night. For business reasons, we are limited to some type of file transfer mechanism for the data transfer, and cannot really change their backup schedule which is nightly fullbackups and tlogs every 30 minutes.
I am using SQL 2k EP Editions with SP2 on Win 2k Advance servers. Since more than week or so I am trying to establish log shipping between two servers. But its not working.
I am using database maintainence plan wizard to set up log shipping. Every thing works fine as far as wizard is concern, it creats plan for log shipping. But my log shipping is not working. The plan to back up log on source database is working fine. I can see the job history and the log files in the backup folder. But I have found that the job on the standby server to copy log file on network folder is failing and so the job to restore log on stand by server. I get the following message
"sqlmaint.exe failed with error state....."
Little reaserch on the standby server found that sql server is using maintainence plan to copy and restore log files, but i do not see any database maintainence plans on standby server as well as I have checked that there is no plan id in sysjobs table on either server.
I have sa rights. The account used by sql service and sql agent have admin rights and they do have rights to access the network folder for both the servers. So there is no rights problem.
I have followed all steps published in white paper for setting up log shipping on microsoft web site.
I have searched microsoft KB but it is of no use for sqlmaint.exe.
This might end up being fairly lengthy...I'm in the midst of implementing log shipping as a "warm stand-by" solution at my company. All the components appear to be in place: I'm using cmd shell to copy the backup device file to a remote server and then execute a RESTORE stored procedure on the remote server. The copy and restore work just fine. The problem I'm having is with the transaction log dumps and restores. We normally dump transaction logs (and then truncate) every hour. With the log shipping being implemented, we're going to want to do separate log dumps every ten or fifteen minutes, copy that dump over to the remote server, and then apply that log to the database. Here's the question: for the log ship portion, I don't truncate the log. But after the "normal" log dump occurs, things get tossed out of whack. When you try to apply a log, I get the message "database has not been rolled forward enough....". Has anyone encountered this type of issue and if so, how did you work around it? I'm assuming it's a simple of issue of certain options you set on your dumps and scheduling.... I'd appreciate any help.... Thanks!!!