2017年6月21日 星期三

sql to reduce/shrink LDF file size in SQL Server

To reduce the .ldf file, you must do three things:

  • Backup the database
  • Stop the database service
  • Shrink the .ldf file




SELECT name, physical_name AS current_file_location
FROM sys.master_files

Following is the output of files used by my SQL Server instance.

-------

Bill_Ryan
Jalapeno
Best Answer
Bill_Ryan  
In  Server Management Studio Right click on the database in question and go to Properties:
  • Go to "Options" on the left
  • Change the line "Recovery Model:" from Full to "Simple" and hit OK
  • Right click on the database again, go to Tasks - Shrink - Files
  • Under File Type: select Log and click OK
This will temporarily free up space for you, make sure that your database is set to back up and that its configured to empty the log after back up. Once you have resolved the space issue and made sure your log file is set to flush after backups, I recommend you put the recovery model back on Full. If it was already set to flush the log after backup, check to see why the backups aren't being done...
GerardMainardi
Datil
GerardMainardi  
Do you NEED that log?  If so, you've certainly got a problem.
Otherwise, you can go the ghetto solution that will take care of it in the short-term: change the database recovery model to simple, then change it back and set a new log size. (Right click database, properties, options, recovery model).
Let me know if you need more detailed instructions than this.  You'll lose all that transaction log, but this will do it.
EDIT: Bill beat me to it

2017年6月8日 星期四

HTC One X One X General [LIST] HTC secret codes for HTC One X

https://forum.xda-developers.com/showthread.php?t=1683634

General codes
  • *#06# = Show IMEI
  • *135# = Show mobile number


HTC specific codes
  • *#*#4636#*#* = device information program (such as telephone, battery, wifi, ...) << all these generic system information tools in the market read the same data as this code/tool does - [working]
  • *#*#7262626#*#* = Field-Test
  • *#*#3424#*#* = HTC Function Test program (very useful!) - [working]

The Beginner's Guide to Linux Disk Utilities - How-To Geek

Gparted :
whoami user
su -u user
password : live

sudo -s fdisk -l


the-beginners-guide-to-linux-disk-utilities/
There are two ways to detect bad sectors in Linux: you can use the Disk Utility GUI, or if you are a command line geek like us, you can use the badblocks command to check your hard disk for bad sectors:
sudo badblocks -v /dev/sdb1