Wednesday, December 11, 2013

SQLServer - [ Error: Value cannot be null. Parameter name: viewInfo ]


Error: Value cannot be null. Parameter name: viewInfo (Microsoft.SqlServer.Management.SqlStudio.Explorer)

I came across this error on a test database server when I launched the SSMS. The version of SQL Server I was using was 2008 R2 SE. A dialog box with following message would prompt whenever I click on anything in the management studio.

Value cannot be null. Parameter name: viewInfo (Microsoft.SqlServer.Management.SqlStudio.Explorer)

The problem appeared to be when accessing the contents of a settings file. The file had invalid entries. This file is CurrentSettings-<date>. The fix for this is as shown below:

1. On the server Go to start menu–>Your profile–>Documents–>SQL Server Management Studio–>Settings (this is the location of the file specified above)

2. Delete all files from this folder

3. Restart sqlserver services

4. Launch the SSMS and this error is gone. You will be able to expand all the folders and perform regular SSMS activities without this error.

Hope this helps!

Font : http://mssqlnuggets.wordpress.com/

Friday, December 6, 2013

Oracle - ORA-01172/ORA-01151 [ Baby does not cry =)]


SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01172: recovery of thread 1 stuck at block 7583 of file 2
ORA-01151: use media recovery to recover block, restore backup if needed


SQL> recover database;
Media recovery complete.
SQL> alter database open;



SQL> select * from dba_data_Files where file_id=2;

FILE_NAME
------------------------------------------------------------------------------------------------------------------------
   FILE_ID TABLESPACE_NAME                     BYTES     BLOCKS STATUS    RELATIVE_FNO AUT   MAXBYTES  MAXBLOCKS
---------- ------------------------------ ---------- ---------- --------- ------------ --- ---------- ----------
INCREMENT_BY USER_BYTES USER_BLOCKS ONLINE_
------------ ---------- ----------- -------
/home/etr/db/dbfiles/undotbs01.dbf
         2 UNDOTBS1                        214958080      26240 AVAILABLE            2 YES 8388608000  1024000
       25600  214892544       26232 ONLINE