Latest developer linksBookmark and Share
 
HomeThis WeekTop MonthTop AlltimeSearchRegisterFAQ
  
 
Submit Your Link
Please login to submit your Link
 

need to automate the restoration process

Posted: Jan/22/2011   By: nikhil   Points:15   Category: .NET  - ASP.Net    Views:107   Vote Up (0)   Vote Down (0)    
Dear All, i have to restore 10 databases at daily basis for verified backup.i want to automated this process.i want full and diffrential backup automated restoration for this process. can anyone help me in this matter. thanks
Thanks

View Complete Post


Comments:
Be the first to comment this post.
 
Post Comment
Please login to post your comment
More Related Resources

VERY Strange Problem with Process.MainWindowHandle

  

I have an array of Process information:  prArray=Process.GetProcesses()

The above happens in Form1.Load which then populates a DataGridView with the result.  There are columns for MainWindowTitle and MainWindowHandle and a few of the other properties.

I'm not sure what the DataGridView should look like but it looks reasonable to me.  Most Titles are blank and most Handles are 0, but maybe 5 or 10 percent of the processes have a non-blank title and a non-zero handle.  And the non-blank titles are recognizable. 

The DataGridView has a CellClick handler which simply puts the Handle into a textbox: tbxSelectedWinHandle.Text = prArray(e.RowIndex).MainWindowHandle.ToString

If I select the first row of the DataGridView which contains a non-zero handle I see the handle in the textbox.  But if I select any other of the non-zero handles I get a zero in the textbox.  And if I set a break in the CellClick handles indeed the MainWindowHandle is zero.  So how is it that I see non-zero values in the DataGridView when the corresponding entries in prArray.MainWindowHandle are zero???  The DataGridView was generated from the prArray entries!!!

I've gone through quite a few Google search results but haven't found anything which sounds similar to what I am seeing.  

Thanks for any thoughts anyone might have on this,  Bob

Asking anyone to look through the code is asking too much.  So I'm not asking.  But if anyone WANTS to who am I to say no?

Option Explicit On
'Option Strict On
Option Infer Off

Imports System.Diagnostics
Imports System.Threading

Public Class Form1

  Public Declare Function apiFindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Int32, _
                                        ByVal hWnd2 As Int32, ByVal lpsz1 As String, _
                                        ByVal lpsz2 As String) As Int32

  Declare Auto Function SendMessage Lib "user32" (ByVal hWnd As IntPtr, ByVal wMsg As Integer, _
                          ByVal wParam As Integer, ByVal lParam As Integer) As Integer
  Declare Auto Function SendMessage Lib "user32" (ByVal hWnd As IntPtr, ByVal wMsg As Integer, _
                          ByVal wParam As Integer, ByVal lparam As System.Text.StringBuilder) As IntPtr

  Dim prArray() As Process

  Dim SelectedWindowHandle As Integer

  Const WM_GETTEXT As Integer = &HD
  Const WM_GETTEXTLENGTH As 
                          

Managed Add-In Framework : 64 bit host process cannot create a 32 bit add-in process, why?

  

With Microsoft Add-In Framework you cannot have a 64bit process create a 32bit addin process in .NET 3.5/CLR 2.0.  This is only available in .NET 4.

Does anyone know why this functionality is available only in .NET 4? technical reason? or timing reason?

Is there a technology constraint why it has not been implemented in .NET 3.5?

Or is it just a planning issue, i.e. this functionality has been postponed into .NET 4 because not ready for the .NET 3.5?

Thanks for your help


Gwen

Determine the ShellExecute/Process verbs associated with a filetype

  

For a file called MyFile.SomeExtension, how do I determine which verbs are associated with 'SomeExtension'? I am particularly interested in finding if 'edit' is associated with the filetype. Determining the program would be a nice-to-have.

By 'verb' I mean the value you would use in:

System.Diagnostics.Process.StartInfo.Verb


Paul Cotter

VS 2010 vshost.exe hangs, unable to end process in task manager

  

Hi,

I am having a problem in Visual Studio 2010 (windows 7) when I try to run my winform application.

It appears to run just fine, no errors of anykind and when I end the application, it exits with 0 code,
and seems good.  But then when I try to ReBuild I get an error that it cant overwrite a .dll because it is in use
by another application.

Sure enough I opened Task Manager and I can see the debug application vshost.exe is actually still running?
and it does not work to End the Process, when I try its like just nothing happens.  The screen flashes for a second
the confirmation prompt disappears and I see the vshost.exe is still there in the processes list.

The only way I have been able to kill the process is by closing VS 2010, sometimes when that doesnt work only
rebooting will kill it.

Note that I have tried setting VS 2010 to break on all exceptions, which made no difference.


How can I get which process invoke a printer job

  

Hi All,
I can intercept the printer job by using "winspool.drv", however when the event coming, how to get the process information that it from which process? suce as Nodepad or Word?
Thanks!


ManagementClass, ManagementOperationObserver - Process is not firing Completed Event.

  
I need to execute a command on Remote box and the task is to wait till the execution finishes and then need to do some other steps. i have written following code using ManagementClass and ManagementOperationObserver  (for Asynchrous execution), it is working fine with win 2003 boxes but when i execute it on 64-bit it is hanging. ALthough my command got executed it is not able to fire the event Completed(observer Delegate). Appreciate any quick help. here goes my code


Class someClass{

private

 

bool _wait = false;

void somefunction()
{

ManagementScope

 

sc = null;

 

ConnectionOptions co = new ConnectionOptions();

 

// the observer will get a callback when the object we are executing is ready

 

ManagementOperationObserver observer = new ManagementOperationObserver();

observer.ObjectReady +=

new ObjectReadyEventHandler(observer_ObjectReady);

observer.Completed +=

new CompletedEventHandler(observer_Completed);

co.Authentication =

AuthenticationLevel.Call;

co.Impersonation =

ImpersonationLevel.Impersonate;

co.EnablePrivileges =

true;

 

// create scope to the remote machine

sc =

new

Why is the "System" Process opening and keeping the port open for my .NET remoting framework application?

  

I'm using Remoting in a .NET 3.5 framework application of mine (running on windows 2008 r2). I'm opening port 8086 with the following code

BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider();
      serverProv.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;

      BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider();
      IDictionary props = new Hashtable();

      try
      {
        props["port"] = 8086
        TcpChannel channel = new TcpChannel(props, clientProv, serverProv);
        ChannelServices.RegisterChannel(channel, false);
        RemotingConfiguration.RegisterWellKnownServiceType(
          typeof(Remote), "Remote", WellKnownObjectMode.Singleton);
      }
      catch (Exception ex)
      {
        logger.Error("Failed to intialize service remoting: ", ex);
        throw;
      }

For some reason, when i restart my windows service that has the above code running, it throws an exception saying that "Only one usage of each socket address (protocol/network address/port) is normally permitted". Digging into this a little deaper it turns out that "System" process is holding on to my port and it won't let it go. Even if i kill my process, the "System" process still owns the port.

Now if I change the port number and restart my windows service, everything works and the port is properly owned by my service. If i then stop my service, the "System" process takes over my newly assigned port. When i start the service again, i get the aforementioned exception.

Unfortunately this doesn't reproduce everytime. Sometimes the "System" process does not take ownership of my port.

Any ideas on why the "System" process is getting involved? Anyways to prevent this from happening?


Automate cube build

  

I have previously automated a cube build using the relevant SSIS task. To schedule it I had to do something that published an SSIS package. I gave it a name of, say, CubeBuild and it stored it as /CubeBuild.

When I wanted to schedule the cube build it was available for me to select in the MSDB section of SSIS packages.

We had to rebuild our server and I have to recreate the package. For the life of me I can't remember how I created the package that acquired the '/' at the front. I have created the cube process task in SSIS but I can't see it when I look at the SSIS packages available. Does it matter where I save the project file? Do I have to do something else? (I think I do, from memory).

Can anyone think of how I may have done that?

Just to put this in context. We have an ETL tool that creates the data extraction SSIS packages automatically. In the data warehouse we create various models, then the ETL tool can create an ETL job that groups and sequences all the extraction and transformation tasks in the correct sequence. What we want to do is create a package that we can add manually as an additioanl step at the end of that ETL job so that the cube will automatically process when the ETL finishes. Perhaps there is a better way of doing it?

Thanks in advance.


Debugging SQLCLR in VS 2010 using attach to process

  

After reading numerous posts / threads, I still can't get an answer. We have assemblies built in Visual Studio 2008 (.NET 2.0) and could debug them without any issues (on the same server). Since we upgraded to Visual Studio 2010, the "attach to process" does not work and the breakpoints don't get hit.

I've followed numerous workarounds, such as making sure the correct debugger is used by adding a config file to sqlservr.exe, but this did not make a difference.. Articles can be found here: http://webstats.interknack.com/BLOGS/BOBB/post/SQLCLR-debugging-and-VS-2010-revisited.aspx and http://blogs.msdn.com/b/robertbruckner/archive/2010/06/20/debugging-custom-extensions-with-visual-studio-2010.aspx.

Here an example of my sqlservr.exe.config file:

<?xml version="1.0"?>
<configuration> 
   <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v2.0.50727" />
   </startup>
</configuration>

Our assemblies are targeting .NET 3.5 and deployed on SQL Server  2008 R2. Unfortunately I have to use "attach to process", and not the simple debug using tests scripts inside VS 2010 due to the complexity of our assemblies (such as nullable types, etc).

When I'm using the attach to process technique, SQL Server just runs / executes without returing any results, until I detach from VS 2010. I'm not getting any errors, but my breakpoints are just not being hit..

I find this very frustrating and a waste of time, since these basics shoud've been tested (even using the correct debugger depending on .NET 2 / 4).

Please don't refer me to simple msdn articles online such as debugging stored procedures.. I need a solution for directly attaching to sqlservr.exe.

Any other workarounds would greatly be appreciated?


Any idea why xp_cmdshell would be faster than Process.Start?

  

Inside one of my CLR stored procedures I need to call a console application and wait for the program to finish running. I was surprised to learn that if I run the program with xp_cmdshell it seems to complete in 20 seconds. If I call the same program with the same arguments using System.Diagnostics.Process.Start followed by WaitForExit it takes 80 (!) seconds to complete. It doesn't seem to matter if Process.StartInfo.UseShellExecute is true or false.

This particular server is still running SQL Server 2005 Standard. The console app that I am calling runs under the .Net framework 3.5 (I think) and does a little bit of file I/O and a lot of LINQ to SQL work. Yes the LINQ to SQL does access the same database, no I'm not likely to get that piece of design ugliness changed in the next couple of days.

No reason I can't just keep using xp_cmdshell, but anyone have any ideas why it would be so much faster?


 
Categories:
.NET
Java
PHP
C/C++/VC++
HTML/XML
SAP
MainFrames
Data Warehousing
Testing
MySQL
SQL Server
Oracle
Javascript/VB Script
Others
Login
 
 
 
 
 Forgot password
 Contact Us   Terms Of use   Share your knowledge