Wednesday, September 2, 2009

SQL SERVER – Restore Database Backup using SQL Script (T-SQL)SQL SERVER – Restore Database Backup using SQL Script (T-SQL)

Database YourDB has full backup YourBaackUpFile.bak. It can be restored using following two steps.
Database YourDB has full backup YourBaackUpFile.bak. It can be restored using following two steps.

Step 1: Retrive the Logical file name of the database from backup.RESTORE FILELISTONLYFROM DISK = 'D:BackUpYourBaackUpFile.bak'GOStep 2: Use the values in the LogicalName Column in following Step.----Make Database to single user ModeALTER DATABASE YourDBSET SINGLE_USER WITHROLLBACK IMMEDIATE
----Restore Database

RESTORE DATABASE YourDBFROM DISK = 'D:BackUpYourBaackUpFile.bak'WITH MOVE 'YourMDFLogicalName' TO 'D:DataYourMDFFile.mdf',MOVE 'YourLDFLogicalName' TO 'D:DataYourLDFFile.mdf'
/*If there is no error in statement before database will be in multiusermode.If error occurs please execute following command it will convertdatabase in multi user.*/

ALTER DATABASE YourDB SET MULTI_USERGO: Retrive the Logical file name of the database from backup.RESTORE FILELISTONLYFROM DISK = 'D:BackUpYourBaackUpFile.bak'GO


Step 2: Use the values in the LogicalName Column in following Step.----Make Database to single user ModeALTER DATABASE YourDBSET SINGLE_USER WITHROLLBACK IMMEDIATE
----Restore DatabaseRESTORE DATABASE YourDBFROM DISK = 'D:BackUpYourBaackUpFile.bak'WITH MOVE 'YourMDFLogicalName' TO 'D:DataYourMDFFile.mdf',MOVE 'YourLDFLogicalName' TO 'D:DataYourLDFFile.mdf'
/*If there is no error in statement before database will be in multiusermode.If error occurs please execute following command it will convertdatabase in multi user.*/ALTER DATABASE YourDB SET MULTI_USERGO

Thursday, May 14, 2009

Ea sports 09 screenshots

















EA Sports 2009 Screenshot1 EA Sports 2009 Screenshot2



Videos will be post soonly............................

Monday, April 27, 2009

To Disabling the close(x) form in VB6

Steps

1) select the windows form properties

2) In the properties select the controlbox=false and you can see the difference in the windows form

3) executing the windows form u cannot see the any controls this is splash screen

Monday, October 6, 2008

shutdown the system using c#

step 1: open the visual studio 2005
step 2 : select the c# and windows application
step3: after select add the buttons like shutdown,restart,hibernate,logoff,force logoff,lock the computer
step 4: inside the button for shutdown write the following and after clicking the button at the top of the page use the following class library using System.Runtime.InteropServices;
and then add the following code before

public partial class MainForm : Form
{

// Importing Windows API library
[DllImport("user32.dll")]
public static extern void LockWorkStation();
[DllImport("user32.dll")]
public static extern int ExitWindowsEx(int uFlags, int dwReason);




double click the shutdown code

private void btnShutdown_Click(object sender, EventArgs e)
{
if (DialogResult.Yes == MessageBox.Show("Do you really want to Shutdown?", "Shutdown", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
ExitWindowsEx(1, 0);
}

double click the restart button
private void btnReboot_Click(object sender, EventArgs e)
{
if (DialogResult.Yes == MessageBox.Show("Do you really want to Reboot?", "Reboot", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
ExitWindowsEx(2, 0);

}

for locking


private void btnLockComp_Click(object sender, EventArgs e)
{
LockWorkStation();

}

for force logoff


private void btnForceLogOff_Click(object sender, EventArgs e)
{
if (DialogResult.Yes == MessageBox.Show("Do you really want to force Log Off?", "Force LogOff", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
ExitWindowsEx(4, 0);
}