Ads

22 February 2012

2012 - Licesensing

DB RECOVERY - PAGE LEVEL




STEP 1 - Check Database For corruption




We can check database integrity by using DBCC CHECKDB command, to see weather there is corruption in database of not.







Looking at error message, we can clearly identify that there is corruption on page 223 as we can see this message. Object ID 2105058535, index ID 2, partition ID 72057594038910976, alloc unit ID 72057594039828480 (type In-row data): Page (1:223) could not be processed.



STEP 2 – Restore faulty page from a GOOD Backup – PAGE Level Database Restore



Now we need to restore faulty pages from a SQL Server backup, that means restore only faulty pages. This is a new feature in SQL Server 2008, where we can restore only some corrupted pages from a good database backup.



For example you have a 100 Gb database and only 1 page is corrupted than we can save recovery time by restoring a single page instead of a 100 GB database.



SQL Command to perform a page level restore



use master

go

RESTORE DATABASE DBA PAGE = '1:223' FROM DISK = 'C:\temp\DBA_before_curruption.bak';

goSTEP 3 – Backup and Restore Current TRANSACTION LOG Backup



If you read the restore informational messages, which we received in last step states that there is difference between the LSN number.



Processed 1 pages for database ‘DBA’, file ‘DBA’ on file 1.



The roll forward start point is now at log sequence number (LSN) 43000000055600001. Additional roll forward past LSN 43000000058400001 is required to complete the restore sequence.



RESTORE DATABASE … FILE= successfully processed 1 pages in 0.098 seconds (0.079 MB/sec).



To correct this LSN number, we need to backup the current log and restore in a current database, using the following syntax.



use DBA

BACKUP LOG DBA TO DISK = 'C:\DBA_log.bak' WITH INIT;

GO



use master

GO

RESTORE LOG DBA FROM DISK = 'C:\DBA_log.bak';This is going to be pretty quick as only page level transactions will be rolled back or rolled forward, you can see that in message where backup log size was in MB’s but restore was kind of ZERO only.



Processed 5 pages for database ‘DBA’, file ‘DBA_log’ on file 1.



BACKUP LOG successfully processed 5 pages in 0.020 seconds (1.684 MB/sec).



Processed 0 pages for database ‘DBA’, file ‘DBA’ on file 1.



RESTORE LOG successfully processed 0 pages in 0.006 seconds (0.000 MB/sec).











STEP 4 – Verify corruption has been resolved and data is consistent



Re-execute DBCC CHECKDB to ensure and verify that corruption has been removed and database is health now.



OPTION 2 – The corruption example, which I took was of Index and I want to make you understand how page level restore works, if you are looking for a solution to a exact problem, which I demonstrated, can be resolved by rebuilding a non clustered index, as can afford to rebuild index which doesn’t;t result any data loss.

 


DB RECOVERY - PAGE LEVEL

21 February 2012

Unable to refresh data for a data connection in the workbook. Try again or contact your system administrator. The following connections failed to refresh: PowerPivot Data

http://msdn.microsoft.com/en-us/library/ff487856.aspx

http://www.cjvandyk.com/blog/Articles/How%20do%20I%20-%20Install%20PowerPivot%20into%20an%20EXISTING%20SharePoint%202010%20farm.aspx


NOTE :- This feature is not available on SQL Server Standard Edition.

http://www.microsoft.com/sqlserver/en/us/product-info/compare.aspx

Microsoft SQL Server 2008 R2 - PowerPivot for Microsoft Excel 2010

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=7609


How to install and configure please refer,

http://powerpivot-info.com/post/66-step-by-step-guide-on-installing-powerpivot-for-sharepoint

Usefull Queiries

 Following quick script demonstrates last ran queries along with the time it was executed.




SELECT deqs.last_execution_time AS [Time], dest.TEXT AS [Query]

FROM sys.dm_exec_query_stats AS deqs

CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest

ORDER BY deqs.last_execution_time DESC



-------------------------------------------------------------------------------------------------------------
 Gives the total number of tables available for a given schema.



SELECT count(*) TABLES, table_schema

FROM information_schema.TABLES

WHERE table_schema= 'dbo' and TABLE_TYPE ='BASE TABLE'

GROUP BY table_schema





Information_schema can used for getting many other information like column details, domain, privileges and many more



 Want to find a function or procedure you can use this query



SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE = 'FUNCTION'






 Tables that do not have clustured indexes

SELECT SCHEMA_NAME(t.schema_id) AS schema_name, t.name AS table_name

FROM sys.tables AS t

WHERE NOT EXISTS

(

SELECT * FROM sys.indexes AS i

WHERE i.object_id = t.object_id

AND type_desc = 'CLUSTERED'

)

ORDER BY schema_name, table_name;



 Find dependies of specified function



SELECT OBJECT_NAME(object_id) AS referencing_object_name

,COALESCE(COL_NAME(object_id, column_id), '(n/a)') AS referencing_column_name,*

FROM sys.sql_dependencies

WHERE referenced_major_id = OBJECT_ID('o2_AccountUsers')

ORDER BY OBJECT_NAME(object_id), COL_NAME(object_id, column_id);

17 February 2012

SSRS Maximum request length exceeded

Error : Maximum request length exceeded.

Change the values as mentioned below,

1. C:\Program Files\Microsoft SQL Server\MSRS__.SQL_\Reporting Services\ReportServer
2. Open web.config file 
3. Search
4. Change

Note :- This is max limit.


5. iisreset

16 February 2012

The Windows Server 2008 failover cluster cannot start because of a deadlock condition in the Cluster service

RESOLUTION


Service pack information

To resolve this problem, obtain the latest service pack for Windows Server 2008 Service Pack 2. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

968849 How to obtain the latest service pack for Windows Server 2008

Back to the top

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.



If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.



Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.



Important Windows Vista and Windows Server 2008 hotfixes are included in the same packages. However, only one of these products may be listed on the “Hotfix Request” page. To request the hotfix package that applies to both Windows Vista and Windows Server 2008, just select the product that is listed on the page.

Prerequisites

To apply this hotfix, you must have Windows Server 2008 installed.

Restart requirement

You must restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Windows Vista and Windows Server 2008 file information notes

The .manifest files and the .mum files that are installed in each environment are listed separately in the "Additional file information for Windows Server 2008" section. These files and their associated .cat (security catalog) files are critical to maintaining the state of the updated component. The .cat files are signed with a Microsoft digital signature. The attributes of these security files are not listed.

For all supported 32-bit versions of Windows Server 2008

File name File version File size Date Time Platform

Srvnet.sys 6.0.6001.22178 98,816 14-May-2008 02:47 x86

For all supported 64-bit versions of Windows Server 2008

File name File version File size Date Time Platform

Srvnet.sys 6.0.6001.22178 141,312 14-May-2008 03:15 x64

For all supported Itanium-based versions of Windows Server 2008

File name File version File size Date Time Platform

Srvnet.sys 6.0.6001.22178 286,208 14-May-2008 02:57 IA-64

Quorum Resource Problems

Distinguishing Quorum Problems from Other Problems




It can be challenging to analyze a problem with starting the Cluster service and determine whether it is related in some way to the quorum resource. To try to distinguish different types of problems, review the following table:



Area Explanation



Cluster service account: On the nodes on which you are trying to start the Cluster service, are there problems with the Cluster service account?



Also, if you have Windows Server 2003 with the latest service pack, does Event ID 7041 appear in the system event log? This event was added in Windows Server 2003 Service Pack 1 and indicates that the Cluster service account does not have all the necessary user rights, such as the Log on as a service user right.





If no domain controller is available to authenticate the Cluster service account, the Cluster service cannot start. Other problems with the account can also prevent the Cluster service from starting, for example, if the password was allowed to expire or the account does not have the necessary rights, possibly as a result of a Group Policy setting.



To check for this type of problem, try to log on to the computer with the Cluster service account, or check the system event log for messages that indicate that the Cluster service account cannot log on. Also, review the Cluster service account to make sure that it has the permissions and rights described in Change the Account Under Which the Cluster Service Runs at the Microsoft Web site.



Cluster log: Is the cluster log read-only? Alternatively, is a policy preventing the cluster log from being modified?





If the cluster log cannot be modified, the Cluster service cannot start.



By default, the cluster log is called Cluster.log and is located in systemroot\Cluster. The default name of this log can be changed by changing the system environment variable called ClusterLog.



Events in event log: Do event log messages appear to be consistent with a quorum resource problem?





Specific events can indicate that a problem with the quorum is preventing cluster startup. However, an event can indicate a symptom rather than a root cause, so all events should be interpreted in context.



See the next section for information about some events that can indicate problems with the quorum resource.



For more information about troubleshooting problems with starting the Cluster service, see article 266274, "How to Troubleshoot Cluster Service Startup Issues" in the Microsoft Knowledge Base.



If your startup issue appears to be related in some way to the quorum resource, see Flowchart for Troubleshooting the Quorum Resource.

Event Messages That are Consistent with Quorum Resource Problems



The following list describes some common event log messages that are consistent with quorum resource problems.

ImportantImportant

If your event log contains any of the messages in the following list, be sure to check that the cables for the storage are not damaged or disconnected. Also, follow the other recommendations in Verifying Permissions, Hardware, and Software Before Troubleshooting the Quorum Resource.



Event Messages That Are Consistent with Quorum Resource Problems



1034: The disk associated with cluster disk resource DriveLetter could not be found. The expected signature of the disk was DiskSignature.



This error can result when the disk signature of the quorum disk has been inadvertently changed. This can happen when you make changes through a disk or storage utility, or when you recreate the LUN containing the quorum resource. Note that the cluster identifies the quorum resource and other disk resources by disk signature, not just drive letter.



Follow the flowchart in this topic, and see if The Quorum Resource is on an Inaccessible or Nonfunctioning Disk applies to your situation. Consider whether Clusterrecovery.exe, which is described in Configuring a Computer for Troubleshooting the Quorum Resource in a Server Cluster, would be useful for your situation.



1035: Cluster disk resource DriveLetter could not be mounted.



Follow the flowchart in this topic, and see if The Quorum Resource is on an Inaccessible or Nonfunctioning Disk applies to your situation.



1066: Cluster disk resource DriveLetter is corrupt. Run ChkDsk /F to repair problems.



This error might indicate that the volume used for the quorum resource has a file system corruption problem, possibly a transient problem. Other events in the logs might help with diagnosis.



Follow the flowchart in this topic, and see if The Quorum Resource is on an Inaccessible or Nonfunctioning Disk applies to your situation.



1069: Cluster disk resource DriveLetter failed.



This error might indicate that the disk used for the quorum resource has a problem. Other events in the logs might help with diagnosis.



Follow the flowchart in this topic, and see if The Quorum Resource is on an Inaccessible or Nonfunctioning Disk applies to your situation.



1147 or 1148:



The Microsoft Clustering Service encountered a fatal error. The vital quorum log file 'q:\MSCS\quolog.log' could not be found. (Additional text is provided in this event.)



If you have Windows Server 2003 with the latest service pack, you might see this event and yet find that the Cluster service started. When you apply the latest service pack, if the quorum log and cluster configuration files are missing from the quorum resource, the operating system can replace these files with information from a node.



Follow the flowchart in this topic, and see if Files on the Cluster Quorum Might be Missing, Inaccessible, or Corrupt applies to your situation.



If you want to find out more details about a specific event that relates to the cluster, one source of information is the cluster log. The cluster log may be easiest to use when you already have a general sense of a problem and are looking for details. By default, the cluster log is called Cluster.log and is located in systemroot\Cluster. The log might have a different name, because the default name can be changed by changing the system environment variable called ClusterLog.

Flowchart for Troubleshooting the Quorum Resource



Use the following flowchart and the topics to which it refers to troubleshoot quorum resource problems. For information about the /fixquorum option mentioned in the flowchart, see Understanding the Fixquorum Option for Starting the Cluster Service, later in this topic.

Flow chart for troubleshooting the quorum

Understanding the Fixquorum Option for Starting the Cluster Service



The troubleshooting techniques shown in the flowchart in this topic use the /fixquorum option for starting the Cluster service. It is useful to understand the following details about the /fixquorum option:



When the /fixquorum option is used on a particular node, the Cluster service starts on that node, but the resources in the group that contains the quorum disk (usually the Cluster Group) remain offline. This allows you to attempt bringing the quorum resource online manually so that you can more easily diagnose problems with the quorum. Note that if this attempt to bring the quorum resource online fails, the Cluster service will stop again, even though it was started with the /fixquorum option.



Only one node at a time can be started with the /fixquorum option. You cannot join any other nodes to the node that was started with this option. When you have corrected the problem that you were having with the quorum resource, stop the Cluster service and restart it without options.



You can start the Cluster service with the /fixquorum option by opening a command prompt and typing:



net start clussvc /fixquorum



Or by typing:



net start clussvc /fq



You can also start the Cluster service with the /fixquorum option when using Services in Computer Management. To open Services, click Start, click Control Panel, double-click Administrative Tools, and then double-click Services. On a cluster node, the Cluster service will appear in the list of services. Right-click the service, click Properties, type /fixquorum in Start parameters, and then click Start.

15 February 2012

The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is 'Unknown'. The expected version is 'C.0.8.40'. To continue, update the version of the report server database and verify access rights. (rsInvalidReportServerDatabase)

Error 1 :-
The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is 'Unknown'. The expected version is 'C.0.8.40'. To continue, update the version of the report server database and verify access rights. (rsInvalidReportServerDatabase) 

In SSRS 2005

WorkAround :-

1. Check ReportServer and ReportServerTempDB is created
2. If DB is missing, Take a Backup from server and restore, or need to uninstall SSRS and reinstall
3. Connect to report config Manager
4. Database Settings click update.
5. Make sure all goes Green in Report Configuration
6. Now we will be able to browse .


Error 2 :- "Create New Database Script for report server"


In SQL Server Reporting Services 2005, we can generate the scripts using Reporting Service Configuration Manager tool.

In SQL Server Reporting Services 2008, we can create the RSExecRole using the following script:



And then execute the scripts in Catalog.sql and CatalogTempDB.sql to create table, view, stored produce and so on.

USE [ReportServer]
GO
 
if not exists (select * from sysusers where issqlrole = 1 and name = 'RSExecRole')
BEGIN
 EXEC sp_addrole 'RSExecRole'
END
GO
 
USE msdb
GO
 
if not exists (select * from sysusers where issqlrole = 1 and name = 'RSExecRole')
BEGIN
 EXEC sp_addrole 'RSExecRole'
END
GO
 
USE master
GO
 
if not exists (select * from sysusers where issqlrole = 1 and name = 'RSExecRole')
BEGIN
 EXEC sp_addrole 'RSExecRole'
END
GO
 
USE [ReportServerTempDB]
GO
 
if not exists (select * from sysusers where issqlrole = 1 and name = 'RSExecRole')
BEGIN
 EXEC sp_addrole 'RSExecRole'
END
GO