:::: MENU ::::

Posts Categorized / System Administration

  • Dec 05 / 2011
  • 0
dbDigger, Storage, System Administration, Windows 7

Use DiskPart utility for disk operations in Windows

After running FDisk utility on my laptop. I created a primary partition for windows 7 installation with intention to configure extended partition later along with logical drives on it. After completing the Windows 7 installation, i opened disk management snapin.
It was a bit confusing when i found no option to create extended partition for unused disk space. I was only able to create simple volumes configured all in primary partition.

Solution

After some research i came to know that Windows 7 uses a command line utility ‘DiskPart’ for disk operations with full access. It has more operational capabilities than that of commonly used disk management snapin. It can format, create/delete partitions, etc. DiskPart is also available in Windows 2000 and XP. It should be considered that disk management snapin lacks some operations on disk to avoid any data loss. However DiskPart provides full access for any operation without any prevention from data loss. So while using DiskPart utility extreme care is required.

How to Open

Open cmd, write diskpart and press Enter. Else directly enter DiskPart in run box or search box of windows. DiskPart console would be opened.

Using DiskPart for disk operations

How to operate

DiskPart is a powerful tool and can be operated through few simple commands on console. First of all have a clear idea of what to do. Then get its commands by entering ? on diskpart console. Full list of commands would be available along with short description. Also consider online product help for any guide line. For operations select the target disk. Simple type select disk 0 (as in my case it was disk no 0) and press enter. Disk number may be get from disk management snapin.

Select disk in DiskPart utility

Creating extended partition through DiskPart

In my case i was only required to create logical partitions of all available disk space other than primary partition. I typed create partition extended and entered. Size parameter may be provided, here it converted all available space to a extended partition.

Going Back to Disk Management Snapin

Further operations of creating logical drives may be performed in disk management snapin. So to be on safe side i used disk management snapin for creating logical drives and my disk was ready to be used.

  • Jul 27 / 2011
  • 0
dbDigger, ETL, System Administration

How to easily get row count in a flat file (.txt file)

Note pad is handy tool for data transportation processes. It lacks fancy editing and formatting tools but is simple and efficient. If you have got a .txt file and it is required to get total data rows in the file, then go through following couple of short cut keys.
Assuming that .txt file is opened on your PC.

  1. Press Cntrl + End
  2. Press Cntrl + G

It would give you total number of rows + 1, in your flat file. e.g If generated  information box showed 3405 then 3404 is number of total rows in that flat file.

How to easily get row count in a flat file

  • May 14 / 2010
  • 0
DBA Interview questions, dbDigger, System Administration

At what time my windows server was started

I was curious to know that how much time has passed since my Windows Server is running. I found nice command to know the start time of Windows server along with other server statistics. Open command prompt and enter following command

net statistics server

As a result some information would be generated. First line contains name of Windows Server and second line contains the time when Windows Server was started as marked in image below.

When my windows server was started

This command may be used to get information about windows client OS like XP, Vista. In that case it is more useful to use

net statistics workstation

  • Apr 27 / 2009
  • 0
dbDigger, System Administration

How to allow shut down of Srever without login

By default Windows Server family does not allow shut down unless you are logged In. It is suitable for servers to control shut down access. I also use Windows Server 2003 on my PC. And often i am required to keep my PC on while other users are connected to it for some reason. So i log off from windows and keep my PC on. I require a way so that any one may shut down my PC with Windows Server 2003, without being logged on. To enable shut down option without being logged on

  • Type ‘control admintools’ commad in run box and click OK

Access Admin Tools through Run Box

You will get Administrative Tools in a window before you.

  • Click ‘Local Security Policy’
  • ‘Local Security Settings’ will be displayed in Microsoft Management Console (MMC)
  • Click ‘security options’ folder in left panel
  • You will get a list of security options in right panel of MMC
  • Click ‘Shutdown: Allow system to be shutdown without having to log on’
  • Set the option enable and click OK

Enable option to shut down PC without log in

Now you may shut down your PC with Windows Server OS, without a need to log on. However i would suggest that do not enable this option without explicit requirement.

  • Apr 23 / 2009
  • 1
dbDigger, Security and Permissions, System Administration

How to get users currently accessing my files through network

Some of my colleagues use my PC as a file server by making some shared folders there. They access files in those folders. Before shut down of my PC at the end of shift i have to make sure that no one is currently accessing any file on my PC through network. For this purpose i use a command net files in cmd or windows power shell

Users currently accessing the files on my pc through network

If list is populated as shown in snap, then it means that there are users accessing files on my PC through network and shut down may cause interruption in their work.

Pages:1234
Consult us to explore the Databases. Contact us