The log file for database is full. Back up the transaction log for the database to free up some log space

Sunday, March 17, 2013

While dealing with sql server databases, you might encounter this error while trying to insert data into the database

"The log file for database is full. Back up the transaction log for the database to free up some log space."

As the error message specified you should backup the transaction log in order to free up some log space.

Here are 2 commands that you can use to do just that.

To empty it 


backup log <dbname> with truncate_only


To backup to some other disk


backup log <dbname> to disk='c:\somefile.bak'


Read more...

Device activation error on SQL server

Tuesday, February 26, 2013

Sometime when you're trying to restore a sql server database from a different server using SQL management studio, you'll get this error


Device activation error 


This is usually caused by  the original database which is in the original server, which may consist of several data files (.mdf), requires the same file location in the new server.

However, this can be resolved by running this command in the SQL management studio.

Because the original database, which may consists of several data files(.ndf, .mdf and .ldf files), requires that the SQL Server B has exact the same file locations

First check total files in the backup by using this query

RESTORE FILELISTONLY FROM DISK='F:\SQLbackup\myDatabase.BAK'

Based on the result, run the following query

RESTORE database SelfService2 FROM disk='F:\SQLbackup\myDatabase.BAK'
with replace,
move 'myDatabase_Data' to 'F:\SQLData\myDatabase_Data.mdf',
move 'myDatabase_Log' to 'F:\SQLData\myDatabase_Log.mdf'


Make sure the new path of database with it name does not exist in that particular path 


Read more...

Copy contents of a directory

Thursday, December 27, 2012

If you need to create a batch file in Windows to copy the content of a directory including its subdirectory, you can use 'xcopy'.

xcopy /s c:\source d:\target

These are some of the options you can use with the command

  • /s/e - recursive copy, including copying empty directories.
  • /v - add this to verify the copy against the original. slower, but for the paranoid.
  • /h - copy system and hidden files.
  • /k - copy read-only attributes along with files. otherwise, all files become read-write.
  • /x - if you care about permissions, you might want /o or /x.
  • /y - don't prompt before overwriting existing files.
  • /z - if you think the copy might fail and you want to restart it, use this. It places a marker on each file as it copies, so you can rerun the xcopy command to pick up from where it left off.

Read more...

How to get post total for each author for blogspot

Wednesday, March 28, 2012

Sometimes, you have a blog with several authors and you might need to keep tract on their total post. So, this is how I do it

I create a simple php file to do that.

$url = "http:///feeds/posts/default?alt=rss&redirect=false&max-results=10000"
$str = file_get_contents($url)

echo "NickName (".substr_count($str, (authorName)').");
echo "NickName2 (".substr_count($str, (authorName2)').");

Read more...

How To Log Every Query That Goes Through MySQL

Ever wonder the easiest way to log each of your query in mysql? Here's the simplest way where you don't need to restart mysql everytime.


1. Open your command prompt window.

2. Browser to you mysql folder.
Eg :

cd Program Files\MySQL\MYSQL5.1\bin

3. Log into your mysql using cmd
Eg :
mysql -u root -p
You will be asked for your password, so enter your password

4. Now execute this statement..
SET GLOBAL log_output = 'TABLE';
then
SET GLOBAL general_log = 'ON';

And you're done. Check your general_log table in the 'mysql' database.

After certain period of time, you will realized that your general_log table is getting bigger and it will consume some time just to load. And btw, you can't delete the content just like that. So here's how to overcome that.

1. Follow step 1 and 2 as above.

2. Choose 'mysql' db by running this cmd..
USE mysql

3.Create a new table similar to general_log structure using this cmd
create table general_log_dummy like general_log

4. rename and replace the tables
rename table general_log to general_log_old, general_log_dummy to general_log

Now you have a new general_log table and you can delete the old table.

Read more...

Wednesday, February 29, 2012


Meet our future computer...

TRONDHEIM, Norway and BARCELONA, Spain -26 Feb. 2012 @ Showstoppers MWC – FXI Technologies, Inc. today introduced the launch of cstick.com, a community website and technical forum where Cotton Candy development units are immediately available for pre-order.

“The world is anxiously awaiting Cotton Candy’s release,” said Borgar Ljosland, CEO and founder of FXI. “We’ve had interest in the any screen computer for everything from portable set top box gaming and entertainment to mobile any screen computing, in addition to a host of specialized medical, automotive and other applications. The size, raw horsepower and combined HDMI, USB and MicroUSB connectivity bring unprecedented flexibility to the portable market. ”

On display at this week’s Mobile World Congress tradeshow in the Innovation Norway Booth (Hall 2.0-2A67), Cotton Candy is the world’s first any screen cloud computer, weighing only 21 grams. It’s unique architecture will allow the device to serve as an ideal companion to smartphones, tablets, notebook PCs and Macs as well as will add smart capabilities to existing displays, set top boxes and game consoles.

Specifications include an ARM® Cortex™-A9 (1GHz) CPU from Samsung, an ARM Mali™-400 MP (Quad-core, 1.2GHz) GPU, Wi-Fi and Bluetooth, HDMI output and the Android operating system. It decodes MPEG-4, H.264 and other video formats and display HD graphics on any HDMI equipped screen. Operating systems supported to date include Android Gingerbread and Ice Cream Sandwich as well as Ubuntu. On-screen content can be controlled a wide variety of ways – wirelessly using smartphones with an app, Bluetooth peripherals like mice and RF remote controls; or by leveraging a notebook’s integrated keyboard and touchpad.

To join the Cotton Candy development community, visit www.cstick.com.

About FXI
FXI Technologies (www.fxitech.com) is a Norway-based hardware and software startup dedicated to making the world of digital screens smart and personal.

####
This article was originally published in forum thread: Fxi launches cotton candy developer site, takes pre-orders started by Borgar Ljosland View original post

Read more...

Apple co-founder Steve Jobs Passed Away

Wednesday, October 5, 2011

SAN FRANCISCO: Apple co-founder and former CEO Steve Jobs, counted among the greatest American CEOs of his generation, died on Wednesday at the age of 56, after a years-long and highly public battle with cancer and other health issues.

Jobs' death was announced by Apple in a statement late on Wednesday. The Silicon Valley icon who gave the world the iPod and the iPhone had resigned as CEO of the world's largest technology corporation in August, handing the reins to current chief executive Tim Cook.

A survivor of a rare form of pancreatic cancer, he was deemed the heart and soul of a company that rivals Exxon Mobil as the most valuable in America.


Apple CEO Steve Jobs holds up the new iPod Nano after introducing it at an event in San Francisco, California in this September 7, 2005 file photo. - REUTERS/Lou Dematteis
''Steve's brilliance, passion and energy were the source of countless innovations that enrich and improve all of our lives. The world is immeasurably better because of Steve,'' Apple said in a statement announcing Jobs' passing.

''His greatest love was for his wife, Laurene, and his family. Our hearts go out to them and to all who were touched by his extraordinary gifts.''

Job's health had been a controversial topic for years. His battle with cancer had been of deep concern to Apple fans, investors and the company's board alike. Over past years, even board members have confided to friends their concern that Jobs, in his quest for privacy, wasn't being forthcoming enough with directors about the true condition of his health.

Now, despite investor confidence in Cook, who has stood in for his boss during three leaves of absence, there remain concerns about whether the company would stay a creative force to be reckoned with beyond the next year or so without its founder and visionary at the helm.

The news triggered an immediate outpouring of sympathy. Among others, Microsoft CEO Bill Gates said he will miss Jobs ''immensely''.

Read more at http://thestar.com.my/news/story.asp?file=/2011/10/6/nation/20111006075141&sec=nation

Read more...
Technology blogs Blog Directory

  © Blogger template Noblarum by Ourblogtemplates.com 2009

Back to TOP