Posts

Showing posts with the label Sql

Msdb Corrupted/Suspected Solution SQL2000/2005

Image
Msdb Corrupted/Suspected Solution SQL2000/2005 Msdb Database Suspected/Corrupted-Solution (SQL 2000&2005) In Sql server 2000 ,  you start the server with trace flag 3608. In SQL Server  Enterprise Manager, right-click the server name, and then click Properties. On the General tab, click Startup Parameters. Add the following new parameter: -c -m -T3608 After this restart the sql server and detatch the msdb database and move the mdf and ldf files from the default folder  C:\Program Files\Microsoft SQL Server\MSSQL\DAta Then recreate msdb file by executing in new query window instmsdb.sql  (C:\Program Files\Microsoft SQL erver\MSSQL\Install) Then remove-c -m -T3608 from the startup parameters in SQL Server Enterprise Manager Then stop and restart the sql server 2000   and then recreate the maintenance plans In SQL Server 2005 Detach the msdb database and install/create new msdb database. This will solve the problem. ...

Are You Embarrassed By Your How To Recover Suspected Database Sql 2000/2005/2008 Skills? Here's What To Do

Image
How to Recover Suspected Database SQL 2000/2005/2008          “Database suspected” a very annoying issue in the field of Data management. Some time due to sudden power failure or some other reasons our database gets suspected and we can not use it anymore.       To over come this issue, there are some tricks that may be helpful to recover your suspected database 1.          Restore latest backup                   The easiest way to make suspected database is to restore it with latest available healthy backup. It’s always very easy and secure method.. but what if you don’t have backup ?           Then you need to try out second option 2.          Using SQL Query        ...

Recover/Repair a suspected database in SQL Server 2000 using Query

Image
Some of we are using SQL server 2000 in our offices for database creation. In SQL server 2005 when a database is suspected we can easily recover or restore it with a query  " EXEC sp_resetstatus ‘yourDBname’; ALTER DATABASE yourDBname SET EMERGENCY DBCC checkdb(‘yourDBname’) ALTER DATABASE yourDBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE DBCC CheckDB (‘yourDBname’, REPAIR_ALLOW_DATA_LOSS) ALTER DATABASE yourDBname SET MULTI_USER " But while using SQL server 2000 this query was not properly working. Most of the database in SQL server 2000 is due to the corruption of log file. The following is an easy way for recovering/repairing  a sql server  2000 suspected database.This is 5 Step process Step 1 : This is for replacing dbname/ldf path name Run the Query using Query Analyser ( QA ) Use master Go sp_configure 'allow updates', 1 Reconfigure with override Go Step 2: execute the following script Update sysdatabases set status= 32768 where name = 'your db name'...

Restore a SQL Server 2008 Database into SQL Server 2005

Image
If you've tried to back up a database in SQL Server 2008 and then restore it into SQL Server 2005, you know that the database backups are not backward compatible. However, with SQL Server 2008 Management Studio, you can script data and schemas in SQL Server 2005 mode. This 10-Minute Solution takes you through the steps to back up the Northwind database on SQL Server 2008 and restore it to SQL Server 2005.    Transferring databases from SQL Server 2008 to SQL Server 2005 is not possible with standard backup and restore facilities. Leverage the scripting wizard in SQL Server 2008 to script data as well as schemas in SQL Server 2005 compatibility mode. Using the "Generate SQL Server Scripts" Wizard The Northwind database is no longer shipped as part of the SQL Server installation, but you can download it from  go.microsoft.com . The data is scripted as INSERT statements. To create the scripts, you have to run the "Generate SQL Server Scripts" wizard, which y...

SQL client installation 2000&2005

 SQL client installation 2000&2005 Step by step guide to installation SQL Client 2000&2005  POWER POINT format. click download  SQL client installation

Recover MSDB in SQL 2005

Image
1.           Put   MSSQL   into single user mode 1.           Click -> START -> Microsoft   SQL Server   2005 -> Configuration Tools – > SQL Server Configuration Manager 2.          Right click on SQL Server and choose Properties 3.          Click on the  Advanced  tab. Under  Startup Parameters  you will be adding the following parameters to the beginning of the string:  -m;-c;-T3608 2.          Restart SQL Server 3.          Connect to SQL   server through the Management Console. From this point on we will be using TSQL to issue the commands so click the  New Query  button on the top left. At this point you should be in the master database inside the query window. 4.      ...

SQL Server Database Marked Suspect Recovery - SQL

SQL Server database can become marked suspect for several reasons, therefore regular database backup is mandatory. Possible causes include: 1. Denial of access to a database resource by the operating system 2. Anti-virus/3rd party software blocking access 3. The hardware/network issue or corruption of database file(s ) Prior to resetting the status, the database file issue should be resolved. First check error logs and Event Viewer for related messages. If logs offer no help, then one way of resolution: create an empty database, copy over the damaged database files and restart the server. The (copied over) database may come up in the suspect mode. The recovery methods below are last resort only. At minimum the server should be rebooted (Windows restart - hardboot), if possible at all, a database copy should be created. If backup files exist, point-in-time recovery is preferred to emergency repair. The following script resets the...

Change Password of SA Login Using Management Studio

Image
Login into SQL Server using Windows Authentication. In Object Explorer, open Security folder, open Logins folder. Right Click on SA account and go to Properties. Change SA password, and confirm it. Click OK. Make sure to restart the SQL Server and all its services and test new password by log into system using SA login and new password. Reference :  DHARMENDRA KUMAR UPDATE : There has been discussion about restarting the SQL Server and all its services. Please read all of them before making final decision for your scenario.

Creating Maintenance Plans in SQL Server 2008 R2

Image
One of the repetitive task that DBA need to perform is create maintenance plan for database. Maintenance plans enables you to automate maintenance activities for a database, backups, db integrity checks and index maintenance tasks. We can easily create a maintenance plan using a wizard in sql server 2008 R2. You can use the following steps to create a maintenance plan 1. Select the Maintenance Plan Wizard from the context menu  as shown below 2. You can specify a name and description for the plan and select the desired scheduling options 3. Select next to see the maintenance tasks that you want to perform 4. Select the Maintenance tasks order 5. Select the database for the backup task. 5. Select the reporting option for the plan like write log to a specific location or send an email or both. 7. You can see the created maintenance plan in object explorer when you double click the Backup Plan from above window, you can get the designer