www.allfree-stuff.com


Monday, May 15, 2017

How to fix ORA-01502 index or partition of such index is in usable state




If you get the error How to fix ORA-01502: index or partition of such index is in usable state in Oracle. It is possible that an index is broken from a table.


To fix this error, you can do the following:

rebuild the index with the following SQL command:


ALTER INDEX your_index_name REBUILD;



Thursday, May 11, 2017

Response.Headers -->This operation requires IIS integrated pipeline mode.



Try the following Solution:


Your Application Pool is in classic mode but your Application need integrated mode to fire. change it to Integrated Mode:

  1. Open IIS Manager
  2. Application Pool
  3. Select pool that your app are run in it (in case same app pool is used in multiple published web applications, in that case create a new appl. pool for this web application)
  4. In right panel select Basic Setting
  5. Manage Pipeline Mode change to Integrated



Sunday, April 2, 2017

Pen drive show empty even when data exists



Pen drive show empty even when data exists

Check if the files are not in hidden mode.

Click on "Start" -->Run --> Type cmd and press Enter.

Here I assume your pendrive drive letter as H:

Enter this command.

attrib -h -r -s /s /d h:\*.* --> Press Enter




Friday, February 17, 2017

To remove all debug breakpoints in Android Studio


To remove all debug breakpoints in Android Studio, follow the steps given below:



  1. Ctrl + Shift + F8 (open Breakpoints dialog)
  2. Ctrl + A (select all breakpoint)
  3. Alt + Delete (remove selected breakpoints)
  4. Enter (confirm)


Wednesday, January 18, 2017

How to Create users in SQL Server for accessing only one Database using Sql Server Management Studio



Steps Restrict SQL Server Login/User Access to only one database are given below:  

1. Connect to your SQL server instance using management studio
2. Goto Security -> Logins -> (RIGHT CLICK) New Login
3. fill in user details (userid/password etc.)
4. Under User Mapping, select the databases you want the user to be able to access and configure


Here is the list of the ROLES that can be assigned:

db_owner Members of the db_owner fixed database role can perform all configuration and maintenance activities on the database, and can also drop the database.

db_securityadmin Members of the db_securityadmin fixed database role can modify role membership and manage permissions. Adding principals to this role could enable unintended privilege escalation.

db_accessadmin Members of the db_accessadmin fixed database role can add or remove access to the database for Windows logins, Windows groups, and SQL Server logins.

db_backupoperator Members of the db_backupoperator fixed database role can back up the database.

db_ddladmin Members of the db_ddladmin fixed database role can run any Data Definition Language (DDL) command in a database.

db_datawriter Members of the db_datawriter fixed database role can add, delete, or change data in all user tables.

db_datareader Members of the db_datareader fixed database role can read all data from all user tables.

db_denydatawriter Members of the db_denydatawriter fixed database role cannot add, modify, or delete any data in the user tables within a database.

db_denydatareader Members of the db_denydatareader fixed database role cannot read any data in the user tables within a database.


Sunday, August 7, 2016

Back up All databases in SQL Server Instance with one script

This Script will allow you to backup all dbs in the fly. the script looks for .mdf file in your sql instance and back all of the files it find except the system databases...




DECLARE @name VARCHAR(50) -- database name  
DECLARE @path VARCHAR(256) -- path for backup files  
DECLARE @fileName VARCHAR(256) -- filename for backup  
DECLARE @fileDate VARCHAR(20) -- used for file name 

-- please change the set @path = 'change to your backup location'. for example,  
-- SET @path = 'C:\backup\' 
-- or SET @path = 'O:\sqlbackup\' if you using remote drives
-- note that remotedrive setup is extra step you have to perform in sql server in order to backup your dbs to remote drive 
-- you have to chnage you sql server accont to a network account and add that user to have full access to the network drive you are backing up to

SET @path = 'your backup location'  

SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112) 

DECLARE db_cursor CURSOR FOR  
SELECT name 
FROM master.dbo.sysdatabases 
WHERE name NOT IN ('master','model','msdb','tempdb')  

OPEN db_cursor   
FETCH NEXT FROM db_cursor INTO @name   

WHILE @@FETCH_STATUS = 0   
BEGIN   
       SET @fileName = @path + @name + '_' + @fileDate + '.BAK'  
       BACKUP DATABASE @name TO DISK = @fileName  

       FETCH NEXT FROM db_cursor INTO @name   
END   

CLOSE db_cursor   
DEALLOCATE db_cursor 

Tuesday, January 5, 2016

Android Mobile Phone Codes to Access Hidden/Secret Menu


If you feel you want to explore to play with some secret menu inside your android phone, then this are the codes to enter to bring up these Secret menus

PHONE INFORMATION: *#*#4636#*#*

Above code can be used to get some interesting information about your phone and battery. It shows following 4 menus on screen:
  • Phone information 
  • Battery information
  • Battery history 
  • Usage statistics 

HARD RESET:  *2767*3855# 

Think before you dial this code. This code is used for factory format. It’ll remove all files and settings including the internal memory storage. It’ll also reinstall the phone firmware.

NOTE: Once you dial this code, there is no way to cancel the operation unless you remove the battery from the phone. So think twice before giving this code. 

Phone Camera Update: *#*#34971539#*#*

This code is used to get information about phone camera. It shows following 4 menus:
  • Update camera firmware in image (Don’t try this option) 
  • Update camera firmware in SD card 
  • Get camera firmware version 
  • Get firmware update count 

WARNING: Never use the first option otherwise your phone camera will stop working and you’ll need to take your phone to service center to reinstall camera firmware. 

End Call/Power Button *#*#7594#*#*

This one is my favorite one. This code can be used to change the “End Call/Power Button” action in your phone. Be default, if you long press the button, it shows a screen asking you to select any option from Silent mode, AirPlane mode and Power off. You can change this action using this code. You can enable direct power off on this button so you don’t need to waste your time in selecting the option.

Quick Backup to all your media files *#*#273283*255*663282*#*#*

This code opens a File copy screen where you can back up your media files e.g. Images, Sound, Video and Voice memo.

Test Service Mode *#*#197328640#*#*
This code can be used to enter into Service mode. You can run various tests and change settings in the service mode. 

Below are some important Android USSD codes regarding Wireless Lan Tests, Softwares and Hardwares version:
  • *#*#528#*#* ––> Wireless Lan Tests
  • *#*#232338#*#* ––> Displays Wi-Fi Mac-address
  • *#*#1472365#*#* ––> For a quick GPS test
  • **#*#1575#*#* ––> A Different type GPS test
  • *#*#0283#*#* ––> Packet Loop back test
  • *#*#0*#*#* ––> LCD display test
  • *#*#0673#*#* OR *#*#0289#*#* ––> Audio test
  • *#*#0842#*#* ––> Vibration and Backlight test
  • *#*#2663#*#* ––> Displays touch-screen version
  • *#*#2664#*#* ––> Touch-Screen test
  • *#*#0588#*#* ––> Proximity Sensor test
  • *#*#3264#*#* ––> RAM Version
  • *#*#232331#*#* ––> Bluetooth test
  • *#*#7262626#*#* ––> Field test
  • *#*#232337#*#* ––> Displays bluetooth device address
  • *#*#8255#*#* ––> For Google Talk service monitoring
  • *#*#4986*2650468#*#* ––> PDA, Phone, Hardware, RF Call Date firmware info
  • *#*#1234#*#* ––> PDA and Phone firmware info
  • *#*#1111#*#* ––> FTA Software version
  • *#*#2222#*#* ––> FTA Hardware version
  • *#*#44336#*#* ––> Displays Build time and change list number
  • *#06# ––> Displays IMEI number
  • *#*#8351#*#* ––> Enables voice dialling logging mode
  • *#*#8350#*#* ––> Disables voice dialling logging mode
  • **05***# ––> Execute from Emergency dial screen to unlock PUK code (SAMSUNG ONLY)
  • *#*#7780#*#* ––> Wipe data/factory data reset It’ll remove the following things:
    - Google account settings stored in your phone
    - System and application data and settings
    - Downloaded applications
    It’ll NOT remove:
    - Current system software and bundled application
    - SD card files e.g. photos, music files, etc.

NOTE: Once you dial this code, you get a prompt screen asking you to click on “Reset phone” button. So you get a chance to cancel your operation.
THIS POST WAS COPIED FROM ANDROID NIGERIA WEBSITE