Basic Server PPT (THDC)
Basic Server PPT (THDC)
Basic Server PPT (THDC)
go
Community Area
Login
Register Now
Home
General Networking
12
This article continues the Networking for Beginners series by talking about the differences between workstations and
servers.
If you would like to read the other parts in this article series please go to:
So far in this article series, I have talked a lot about networking hardware and about the TCP/IP protocol. The
networking hardware is used to establish a physical connection between devices, while the TCP/IP protocol is
essentially the language that the various devices use to communicate with each other. In this article, I will continue
the discussion by talking a little bit about the computers that are connected to a network.
Even if you are new to networking, you have no doubt heard terms such as server and workstation. These terms are
generally used to refer to a computers role on the network rather than the computers hardware. For example, just
because a computer is acting as a server, it doesnt necessarily mean that it has to be running server hardware. It is
possible to install a server operating system onto a PC, and have that PC act as a network server. Of course in most
real life networks, servers are running specialized hardware to help them to be able to handle the heavy workload
that servers are typically subjected to.
What might make the concept of network servers a little bit more confusing is that technically speaking a server is any
computer that hosts resources over a network. This means that even a computer thats running Windows XP could be
considered to be a server if it is configured to share some kind of resource, such as files or a printer.
Computers on a network typically fall into one of three roles. Usually a computer is considered to be either a
workstation (sometimes referred to as a client), server, or a peer.
Workstations are computers that use network resources, but that do not host resources of their own. For example, a
computer that is running Windows XP would be considered a workstation so long as it is connected to a network and
is not sharing files or printers.
Servers are computers that are dedicated to the task of hosting network resources. Typically, nobody is going to be
sitting down at a server to do their work. Windows servers (that is, computers running Windows Server 2003,
Windows 2000 Server, or Windows NT Server) have a user interface that is very similar to what you would find on a
Windows workstation. It is possible that someone with an appropriate set of permissions could sit down at the server
and run Microsoft Office or some other application. Even so, such behavior is strongly discouraged because it
undermines the servers security, decreases the servers performance, and has the potential to affect the servers
stability.
The last type of computer that is commonly found on a network is a peer. A peer machine is a computer that acts as
both a workstation and a server. Such machines typically run workstation operating systems (such as Windows XP),
but are used to both access and host network resources.
In the past, peers were found primarily on very small networks. The idea was that if a small company lacks the
resources to purchase true servers, then the workstations could be configured to perform double duty. For example,
each user could make their own files accessible to every other user on the network. If a user happens to have a
printer attached to their PC, they can also share the printer so that others on the network can print to it.
Peer networks have been traditionally discouraged in larger companies because of their inherent lack of security, and
because they cannot be centrally managed. Thats why peer networks are primarily found in extremely small
companies or in homes with multiple PCs. Windows Vista (the successor to Windows XP) is attempting to change
that. Windows Vista will allow users on traditional client/server networks to form peer groups that will allow the users
and those groups to share resources amongst themselves in a secure manner, without breaking their connection to
network servers. This new feature is being marketed as a collaboration tool.
Earlier I mentioned that peer networks are discouraged in favor of client/server networks because they lack security
and centralized manageability. However, just because a network is made up of workstations and servers, it doesnt
necessarily guarantee security and centralized management. Remember, a server is only a machine that is dedicated
to the task of hosting resources over a network. Having said that, there are countless varieties of servers and some
types of servers are dedicated to providing security and manageability.
For example, Windows servers fall into two primary categories; member servers and domain controllers. There is
really nothing special about a member server. A member server is simply a computer that is connected to a network,
and is running a Windows Server operating system. A member server might be used as a file repository (known as a
file server), or to host one or more network printers (known as a print server). Member servers are also frequently
used to host network applications. For example, Microsoft offers a product called Exchange Server 2003 that when
installed on a member server, allows that member server to function as a mail server. The point is that a member
server can be used for just about anything.
Domain controllers are much more specialized. A domain controllers job is to provide security and manageability to
the network. I am assuming that youre probably familiar with the idea of logging on to a network by entering a
username and password. On a Windows network, it is the domain controller that is responsible for keeping track of
usernames and passwords.
The person who is responsible for managing the network is known as the network administrator. Whenever a user
needs to gain access to resources on a Windows network, the administrator uses a utility provided by a domain
controller to create a user account and password for the new user. When the new user (or any user for that matter)
attempts to log onto the network, the users credentials (their username and password) are transmitted to the domain
controller. The domain controller validates the users credentials by comparing them against the copy stored in the
domain controllers database. Assuming that the password that the user entered matches the password that the
domain controller has on file, the user is granted access to the network. This process is called authentication.
On a Windows network, only the domain controllers perform authentication services. Of course users will probably
need to access resources stored on member servers. This is not a problem because resources on member servers
are protected by a set of permissions that are related to the security information stored on domain controllers.
For example, suppose that my user name was Brien. I enter my username and password, which is sent to a domain
controller for authentication. When the domain controller authenticates me, it has not actually given me access to any
resources. Instead, it validates that I am who I claim to be. When I go to access resources off of a member server, my
computer presents a special access token to the member server that basically says that I have been authenticated by
a domain controller. The member server does not trust me, but it does trust the domain controller. Therefore, since
the domain controller has validated my identity, the member server accepts that I am who I claim to be and gives me
access to any resources for which I have permission to access.
Advertisement
Conclusion
As youve probably guessed, the process of being authenticated by a domain controller and gaining access to
network resources is a little more complicated than what I have discussed here. I will be discussing authentication
and resource access in much greater detail later in the series. For right now, I wanted to keep things simple so that I
could gradually introduce you to these concepts. In the next part of this article series, I will be discussing domain
controllers in much more detail. As I do, I will also discuss the role that domain controllers play within the Active
Directory.
If you would like to read the other parts in this article series please go to:
See Also
Networking Basics: Part 14 - Security Groups
Networking Basics: Part 11 - The Active Directory Users and Computers Console
Brien Posey is an MCSE and has won the Microsoft MVP award for the last few years. Brien has
written well over 4,000 technical articles and written or contributed material to 27 books.
Latest Contributions
Building a PowerShell GUI (Part 9) 23 Aug. 2016
Product Review: SolarWinds Network Performance Monitor Version 12.0 21 June 2016
Featured Links
Newsletter Subscription
submit
My Subscription
Newsletters
By subscribing to our newsletters you agree to the terms of our privacy policy
Featured Product
WindowsNetworking.com Sections
Articles & Tutorials
Blogs
Hardware
KBase Tips
Newsletters
Our Authors
Services
Site News
Software
Useful Resources
Webinars
White Papers
Advertisement
Featured Freeware
General Networking
Interviews
Network Protocols
Network Troubleshooting
Product Reviews
VoIP
Windows 10
Windows 2000
Windows 2003
Windows 7
Windows 8
Windows 95/98/ME
Windows NT 4
Windows Server 2008
Windows XP
Wireless Networking
Home
Articles & Tutorials
KBase Tips
Products
Reviews
Free Tools
Blogs
Forums
White Papers
Contact Us
Services
SharePoint Hosting
Hardware
Anti-Spam Hardware
Anti-Virus Hardware
Firewalls & VPN
Load Balancers
Mail Archiving
Servers
Storage
Software
Administration tools
Backup software
Data recovery software
Free Tools
IP PBX Servers
Network Mapping
Network monitoring / management
Patch Management
Remote control software
SharePoint Tools
Terminal Servers
TechGenix Ltd is an online media company which sets the standard for
providing free high quality technical content to IT professionals.
The leading Microsoft Exchange Server and Office 365 resource
site.
The No.1 Forefront TMG / UAG and ISA Server resource site
Advertise With Us
Contact Us
http://www.windowsnetworking.com/
What is a Server
1. 1. WHAT IS A SERVER? www.Kuwait10.net
2. 2. WHAT IS A SERVER? <ul><li>A COMPUTER (HARDWARE)? </li></ul><ul><li>A
PROGRAM (SOFTWARE)? </li></ul>OR
3. 3. WHAT IS A SERVER? <ul><li>A COMPUTER (HARDWARE)? </li></ul><ul><li>A
PROGRAM (SOFTWARE)? </li></ul>
4. 4. FOR EXAMPLE, <ul><li>A typical PC (Desktop or Laptop) </li></ul><ul><li>+ Apache
HTTP Server (Software) </li></ul><ul><li>= Web Server </li></ul>
5. 5. REQUEST REQUEST REQUEST
6. 6. SERVICE SERVICE SERVICE
7. 7. TYPES OF SERVERS
8. 8. TYPES OF SERVERS Examples Provide Type <ul><li>Microsoft SQL Server
</li></ul><ul><li>Oracle Database </li></ul><ul><li>MySQL </li></ul>Database Services
Database Server <ul><li>Apache HTTP Server </li></ul><ul><li>Microsoft IIS (Part of
Microsoft Windows) </li></ul>Web Sites Hosting Web Server <ul><li>Microsoft Windows
Storage Server (Built on the Microsoft Windows Server) </li></ul>File Services (Storing
Shared Files) File Server
9. 9. TYPES OF SERVERS Examples Provide Type <ul><li>Microsoft Exchange Server
</li></ul><ul><li>IBM Lotus Domino </li></ul>E-mail Services Mail Server <ul><li>Oracle
WebLogic Server </li></ul><ul><li>Oracle Application Server </li></ul><ul><li>Oracle
GlassFish Server </li></ul><ul><li>Zend Server </li></ul>An Environment To Run Certain
Applications Application Server <ul><li>Microsoft Windows Server </li></ul><ul><li>BIND
</li></ul>Translation of Domain Names Into IP Addresses DNS Server
10. 10. TYPES OF SERVERS OTHER TYPES OF SERVERS: FTP Server, Chat Server, Fax
Server, Game Server, Audio/Video Server Examples Provide Type <ul><li>Microsoft
Forefront Threat Management Gateway (ISA Server) </li></ul><ul><li>Apache HTTP Server
</li></ul><ul><li>Apache Traffic Server </li></ul>Filtering And Caching Proxy Server
<ul><li>Microsoft Windows Storage Server (Built on the Microsoft Windows Server)
</li></ul>Printer Services Print Server
11. 11. TYPES OF SERVER FORM FACTORS
12. 12. TYPES OF SERVER FORM FACTORS Blade: A blade servers are for use in blade
enclosure that designed to fit within a standardized 19" mounting rack. Rack: A rack
server is specially designed to fit within a standardized 19" mounting rack. Tower: A
tower server is a free-standing unit. similar to a large desktop pc in both size and shape.
13. 13. SERVERS VS. PCs
14. 14. SERVER VS. PC <ul><li>Servers offer high reliability and dependability features that just
are not available on desktop PCs. </li></ul><ul><li>Servers have proven performance
advantages over PCs. </li></ul><ul><li>Servers help improve productivity, reduce operating
expenses, and lower maintenance costs. </li></ul>VS.
15. 15. REFERENCES Server buying guide (HP Small and Medium Business ). Server
(computing) - Wikipedia, the free encyclopedia. Software and Solutions for Dynamic IT
(Microsoft Servers). What Is a Server? (Dell, PDF File ). Is there more to your server than a
desktop PC on its side? (Intel ). Microsoft Servers - Wikipedia, the free encyclopedia . Which
high-performance server form factor is right for me ? (HP Small and Medium Business).
16. 16. ANY QUESTIONS? www.Kuwait10.net
Here 12 different types of servers that every techie should know about! The best geek is the one
who learns and knows about everything in tech, and to help out our awesome techie readers out
there we bring a good to know list of 12 types of servers and what do they do! 1. Real-Time
Communication Servers Also known as chat servers or IRC, and sometimes known as instant
messaging (IM) servers, these servers are meant to allow huge number users to exchange
information instantly. 2. FTP Servers This is one of the oldest of the Internet services available. The
FTP or File Transfer Protocol allows the users to securely transfer one or more files of any size
between two computers . 3. Collaboration Servers In many ways, collaboration software, once called
'groupware,' demonstrates the original power of the Web. Collaboration software designed to enable
users to collaborate, regardless of location, via the Internet or a corporate intranet and to work
together in a virtual atmosphere. 4. List Servers List servers lets users better manage their mass
mailing lists like open interactive discussions or one-way lists to deliver newsletters, announcements
or advertising. 5. Telnet Servers The Telnet server lets the users on to a host computer control and
work on remote computers. 6. Web Servers At its core, a Web server serves static content to a Web
browser by loading a file from a disk and serving it across the network to a user's Web browser. This
entire exchange is mediated by the browser and server talking to each other using HTTP. 7. Virtual
Servers A virtual server is a web server which shares its resources with multiple users. It's another
way of saying that multiple web sites share the resources of one server. 8. Proxy Servers Proxy
server is a server which acts as an intermediary for requests between the users and the servers.
Client connects to the proxy server and the proxy server evaluates the requests sent by the users
simplifies them and control their complexities . 9. Mail Servers Mail servers help in moving and
storing the e-mail over a network via LANs and WANs or across the Internet. 10. Server Platforms
Normally used in same context with that of operating systems, server platforms are the platforms
that are under the hardware or software of a system and the hence in the engine that drives the
server. 11. Open Source Servers Similar to server platforms, Open source server are referred to the
underlying open source operating system used in the IT infrastructures of the companies. 12.
Application Servers Application servers are a type of middleware which connects the database
servers and the app users
Primary Zone: In this, the file is saved as normal text file with filename (.dns).
Secondary Zone: It maintains a read-only copy of zone database on another DNS
server. Also, it acts as a back-up server to the primary server by providing fault tolerance and
load balancing
Stub Zone: It consists of a copy of name server and SOA records which is used for reducing
the DNS search orders.
3) Explain what does IntelliMirror do?
IntelliMirror helps to reconcile desktop settings, applications and stored files for users
especially for those users who move between workstations or those who works offline
4) In the case when MSI file is not available, how you can install an app?
To add the application using the Software Installer.ZAP text file can be used rather than the
windows installer
5) Explain how you can set up remote installation procedure without giving access to user?
Iterative Query
Recursive Query
Primary function of the domain controller is to validate users to the networks, it also provide
a catalog of Active Directory Objects.
To configure a TCP/PI client for an IPv4 client, you have to provide the IP address and the
subnet mask.
10) Explain what does it mean caching only server in terms of DNS?
The caching only DNS server provides information related to queries based on the data it
contains in its DNS cache.
11) Explain what is the way to configure the DHCP server such that it allocates the same IP
address to certain devices each time the address is removed?
To configure the DHCP server, you can create a reservation for the device. To create a
reservation, you must know the MAC hardware address of the device. To determine the
MAC address for a network device you can use the ipconfig or nbs tat command line
utilities.
12) Explain what is LDAP?
To look up for the information from the server, e-mail and another program follows or uses
the internet protocol. This protocol is referred as LDAP or Lightweight Directory Access
Protocol.
It is a set of files and folders that is stored on the local hard disk of each domain controller in
a domain and are replicated by the FRS ( File Replication Service). These files contain
group or user policy information.
14) Explain what is the difference between a thread and a computer process?
INODE holds the metadata of files; INODE is a pointer to a block on the disk, and it is
unique.
For storing same data at a different place RAID or Redundant Array of Independent Disks
strategy is used. It is a strategy for building fault tolerance and increase the storage
capacity. On separate drives it allows you to combine one or more volumes so that they are
accessed by a single drive letter
18) To check TCP/IP configurations and IP connectivity, what are the two command line
utilities that can be used?
Ipconfig: To check the computers IP configuration, command ipconfig can be used and
also it can be used to renew the clients IP address if it is provided by a DHCP server.
Ping: To check the connection between the local computer and any of the other computer
device on the network Ping command is used
19) Explain if it is possible to connect Active Directory to other 3rd party Directory services?
Yes, you can connect other vendors directory services with Microsoft version. By using
dirXML or LDAP to connect to other directories.
ntds.dit
edb.log
res1.log
res2.log
edn.chk
21) Explain what is the major difference between NTFS ( New Technology File System) or
FAT (File Allocation Table) on a local server?
For local users FAT (File Allocation Table) and FAT32 provides security, while NTFS ( New
Technology File System) provides security for domain users as well as local users. NTFS
provides file level security which is not possible through FAT32.
22) Mention what windows server 2008 service is used to install client operating system over
the network?
WDE ( Windows Deployment Services ) allows you to install client and server operating
systems over the network to any computer with a PXE enabled network interface
All Technical Interview Questions & Answers.
VMware Admin Interview Questions
Network
Database
Citrix
Linux
Unix
Storage
Java
Dot Net
C++
HR
Guest Blog
Rahim Shaikh
What are the FSMO roles? Who has them by default? What happens when each one fails?
What FSMO placement considerations do you know of?
I want to look at the RID allocation table for a DC. What do I do?
Whats the difference between transferring a FSMO role and seizing one? Which one should you NOT
seize? Why?
How do you configure a stand-by operation master for any of the roles?
What are the GPC and the GPT? Where can I find them?
How can you determine what GPO was and was not applied for a user? Name a few ways to do that.
A user claims he did not receive a GPO, yet his user and computer accounts are in the right OU, and
everyone else there gets the GPO. What will you look for?
Name a few differences in Vista GPOs
You want to standardize the desktop environments (wallpaper, My Documents, Start menu, printers
etc.) on the computers in one department. How would you do that?
The sysVOL folder stores the servers copy of the domains public files. The contents such as group
policy, users etc of the sysvol folder are replicated to all domain controllers in the domain.
Ans. Active Directory is a Meta Data. Active Directory is a data base which store a data base like your
user information, computer information and also other network object info. It has capabilities to manage
and administor the complite Network which connect with AD.
Ans: active directory is a domain controller which is use to authenticate and administrate the group of
computer,user,server etc. remotely. all the policies and security will be applicable on the client machine
which one is join the domain.and all this policies and security is defined in active directory.
The global catalog is a distributed data repository that contains a searchable, partial representation of
every object in every domain in a multidomain Active Directory forest. The global catalog is stored on
domain controllers that have been designated as global catalog servers and is distributed through
multimaster replication. Searches that are directed to the global catalog are faster because they do not
involve referrals to different domain controllers.
Q 4: Where is the AD database held? What other folders are related to AD?
A 19: Windows 2000 Domain controllers each create Active Directory Replication connection objects
representing inbound replication from intra-site replication partners. For inter-site replication, one domain
controller per site has the responsibility of evaluating the inter-site replication topology and creating Active
Directory Replication Connection objects for appropriate bridgehead servers within its site. The domain
controller in each site that owns this role is referred to as the Inter-Site Topology Generator (ISTG).
Q :15 What is LDP? What is REPLMON? What is ADSIEDIT? What is NETDOM? What is
REPADMIN?
A 15 : LDP : Label Distribution Protocol (LDP) is often used to establish MPLS LSPs when traffic
engineering is not required. It establishes LSPs that follow the existing IP routing, and is particularly well
suited for establishing a full mesh of LSPs between all of the routers on the network.
Replmon : Replmon displays information about Active Directory Replication.
ADSIEDIT :ADSIEdit is a Microsoft Management Console (MMC) snap-in that acts as a low-level editor
for Active Directory. It is a Graphical User Interface (GUI) tool. Network administrators can use it for
common administrative tasks such as adding, deleting, and moving objects with a directory service. The
attributes for each object can be edited or deleted by using this tool. ADSIEdit uses the ADSI application
programming interfaces (APIs) to access Active Directory. The following are the required files for using
this tool: ADSIEDIT.DLL
ADSIEDIT.MSCNETDOM : NETDOM is a command-line tool that allows management of Windows
domains and trust relationships. It is used for batch management of trusts, joining computers to domains,
verifying trusts, and secure channels.
REPADMIN :
This command-line tool assists administrators in diagnosing replication problems between Windows
domain controllers.Administrators can use Repadmin to view the replication topology (sometimes referred
to as RepsFrom and RepsTo) as seen from the perspective of each domain controller. In addition,
Repadmin can be used to manually create the replication topology (although in normal practice this
should not be necessary), to force replication events between domain controllers, and to view both the
replication metadata and up-to-dateness vectors.
A 29 : You really are spoilt for choice when it comes to scripting tools for creating Active Directory
objects. In addition to CSVDE, LDIFDE and VBScript, we now have the following DS commands: the da
family built in utility DSmod - modify Active Directory attributesDSrm - to delete Active Directory
objectsDSmove - to relocate objectsDSadd - create new accountsDSquery - to find objects that match
your query attributesDSget - list the properties of an object
A 25 : The number of days before a deleted object is removed from the directory services. This assists in
removing objects from replicated servers and preventing restores from reintroducing a deleted object.
This value is in the Directory Service object in the configuration NIC.
You want to standardize the desktop environments (wallpaper, My Documents, Start menu, printers etc.)
on the computers in one department. How would you do that? How it is possibal
Ans: AN application diretcory partition is a directory partition that is replicated only to specific domain
controller.Only domain controller running windows Server 2003 can host a replica of application directory
partition.
Using an application directory partition provides redundany,availabiltiy or fault tolerance by replicating
data to specific domain controller pr any set of domain controllers anywhere in the forest
Q:You want to standardize the desktop environments (wallpaper, My Documents, Start menu,
printers etc.) on the computers in one department. How would you do that? How it is possibal.
Ans:Login on client as Domain Admin user change whatever you need add printers etc go to system-User
profiles copy this user profile to any location by select Everyone in permitted to use after copy change
ntuser.dat to ntuser.man and assgin this path under user profile
ANS:
Use the DnsCmd command to create an application directory partition. To do this, use the following
syntax:
DnsCmd ServerName /CreateDirectoryPartition FQDN of partition
Global catalog provides a central repository of domain information for the forest by storing partial replicas
of all domain directory partitions. These partial replicas are distributed by multimaster replication to all
global catalog servers in a forest.
Ans
C:\>repadmin /showreps
domain_controller
where domain_controller is the DC you want to query to determine whether its a GC. The output will
include the text DSA Options: IS_GC if the DC is a GC. . . .
Ans:
type adsiedit.msc in run or command prompt
Q. Can you connect Active Directory to other 3rd-party Directory Services? Name a few options.
Ans. Yes, you can use dirXML or LDAP to connect to other directories
Ans 38: A. In Windows 2000 Server, you used to have to boot the computer whose password you wanted
to change in Directory Restore mode, then use either the Microsoft Management Console (MMC) Local
User and Groups snap-in or the command
net user administrator *
to change the Administrator password. Win2K Server Service Pack 2 (SP2) introduced the Setpwd utility,
which lets you reset the Directory Service Restore Mode password without having to reboot the computer.
(Microsoft refreshed Setpwd in SP4 to improve the utilitys scripting options.)
In Windows Server 2003, you use the Ntdsutil utility to modify the Directory Service Restore Mode
Administrator password. To do so, follow these steps:
1. Start Ntdsutil (click Start, Run; enter cmd.exe; then enter ntdsutil.exe).
2. Start the Directory Service Restore Mode Administrator password-reset utility by entering the argument
set dsrm password at the ntdsutil prompt:
ntdsutil: set dsrm password
3. Run the Reset Password command, passing the name of the server on which to change the password,
or use the null argument to specify the local machine. For example, to reset the password on server
thanos, enter the following argument at the Reset DSRM Administrator Password prompt:
Reset DSRM Administrator Password: reset password on server thanos
To reset the password on the local machine, specify null as the server name:
Reset DSRM Administrator Password: reset password on server null
4. Youll be prompted twice to enter the new password. Youll see the following messages:
5. Please type password for DS Restore Mode Administrator Account:
6. Please confirm new password:
Password has been set successfully.
7. Exit the password-reset utility by typing quit at the following prompts:
8. Reset DSRM Administrator Password: quit
ntdsutil: quit
1.
Local Group Policy objectEach computer has exactly one Group Policy object that is stored locally. This
processes for both computer and user Group Policy processing.
2.
SiteAny GPOs that have been linked to the site that the computer belongs to are processed next.
Processing is in the order that is specified by the administrator, on the Linked Group Policy Objects tab
for the site in Group Policy Management Console (GPMC). The GPO with the lowest link order is
processed last, and therefore has the highest precedence.
3.
DomainProcessing of multiple domain-linked GPOs is in the order specified by the administrator, on the
Linked Group Policy Objects tab for the domain in GPMC. The GPO with the lowest link order is
processed last, and therefore has the highest precedence.
4.
Organizational unitsGPOs that are linked to the organizational unit that is highest in the Active Directory
hierarchy are processed first, then GPOs that are linked to its child organizational unit, and so on. Finally,
the GPOs that are linked to the organizational unit that contains the user or computer are processed.
At the level of each organizational unit in the Active Directory hierarchy, one, many, or no GPOs can be
linked. If several GPOs are linked to an organizational unit, their processing is in the order that is
specified by the administrator, on the Linked Group Policy Objects tab for the organizational unit in
GPMC. The GPO with the lowest link order is processed last, and therefore has the highest precedence.
This order means that the local GPO is processed first, and GPOs that are linked to the organizational
unit of which the computer or user is a direct member are processed last, which overwrites settings in the
earlier GPOs if there are conflicts. (If there are no conflicts, then the earlier and later settings are merely
aggregated.)
What is LDAP?
This article will tell you how to add your first Windows 2003 DC to an existing Windows 2000 domain. This
article is particularly useful if you have Windows 2000 servers that will be replaced by new hardware
running Windows Server 2003.
The first step is to install Windows 2003 on your new DC. This is a straighforward process, so we arent
going to discuss that here.
Because significant changes have been made to the Active Directory schema in Windows 2003, we need
to make our Windows 2000 Active Directory compatible with the new version. If you already have
Windows 2003 DCs running with Windows 2000 DCs, then you can skip down to the part about DNS.
Before you attempt this step, you should make sure that you have service pack 4 installed on your
Windows 2000 DC. Next, make sure that you are logged in as a user that is a member of the Schema
Admin and Enterprise Admin groups. Next, insert the Windows 2003 Server installation CD into the
Windows 2000 Server. Bring up a command line and change directories to the I386 directory on the
installation CD. At the command prompt, type:
Code :
adprep /forestprep
After running this command, make sure that the updates have been replicated to all existing Windows
2000 DCs in the forest.
adprep /domainprep
The above command must be run on the Infrastructure Master of the domain by someone who is a
member of the Domain Admins group.
Once this is complete, we move back to the Windows 2003 Server. Click start then run - type in
dcpromo and click OK. During the ensuing wizard, make sure that you select that you are adding this DC
to an existing domain.
After this process is complete, the server will reboot. When it comes back online, check and make sure
that the AD database has been replicated to your new server.
Next, you will want to check and make sure that DNS was installed on your new server. If not, go to the
control panel, click on Add or Remove Programs, and click the Add/Remove Windows Components
button. In the Windows Components screen, click on Networking Services and click the details button. In
the new window check Domain Name System (DNS) and then click the OK button. Click Next in the
Windows Components screen. This will install DNS and the server will reboot. After reboot, pull up the
DNS Management window and make sure that your DNS settings have replicated from the Windows
2000 Server. You will need to re-enter any forwarders or other properties you had set up, but the DNS
records should replicate on their own.
The next 2 items, global catalog and FSMO roles, are important if you plan on decomissioning your
Windows 2000 server(s). If this is the case, you need to transfer the global catalog from the old server to
the new one.
First, lets create a global catalog on our new server. Here are the steps:
1. On the domain controller where you want the new global catalog, start the Active Directory Sites and
Services snap-in. To start the snap-in, click Start, point to Programs, point to Administrative Tools, and
then click Active Directory Sites and Services.
3. Double-click Servers, click your domain controller, right-click NTDS Settings, and then click
Properties.
4. On the General tab, click to select the Global catalog check box to assign the role of global catalog to
this server.
Make sure you allow sufficient time for the account and the schema information to replicate to the new
global catalog server before you remove the global catalog from the original DC or take the DC offline.
After this is complete, you will want to transfer or seize the FSMO roles for your new server. For
instructions, read Using Ntdsutil.exe to transfer or seize FSMO roles to a domain controller.
After this step is complete, we can now run DCPROMO on the Windows 2000 Servers in order to demote
them. Once this is complete, copy over any files you need to your new server and you should have
successfully replaced your Windows 2000 server(s) with a new Windows 2003 server(s
Global Catalyst is the one where the authentication happens, by default primary domain controller is
Global Catalyst, we can add global catalyst to improve the Netwrk Performance
Its a Directory Service which stores and manages the information of Objects(User,computer,printer
shared folder etc)
What are the requirements for installing AD on a new server?
Win2K3 CD
DNS
Static IP
You want to standardize the desktop environments (wallpaper, My Documents, Start menu, printers etc.)
on the computers in one department. How would you do that?
1. What are the required components of Windows Server 2003 for installing Exchange
2003? - ASP.NET, SMTP, NNTP, W3SVC
2. What must be done to an AD forest before Exchange can be deployed? - Setup
/forestprep
3. What Exchange process is responsible for communication with AD? - DSACCESS
4. What 3 types of domain controller does Exchange access? - Normal Domain
Controller, Global Catalog, Configuration Domain Controller
5. What connector type would you use to connect to the Internet, and what are the
two methods of sending mail over that connector? - SMTP Connector: Forward to smart host
or use DNS to route to each address
6. How would you optimise Exchange 2003 memory usage on a Windows Server 2003
server with more than 1Gb of memory? - Add /3Gb switch to boot.ini
7. What would a rise in remote queue length generally indicate? - This means mail is
not being sent to other servers. This can be explained by outages or performance issues with the
network or remote servers.
8. What would a rise in the Local Delivery queue generally mean? - This indicates a
performance issue or outage on the local server. Reasons could be slowness in consulting
AD, slowness in handing messages off to local delivery or SMTP delivery. It could also be
databases being dismounted or a lack of disk space.
9. What are the standard port numbers for SMTP, POP3, IMAP4, RPC, LDAP and
Global Catalog? - SMTP 25, POP3 110, IMAP4 143, RPC 135, LDAP 389, Global
Catalog - 3268
10. Name the process names for the following: System Attendant? MAD.EXE,
Information Store STORE.EXE, SMTP/POP/IMAP/OWA INETINFO.EXE
11. What is the maximum amount of databases that can be hosted on Exchange 2003
Enterprise? - 20 databases. 4 SGs x 5 DBs.
12. What are the disadvantages of circular logging? - In the event of a corrupt database,
data can only be restored to the last backup.
19 Responses to Windows sysadmin interview questions
1) How windows server will configure?
Tell them that you have 400 pc based network, and you configure a Active Directory domain on windows
servers to centralize administration tasks.
1) How windows server will configure?
Its depends on the role of the server. If you installing Active Directory, you have to run DCPROMO on
commond prompt, and followed instructions.
Simply you can say there is an option in windows Manage Server once you follow the instructions it will
guide you to configure your server.
If they are concern with Hardware server, tell them the hardware configuration and vendor of the server.
If they are asking about the types of windows server, tell them Standard, enterprise, or Small business
server etc.
Type
Question 2: What must be done to an AD forest before Exchange can be deployed? - Setup
/forestprep
question 2 is incorrect, in order for ms exchange 2k or 2003 to be sucessfully deployed both forestprep
and domain prep must successfuly complete first, before the setup.exe of the actual exchange install, or
the install and will error out if attempted.
I faced one interview they asked how many types of server in your company, how u configured.
1) How to migrate from windows 2000 to 2003 without distrubing the existing Domain ?????????
2) How to migrage from Ms. Exchange 2000 to 2003 and how to configure Outlook Web Access
????????
4) What is IIS and how to migrate from IIS 5.0 to IIS 6.0 ??
1.
1) What r the frequently asked questions on ADS 2003. and what r the main differences between ADS
2000 and 2003 ????????
2) What are main differences between WINS and DNS ???
2.
1.In windows2000 perfosonal or winxp pc perfomance is very low what is the solution you will give?
2. what is diffrent between AD2000 & AD2003?
3.
What r the frequently asked questions on ADS 2003. and what r the main differences between ADS 2000
and 2003 ????????
2) What are main differences between WINS and DNS ???
4.
XP
1.Firewall
2.Automatic update
4.Visual style
5.Remote Desktop
6.On Screen Board
8 etc..
5.
6.
most of these are terrible questions for a general windows/AD sysadmin. Theyre bookish, not realistic;
the kind of thing one looks up if one doesnt use every day.
Also, too many of the questions are focused on exchange. For example, we outsource exchange, so a
windows sysadmin here wouldnt be asked any of those questions
WINS:- It is used to resolve IP address into netbios Viceversa it is used prior version of win 2000
DNS:-It is used to resolve IP address into host name.Viceversa it is used in 2000, XP, 2003 server
Outlook Express
Outlook Express is the e-mail client that is included with Microsoft Internet Explorer 4.x, Microsoft Internet
Explorer 5.x, the Microsoft Windows 98 operating system, the Microsoft Windows Millennium Edition (Me)
operating system, the Microsoft Windows 2000 operating systems, and Microsoft Office 98 for the
Macintosh. Outlook Express is designed for home users who gain access to their e-mail messages by
dialing in to an Internet service provider (ISP).
Outlook
Outlook is Microsofts premier messaging and collaboration client. It is a stand-alone application that is
integrated into Microsoft Office and Exchange Server. Outlook also provides performance and integration
with Internet Explorer 5.5. Complete integration of e-mail, calendaring, and contact management, makes
Outlook the perfect client for many business users.
9.
Advantages of WINS: WINS will be really helofull in a multidomain environment where in users would
need to access many of the resources in different domains, rathere than adding different DNS suffixes of
each domain on the local machine. WINS is the best option. But i could also say WINS is not as stable as
DNS.
Networking questions
1. What is a default gateway? - The exit-point from one network and entry-way into
another network, often the router of the network.
2. How do you set a default route on an IOS Cisco router? - ip route 0.0.0.0 0.0.0.0
x.x.x.x [where x.x.x.x represents the destination address]
3. What is the difference between a domain local group and a global group? - Domain
local groups grant permissions to objects within the domain in which the reside. Global groups
contain grant permissions tree or forest wide for any objects within the Active Directory.
4. What is LDAP used for? - LDAP is a set of protocol used for providing access to
information directories.
5. What tool have you used to create and analyze packet captures? - Network Monitor
in Win2K / Win2K3, Ethereal in Linux, OptiView Series II (by Fluke Networks).
6. How does HSRP work?
7. What is the significance of the IP address 255.255.255.255? - The limited broadcast
address is utilized when an IP node must perform a one-to-everyone delivery on the local network
but the network ID is unknown.
A TechInterviews reader sent in the questions he faced at a major global company. The questions are
fairly generic:
1. Tell me about your analytical skills, cite some examples of how you have used your skills
in the past.
2. What are some of your long term goals?
3. What are your short term goals?
4. Where do you see yourself five years from now?
5. Tell me why I should hire you?
6. What does customer service mean to you?
7. Why did you leave your last job?
8. Describe your definition of a team player?
9. Sight examples of when in the past you have proven to be a team player?
10. How would you handle a conflict with another employee?
11. What do you believe you can gain by working at this company?
12. Give me some examples of times in the past, when you were able to avoid a conflict, by
thinking on your feet. Tell what you know about this company.
43 comments:
1.
2.
3.
Very Good
Reply
4.
5.
6.
7.
Please tell me that youre heading to keep this up! Its so great and so important. I cant wait to
read a lot more from you. I just feel like you know so substantially and know how to make people
listen to what you might have to say. This blog is just too cool to become missed. Terrific stuff,
genuinely. Please, PLEASE keep it up!
Reply
Replies
1.
Rahim ShaikhDecember 11, 2014 at 7:32 PM
Thanks
Reply
8.
Please tell me that youre heading to keep this up! Its so great and so important. I cant wait to
read a lot more from you. I just feel like you know so substantially and know how to make people
listen to what you might have to say. This blog is just too cool to become missed. Terrific stuff,
genuinely. Please, PLEASE keep it up!
Reply
9.
Replies
1.
Rahim ShaikhOctober 28, 2013 at 4:56 PM
Thanks for comments...
2.
Nice!!
Reply
10.
11.
12.
most of the answers lead to null. post some real time interview questions
Reply
13.
14.
BasudeoJuly 1, 2014 at 5:55 PM
15.
Very Nice
Reply
16.
It is very nice!
BigBrother
Reply
17.
ggod bro...
keep it up ... it will be help for freshers.& job seekers.
Reply
18.
19.
It too good......please keep on updating question and answer.... In this site is very helpful for
everyone
Reply
20.
It's good.
Have a question....
In my environment I have 2000 servers and 1 server is down.how to find/how do I come to know
that server is down
Reply
Replies
1.
Rahim ShaikhDecember 11, 2014 at 7:33 PM
You need monitoring service to check that, Solar winds has lots of product for server /
network monitoring.
2.
21.
Replies
1.
Rahim ShaikhDecember 11, 2014 at 7:32 PM
Thanks
Reply
22.
good
Reply
23.
25.
Answers are not much effectives as its not in the right forms.
Reply
26.
27.
g8 work man
Reply
Replies
1.
Rahim ShaikhJune 21, 2016 at 4:38 PM
Thanks Ashish
Reply
28.
29.
Replies
1.
Rahim ShaikhJune 21, 2016 at 4:38 PM
Thanks Dinesh
Reply
30.
cdfdf
Reply
Replies
1.
Rahim ShaikhJune 21, 2016 at 4:38 PM
Please leave proper comments Thanks.
Reply
31.
Ihave 1 branch office in bangalore. and main office is in Hyderabad. In main office ihave installed
ADDC, and branch office i And branch office i installed RODC ..IN BRANCH OFFICE RODC IS
FAILED WHAT CAN I DO .PLZ TELL ME THE answer
Reply
Replies
1.
Rahim ShaikhJune 21, 2016 at 4:37 PM
Answer- restore RODC from backup & it will take all the updates from Main office DC if
you are backing up server daily / weekly / monthly.
if there is no backup just do the metadata cleanup for the RODC and reinstall fresh
RODC.
hope answers the questions.
Reply
32.
Venkat
Ihave 1 branch office in bangalore. and main office is in Hyderabad. In main office ihave installed
ADDC, and branch office i And branch office i installed RODC ..IN BRANCH OFFICE RODC IS
FAILED WHAT CAN I DO .PLZ TELL ME THE answer
Reply
33.
Home
Followers
Follow by Email
Submit
Related Pages
Before Going To Interview
Network
Database
Citrix
Linux
Unix
Storage
Java
Dot Net
C++
HR
Guest Blog
Rahim Shaikh
Network
Network Admin Interview Questions
& Answers.
Q2. What is the difference between an unspecified passive open and a fully specified passive open
An unspecified passive open has the server waiting for a connection request from a client. A fully
specified passive open has the server waiting for a connection from a specific client.
Q7. Which layer of the 7 layer model provides services to the Application layer over the Session layer
connection?
Presentation.
Q11. BOOTP helps a diskless workstation boot. How does it get a message to the network looking for its
IP address and the location of its operating system boot files ?
BOOTP sends a UDP message with a subnetwork broadcast address and waits for a reply from a server
that gives it the IP address. The same message might contain the
name of the machine that has the boot files on it. If the boot image location is not specified, the
workstation sends another UDP message to query the server.
Q14. What is the difference between interior and exterior neighbor gateways
Interior gateways connect LANs of one organization, whereas exterior gateways connect the organization
to the outside world.
Q16. What are the advantages and disadvantages of the three types of routing tables
The three types of routing tables are fixed, dynamic, and fixed central. The fixed table must be manually
modified every
time there is a change. A dynamic table changes its information based on network traffic, reducing the
amount of manual maintenance. A fixed central table lets a manager
modify only one table, which is then read by other devices. The fixed central table reduces the need to
update each machine's table, as with the fixed table. Usually a
dynamic table causes the fewest problems for a network administrator, although the table's contents can
change without the administrator being aware of the change
.
Q17. What is a characteristic of Store and Forward switches?
They read the entire frame and check CRC before forwarding.
Q42. Why should you care about the OSI Reference Model
It provides a framework for discussing network operations and design.
Q43. What is the difference between routable and non- routable protocols
Routable protocols can work with a router and can be used to build large networks. Non-Routable
protocols are designed to work on small, local networks and cannot be used with a router.
Q46. What is the difference between TFTP and FTP application layer protocols
The Trivial File Transfer Protocol (TFTP) allows a local host to obtain files from a remote host but does
not provide reliability or security. It uses the fundamental packet delivery services offered by UDP. The
File Transfer Protocol (FTP) is the standard mechanism provided by TCP / IP for copying a file from one
host to another. It uses the services offered by TCP and so is
reliable and secure. It establishes two connections (virtual circuits) between the hosts, one for data
transfer and another for control information.
Q48. What is the minimum and maximum length of the header in the TCP segment and IP datagram
The header should have a minimum length of 20 bytes and can have a maximum length of 60 bytes.
49. What is difference between ARP and RARP
The address resolution protocol (ARP) is used to associate the 32 bit IP address with the 48 bit physical
address, used by a host or a router to find the physical address of
another host on its network by sending a ARP query packet that includes the IP address of the receiver.
The reverse address resolution protocol (RARP) allows a host to discover its Internet address when it
knows only its physical address.
Q51. What are the data units at different layers of the TCP / IP protocol suite
The data unit created at the application layer is called a message, at the transport layer the data unit
created is called either a segment or an user datagram, at the network layer the data unit created is
called the datagram, at the data link layer the datagram is encapsulated in to a frame and finally
transmitted as signals along the transmission media.
Bridges:
These operate both in the physical and data link layers of LANs of same type. They divide a larger
network in to smaller
segments. They contain logic that allow them to keep the traffic for each segment separate and thus are
repeaters that relay a frame only the side of the segment containing the intended recipent and control
congestion.
Routers:
They relay packets among multiple interconnected networks (i.e. LANs of different type). They operate in
the physical,
data link and network layers. They contain software that enable them to determine which of the several
possible paths is the best for a particular transmission.
Gateways:
They relay packets among networks that have different protocols (e.g. between a LAN and a WAN). They
accept a
packet formatted for one protocol and convert it to a packet formatted for another protocol before
forwarding it. They operate in all seven layers of the OSI model.
BUS topology:
In this each computer is directly connected to primary network cable in a single line.
Advantages:
Inexpensive, easy to install, simple to understand, easy to extend.
STAR topology:
In this all computers are connected using a central hub.
Advantages:
Can be inexpensive, easy to install and reconfigure and easy to trouble shoot physical problems.
RING topology:
In this all computers are connected in loop.
Advantages:
All computers have equal access to network media, installation can be simple, and signal does not
degrade as much as
in other topologies because each computer regenerates it.
Q79.The Internet Control Message Protocol occurs at what layer of the seven layer model?
Network
Q81.MIDI and MPEG are examples of what layer of the OSI seven layer model?
Presentation
Q99.Which layer is responsible for identifying and establishing the availability of the intended
communication partner?
Application.
Q100.Which OSI layer provides mechanical, electrical, procedural for activating, maintaining physical
link?
Physical.
7 comments:
1.
Very informative and worthy post. Thanks for the sharing such a precious updates with us.
Reply
2.
3.
URL is not working of dowload and this is only for showing ...
Reply
4.
5.
6.
7.
Home
Followers
Follow by Email
Submit
Related Pages
Before Going To Interview
Network
Database
Citrix
Linux
Unix
Storage
Java
Dot Net
C++
HR
Guest Blog
Rahim Shaikh
Linux
Linux Admin Interview Questions &
Answers.
Answer - Linux is an operating system that uses UNIX like Operating system.......
Q) Q) What is LILO?
Answer - LILO is Linux Loader is a boot loader for Linux. It is used to load Linux into the memory and
start the Operating system.......
Answer - Internal commands are commands that are already loaded in the system. They can be executed
any time and are independent.......
Answer - Static libraries are loaded when the program is compiled and dynamically-linked libraries are
loaded in while......
Q) What is LD_LIBRARY_PATH?
Answer - LD_LIBRARY_PATH is an environment variable. It is used for debugging a new library or a non
standard library.......
Answer - File server is used for file sharing. It enables the processes required fro sharing.......
Answer - NFS is Network File system. It is a file system used for sharing of files over a network.......
Answer - Email can be sent in Linux using the mail command. ......
Q) Explain RPM (Red Hat Package Manager) features.
Answer - RPM is a package managing system (collection of tools to manage software packages).......
Answer - Kernel is used in UNIX like systems and is considered to be the heart of the operating
system.......
Answer - Linux shell is a user interface used for executing the commands. Shell is a program the user......
Answer - A pipe is a chain of processes so that output of one process (stdout) is fed an input (stdin) to
another.......
Answer - Trap command: controls the action to be taken by the shell when a signal is received. ......
Answer - A stateless Linux server is a centralized server in which no state exists on the single
workstations. ......
Answer - Bash is a free shell for UNIX. It is the default shell for most UNIX systems. It has a combination
of the C and Korn shell features. ......
Answer - Network monitoring tools are used to monitor the network, systems present on the network,
traffic etc.......
Answer - Linux file structure is a tree like structure. It starts from the root directory, represented by '/', and
then expands into sub-directories.......
Q) What is a zombie?
Answer - Zombie is a process state when the child dies before the parent process. In this case the
structural information of the process is still in the process table.......
repquota command is used to check the status of the users quota along with the disk space and number
of files used. This command gives a summary of the users quota that how much space and files are left
for the user. Every user has a defined quota in Linux. This is done mainly for the security, as some users
have only limited access to files. This provides a security to the files from unwanted access. The quota
can be given to a single user or to a group of users.
By default the main system log is /var/log/messages. This file contains all the messages and the script
written by the user. By default all scripts are saved in this file. This is the standard system log file, which
contains messages from all system software, non-kernel boot issues, and messages that go to 'dmesg'.
dmesg is a system file that is written upon system boot.
Security is the most important aspect of an operating system. Due to its unique authentication module,
Linux is considered as more secured than other operating systems. Linux consists of PAM. PAM is
Pluggable Authentication Modules. It provides a layer between applications and actual authentication
mechanism. It is a library of loadable modules which are called by the application for authentication. It
also allows the administrator to control when a user can log in. All PAM applications are configured in the
directory "/etc/pam.d" or in a file "/etc/pam.conf". PAM is controlled using the configuration file or the
configuration directory.
Q) Can Linux computer be made a router so that several machines may share a single Internet
connection? How?
Yes a Linux machine can be made a router. This is called "IP Masquerade." IP Masquerade is a
networking function in Linux similar to the one-to-many (1: Many) NAT (Network Address Translation)
servers found in many commercial firewalls and network routers. The IP Masquerade feature allows other
"internal" computers connected to this Linux box (via PPP, Ethernet, etc.) to also reach the Internet as
well. Linux IP Masquerading allows this functionality even if the internal computers do not have IP
addresses.
1. The Linux PC must have an internet connection and a connection to LAN. Typically, the Linux PC has
two network interfaces-an Ethernet card for the LAN and a dial-up PPP connection to the Internet
(through an ISP).
2. All other systems on your LAN use the Linux PC as the default gateway for TCP/IP networking. Use
the same ISP-provided DNS addresses on all systems.
3. Enable IP forwarding in the kernel. By default the IP forwarding is not enabled. To ensure that IP
forwarding is enabled when you reboot your system, place this command in the /etc/rc.d/rc.local file.
4. Run /sbin/iptables-the IP packet filter administration program-to set up the rules that enable the Linux
PC to masquerade for your LAN.
Minimum 2 partitions are needed for installing Linux. The one is / or root which contains all the files and
the other is swap. Linux file system is function specific which means that files and folders are organized
according to their functionality. For example, all executables are in one folder, all devices in another, all
libraries in another and so on. / or root is the base of this file system. All the other folders are under this
one. / can be consider as C: .Swap is a partition that will be used as virtual memory. If there is no more
available RAM a Linux computer will use an area of the hard disk, called swap, to temporarily store data.
In other words it is a way of expanding your computers RAM.
dmesg command is used to review boot messages. This command will display system messages
contained in the kernel ring buffer. We can use this command immediately after booting to see boot
messages. A ring buffer is a buffer of fixed size for which any new data added to it overwrites the oldest
data in it. Its basic syntax is
dmesg [options]
Invoking dmesg without any of its options causes it to write all the kernel messages to standard output.
This usually produces far too many lines to fit into the display screen all at once, and thus only the final
messages are visible. However, the output can be redirected to the less command through the use of a
pipe, thereby allowing the startup messages to be viewed on one screen at a time
dmesg | less
It allows automatic rotation, compression, removal, and mailing of log files. This command is mainly used
for rotating and compressing log files. This job is done every day when a log file becomes too large. This
command can also be run by giving on command line. We can done force rotation by giving f option with
this command in command line. This command is also used for mailing. We can give m option for
mailing with this command. This option takes two arguments one is subject and other is recipient name.
Q) What are the partitions created on the mail server hard drive?
The main partitions are done firstly which are root, swap and boot partition. But for the mail server three
different partitions are also done which are as follows:
1. /var/spool- This is done so that if something goes wrong with the mail server or spool than the output
cannot overrun the file system.
2. /tmp- putting this on its own partition prevents any user item or software from overrunning the system
files.
3. /home- putting this on its own is useful for system upgrades or reinstalls. It allow not to wipe off the
/home hierarchy along with other areas.
1. Username: It is used when user logs in. It should be between 1 and 32 characters in length.
3. User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for root and UIDs
1-99 are reserved for other predefined accounts. Further UID 100-999 are reserved by system for
administrative and system accounts/groups.
5. User ID Info: The comment field. It allow you to add extra information about the users such as user's
full name, phone number etc. This field use by finger command.
6. Home directory: The absolute path to the directory the user will be in when they log in. If this directory
does not exists then users directory becomes /
7. Command/shell: The absolute path of a command or shell (/bin/bash). Typically, this is a shell.
Which commands are used to set a processor-intensive job to use less CPU time?
Range of priority goes from -20 (highest priority) to 19 (lowest).Priority is given to a job so that the most
important job is executed first by the kernel and then the other least important jobs. This takes less CPU
times as the jobs are scheduled and are given priorities so the CPU executes fast. The priority is given by
numbers like -20 describe the highest priority and 19 describe the least priority.
/.xinitrc file allows changing the window manager we want to use when logging into X from that account.
The dot in the file name shows you that the file is a hidden file and doesn't show when you do a normal
directory listing. For setting a window manager we have to save a command in this file. The syntax of
command is: exec windowmanager.After this, save the file. Next time when you run a startx a new
window manager will open and become default. The commands for starting some popular window
managers and desktop environments are:
-KDE = startkde
-Gnome = gnome-session
-Blackbox = blackbox
-FVWM = fvwm
-IceWM = icewm
When a new application is installed its documentation is also installed. This documentation is stored
under the directory named for application. For example if my application name is App1 then the path of
the documentation will be /user/doc/App1. It contains all the information about the application. It contains
date of creating application, name of application and other important module of the application. We can
get the basic information of application from the documentation.
pwconv command is used for giving shadow passwords. Shadow passwords are given for better system
security. The pwconv command creates the file /etc/shadow and changes all passwords to x in the
/etc/passwd file. First, entries in the shadowed file which don't exist in the main file are removed. Then,
shadowed entries which don't have `x' as the password in the main file are updated. Any missing
shadowed entries are added. Finally, passwords in the main file are replaced with `x'. These programs
can be used for initial conversion as well to update the shadowed file if the main file is edited by hand.
useradd command is used for creating a new user account. When invoked without the
-D option, the useradd command creates a new user account using the values specified on the command
line and the default values from the system. The new user account will be entered into the system files as
needed, and initial files copied, depending on the command line options. This command uses the system
default as home directory. If m option is given then the home directory is made.
POP3 mail only account is assigned to the /bin/false shell. However, assigning bash shell to a POP3 mail
only gives user login access, which is avoided. /bin/nologin can also be used. This shell is provided to the
user when we dont want to give shell access to the user. The user cannot access the shell and it reject
shell login on the server like on telnet. It is mainly for the security of the shells. POP3 is basically used for
downloading mail to mail program. So for illegal downloading of emails on the shell this account is
assigned to the /bin/false shell or /bin/nologin. These both shells are same they both do the same work of
rejecting the user login to the shell. The main difference between these two shells is that false shell
shows the incorrect code and any unusual coding when user login with it. But the nologin shell simply tells
that no such account is available. So nologin shell is used mostly in Linux.
syslogd is responsible for tracking system information and save it to the desired log files. It provides two
system utilities which provide system logging and kernel message trapping. Internet and UNIX domain
sockets support enable this utility package to support both local and remote logging. Every logged
message contains at least a time and a hostname field, normally a program name field, too. So to track
these information this daemon is used. syslogd mainly reacts to the set of signals given by the user.
These are the signals given to syslogd: SIGHUP: This lets syslogd perform a re-initialization. All open files
are closed, the configuration file (default is /etc/syslog.conf) will be reread and the syslog facility is started
again. SIGTERM: The syslogd will die. SIGINT, SIGQUIT: If debugging is enabled these are ignored,
otherwise syslogd will die. SIGUSR1: Switch debugging on/off. This option can only be used if syslogd is
started with the - d debug option. SIGCHLD: Wait for Childs if some were born, because of waiting
messages.
The crontab command is used for scheduling of the commands to run at a later time. SYNTAX
Options
-e Edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables.
When user exits from the editor, the modified crontab will be installed automatically. Each user can have
their own crontab, and though these are files in /var, they are not intended to be edited directly. If the u
option is given than the crontab gives the name of the user whose crontab is to be tweaked. If it is given
without this then it will display the crontab of the user who is executing the command.
Q) How environment variable is set so that the file permission can be automatically set to the newly
created files?
umask command is used to set file permission on newly created files automatically.
Syntax
It is represented in octal numbers. We can simply use this command without arguments to see the current
file permissions. To change the permissions, mode is given in the arguments. The default umask used for
normal user is 0002. The default umask for the root user is 0022. For calculating the original values, the
values shown by the umask must be subtracted by the default values. It is mainly used for masking of the
file and directory permission. The /etc/profile script is where the umask command is usually set for all
users. The S option can be used to see the current default permissions displayed in the alpha symbolic
format.
For example, umask 022 ensures that new files will have at most 755 permissions (777 NAND 022).
The permissions can be calculated by taking the NAND of original value with the default values of files
and directories.
Update V1.1.
1.When do you need a virtual hosting ?
The term Virtual Host refers to the practice of maintaining more than one server on one machine, as
differentiated by their apparent hostname. For example, it is often desirable for companies sharing a web
server to have their own domains, with web servers accessible
as www.company1.com and www.company2.com, without requiring the user to know any extra path
information.
23
3.How to get the listening ports which is greater than 6000 using netstat ?
Open relays are e-mail servers that are configured to accept and transfer e-mail on behalf of any user
anywhere, including unrelated third parties.
The qmail-smtpd daemon will consult the rcpthosts control file to determine valid destination addresses,
and reject anything else.
6.Advantages of Qmail ?
More secure, better designed, modular, faster, more reliable, easier to configure, don't have to upgrade it
every few months or worry about being vulnerable to something due to some obscure feature being
enabled
qmail supports host and user masquerading, full host hiding, virtual domains, null clients, list-owner
rewriting, relay control, double-bounce recording, arbitrary RFC 822 address lists, cross-host mailing list
loop detection, per-recipient checkpointing, downed host backoffs, independent message retry schedules,
etc. qmail also includes a drop-in ``sendmail'' wrapper so that it will be used transparently by your
current UAs.
The Difference
POP3 works by reviewing the inbox on the mail server, and downloading the new messages to your
computer. IMAP downloads the headers of the new messages on the server, then retrieves the message
you want to read when you click on it.
When using POP3, your mail is stored on your PC. When using IMAP, the mail is stored on the mail
server. Unless you copy a message to a "Local Folder" the messages are never copied to your PC.
Scenarios of Use
POP3
IMAP
*.Check with the trouble ticketing system for any unread ticket.
Top, uptime
Copy the contents eth0 to eth1, and change the ipaddress. Restart the network. .
14.Transparently redirect web connections from outside to the DMZ web server.
echo 1 >/proc/sys/net/ipv4/ip_forward
echo 1 > $f
done.
$iptables -A LDROP --proto tcp -j LOG --log-level info \ --log-prefix TCP Drop
Home
Followers
Follow by Email
Submit
Related Pages
Before Going To Interview
Network
Database
Citrix
Linux
Unix
Storage
Java
Dot Net
C++
HR
Guest Blog
Rahim Shaikh
Before you go to the interview, consider your long term career goals and your personal attributes.
Be sure that they are not in conflict with the job on offer or with what your are asked to do.
You have to make a strengths and weakness analysis for yourself, before you go to the interview.
Remember, you want to show your strengths in the best light and the better you know yourself, the
better you will perform in an interview.
Be honest about your own capabilities, for example, dont position yourself as a team player if you
are a loner, (see some comments and questions you should ask yourself below) it may get you the job, in
the short term. But in the long term, you will be unhappy and you will be looking for another job soon!
When it comes to times in life when we are put under a lot of stress, not much can prepare to the days
leading up to an interview for job you really want. If you are preparing for an interview and you are
losing sleep and feeling unsure of yourself, there is no need to read too much into these
problems.
As a matter of fact, it is perfectly normal to become anxious and insecure prior to an important
interview. Instead of worrying, you should be concentrating on preparing. Now, many people
become bemused at this point in the process. They cant possibly know which questions will be asked,
and in many cases, they cant even know who will be conducting the interview. Be that as it may, there
are some helpful tips that almost anyone can use for attending interviews.
Dress for success: You probably know that first impressions are important. Its hard to overstate how
important they actually are. The truth of the matter is that you should walk into that interview dressed as a
person who already has the job. Dress like a professional who is used to occupying high profile positions.
Research a company prior to the interview: When you are attending interviews, you should always
know what kind of job you are applying for. Of course you probably have some idea as to what the duties
and tasks of a job post might be, but also make sure that you know about a companys history and
priorities. This will make you seem more engaged and more serious about the job.
When you are attending interviews, you should always be ready to talk about strengths and weaknesses.
The most common interview questions often relate to these topics. Remember that your weaknesses
should also say something good about your performance, such as that you work too hard or become too
involved in projects.
Find ways to relieve stress and you should do so calmly. Sure, this is easier said than done, but
there are a few ways to make sure you keep stress levels down to a minimum. Make sure you get plenty
of sleep prior to an interview.
Eat well.
Make sure you have time to exercise as this can make you feel more confident.
Act as if you have already gotten the job: This is a tough one because it is easy to overdo and you want
to be confident. You want to show your interviewer that you are the right person for the job, but you
dont want to come off as being too cocky. This can work against you.
Instead, behave as if you are already a member of the team. This will help your interviewers to
visualize you working with his or her colleagues and can influence your interviewers final decision
Ans. Brief 1 line about your family this depends on what kind of interview you are going through]
and lastly why are you the best suited person for this job. Tell about your achievements but never
sound too proud of your achievements, highlight yourself but with decency. Remember the
golden rule
This question is to judge how you present yourself, are you the person who talks too much, are you
arrogant or are you the one who just do what others say and thus never realized your strengths.
The answer to this question should be linked with facts and figures if possible. If you had any
previous achievements say you lead a team which did wonderful and thus you are a team leader
and all. Highlight yourself, tell your strengths but be sure it is well supported and you just dont
start sayings just to impress. Remember the HR person will grill you if he even finds an iota of
doubt in what you are saying. Some points on which you could support your answer could be
honesty, leadership, tech savvy, confident, good communication skills, positive attitude,
motivational and inspirational leader etc.
So just prepare yourself for this question, make a mental note of all your achievements.
Now this is the question which could either end your interview or could just get you the job. Dont mince
with words, at the same time just dont be too blunt. Tell your weakness but also tell what you are doing to
overcome it. Never say I cannot do this. Instead say, I have never done this but I am eager to learn and
am sure if our company needs it I will do it.
Note Never say your company or what would be my position in your company, use our
company. Some HR people might ask you why you are saying our before selection then do say
its because I am confident that I am the best person for this vacancy.
Question 4: Tell me about something you did or failed to do that you now feel a little ashamed of.
This question is just to see how you react to embarrassing situations. Of course you just cannot
say SKIP THIS PLEASE. So better prepare yourself. Take your time to reply to this one; at first
say I am really finding it very hard to find any such situation as I believe the best way to avoid
shame is never do such things.
Most of the interviewers just will proceed to another question but if he or she insists to elaborate then give
any appropriate reply but be sure it should not sound that you are so regretful that it still has a mental
impact on you. Remember
Question 5: Why are you leaving (or did you leave) this position?
By asking this question, the interviewer just wishes to see how much respect you give to your
management, colleagues etc. So never say What Things You Should Know About A Company Before An
Interview.
If you are in the process of attending numerous job interviews in the hopes that you are going to embark
on the career of your dreams (or at least be able to pay the bills for awhile until something better comes
along), you are probably overwhelmed with all that you are in the middle of. After all, job interviews
require you to revamp your resume, reconnect with the people that you are going to be using as
references, write cover letters and maybe even update your wardrobe. After all, your overall goal at all
job interviews is to make a good enough impression to get the job and making that impression
takes some work.
What makes the difference between those who get the callbacks and those who don't? There are a lot of
factors which go into how well you are perceived at your job interviews but one of the main ones that is
often overlooked by job applicants is their knowledge of the company. Many applicants believe that their
only job is to inform the company's hiring managers about themselves and why they are worthy of being
hired. It's true that this is a big part of a job interview, but it's not the only part of it. The other side of the
coin is that applicants need to have done their research into a company so that they can explain why
they're a good match for the company, what they can contribute to the company's goals and where they
see themselves going with the company in the future.
Don't be left tongue-tied when you get to the part of the job interview when the hiring manager looks at
you and says, "so, what do you want to know about us?" Take the bull by the horns, show what
you've already learned about the company and follow that up with some thoughtful, engaging
questions about the company. This will demonstrate your genuine (or at least well-faked) interest
in the company and could make the difference in whether or not you get the jobs that you're
applying for at all of these interviews.
Hi Rahim, this is a really a very good document, I will always read this before going to interview.
Thanks
Reply
2.
this is very useful for attending an interview....I think this will help me a lot...
Reply
3.
4.
Avoid surprises interviews need preparation. Some questions come up time and time again
usually about you, your experience and the job itself. We've gathered together the most common
questions so you can get your preparation off to a flying start.
You also find all interview questions at link at the end of this post.
Best rgs
Reply
Home
Free Training Video
Followers
Follow by Email
Submit
Related Pages
Before Going To Interview
Network
Database
Citrix
Linux
Unix
Storage
Java
Dot Net
C++
HR
Guest Blog
Rahim Shaikh
Database
Database Admin Interview Questions &
Answers.
Questions are categorized under the following sections, for your convenience:
Check out the article Q100139 from Microsoft knowledge base and of course, theres much more
information available in the net. Itll be a good idea to get a hold of any RDBMS fundamentals
text book, especially the one by C. J. Date. Most of the times, it will be okay if you can explain
till third normal form.
Q2. What is denormalization and when would you go for it?
As the name indicates, denormalization is the reverse process of normalization. Its the controlled
introduction of redundancy in to the database design. It helps improve the query performance as
the number of joins could be reduced.
Q3. How do you implement one-to-one, one-to-many and many-to-many relationships while
designing tables?
One-to-One relationship can be implemented as a single table and rarely as two tables with
primary and foreign key relationships. One-to-Many relationships are implemented by splitting
the data into two tables with primary key and foreign key relationships. Many-to-Many
relationships are implemented using a junction table with the keys from both the tables forming
the composite primary key of the junction table. It will be a good idea to read up a database
designing fundamentals text book.
Q4. Whats the difference between a primary key and a unique key?
Both primary key and unique enforce uniqueness of the column on which they are defined. But by
default primary key creates a clustered index on the column, where are unique creates a
nonclustered index by default. Another major difference is that, primary key doesnt allow
NULLs, but unique key allows one NULL only.
Q5. What are user defined datatypes and when you should go for them?
User defined datatypes let you extend the base SQL Server datatypes by providing a descriptive
name, and format to the database. Take for example, in your database, there is a column called
Flight_Num which appears in many tables. In all these tables it should be varchar(8). In this
case you could create a user defined datatype called Flight_num_type of varchar(8) and use it
across all your tables. See sp_addtype, sp_droptype in books online.
Q6. What is bit datatype and whats the information that can be stored inside a bit column?
Bit datatype is used to store boolean information like 1 or 0 (true or false). Untill SQL Server 6.5
bit datatype could hold either a 1 or 0 and there was no support for NULL. But from SQL Server
7.0 onwards, bit datatype can represent a third state, which is NULL.
A candidate key is one that can identify each row of a table uniquely. Generally a candidate key
becomes the primary key of the table. If the table has more than one candidate key, one of them
will become the primary key, and the rest are called alternate keys. A key formed by combining
at least two or more columns is called composite key.
Q8. What are defaults? Is there a column to which a default cant be bound?
A default is a value that will be used by a column, if no value is supplied to that column while
inserting data. IDENTITY columns and timestamp columns cant have defaults bound to them.
See CREATE DEFAULT in books online.
A transaction is a logical unit of work in which, all the steps must be performed or none. ACID
stands for Atomicity, Consistency, Isolation, Durability. These are the properties of a
transaction. For more information and explanation of these properties, see SQL Server books
online or any RDBMS fundamentals text book. Explain different isolation levels An isolation level
determines the degree of isolation of data between concurrent transactions. The default SQL
Server isolation level is Read Committed. Here are the other isolation levels (in the ascending
order of isolation): Read Uncommitted, Read Committed, Repeatable Read, Serializable. See
SQL Server books online for an explanation of the isolation levels. Be sure to read about SET
TRANSACTION ISOLATION LEVEL, which lets you customize the isolation level at the
connection level. Read Committed - A transaction operating at the Read Committed level
cannot see changes made by other transactions until those transactions are committed. At this
level of isolation, dirty reads are not possible but nonrepeatable reads and phantoms are
possible. Read Uncommitted - A transaction operating at the Read Uncommitted level can see
uncommitted changes made by other transactions. At this level of isolation, dirty reads,
nonrepeatable reads, and phantoms are all possible. Repeatable Read - A transaction operating
at the Repeatable Read level is guaranteed not to see any changes made by other transactions
in values it has already read. At this level of isolation, dirty reads and nonrepeatable reads are
not possible but phantoms are possible. Serializable - A transaction operating at the Serializable
level guarantees that all concurrent transactions interact only in ways that produce the same
effect as if each transaction were entirely executed one after the other. At this isolation level,
dirty reads, nonrepeatable reads, and phantoms are not possible.
Q10. CREATE INDEX myIndex ON myTable(myColumn)What type of Index will get created
after executing the above statement?
Non-clustered index. Important thing to note: By default a clustered index gets created on the
primary key, unless specified otherwise.
8060 bytes. Dont be surprised with questions like what is the maximum number of columns per
table. 1024 columns per table. Check out SQL Server books online for the page titled:
"Maximum Capacity Specifications". Explain Active/Active and Active/Passive cluster
configurations Hopefully you have experience setting up cluster servers. But if you dont, at least
be familiar with the way clustering works and the two clusterning configurations Active/Active
and Active/Passive. SQL Server books online has enough information on this topic and there is
a good white paper available on Microsoft site. Explain the architecture of SQL Server This is a
very important question and you better be able to answer it if consider yourself a DBA. SQL
Server books online is the best place to read about SQL Server architecture. Read up the
chapter dedicated to SQL Server Architecture.
Lock escalation is the process of converting a lot of low level locks (like row locks, page locks)
into higher level locks (like table locks). Every lock is a memory structure too many locks would
mean, more memory being occupied by locks. To prevent this from happening, SQL Server
escalates the many fine-grain locks to fewer coarse-grain locks. Lock escalation threshold was
definable in SQL Server 6.5, but from SQL Server 7.0 onwards its dynamically managed by
SQL Server.
Q13. Whats the difference between DELETE TABLE and TRUNCATE TABLE commands?
DELETE TABLE is a logged operation, so the deletion of each row gets logged in the transaction
log, which makes it slow. TRUNCATE TABLE also deletes all the rows in a table, but it wont log
the deletion of each row, instead it logs the deallocation of the data pages of the table, which
makes it faster. Of course, TRUNCATE TABLE can be rolled back. TRUNCATE TABLE is
functionally identical to DELETE statement with no WHERE clause: both remove all rows in the
table. But TRUNCATE TABLE is faster and uses fewer system and transaction log resources
than DELETE. The DELETE statement removes rows one at a time and records an entry in the
transaction log for each deleted row. TRUNCATE TABLE removes the data by deallocating the
data pages used to store the tables data, and only the page deallocations are recorded in the
transaction log. TRUNCATE TABLE removes all rows from a table, but the table structure and
its columns, constraints, indexes and so on remain. The counter used by an identity for new
rows is reset to the seed for the column. If you want to retain the identity counter, use DELETE
instead. If you want to remove table definition and its data, use the DROP TABLE statement.
You cannot use TRUNCATE TABLE on a table referenced by a FOREIGN KEY constraint;
instead, use DELETE statement without a WHERE clause. Because TRUNCATE TABLE is not
logged, it cannot activate a trigger. TRUNCATE TABLE may not be used on tables participating
in an indexed view
Check out MOLAP, ROLAP and HOLAP in SQL Server books online for more infomation.
Q15. What are the new features introduced in SQL Server 2000 (or the latest release of SQL
Server at the time of your interview)? What changed between the previous version of SQL
Server and the current version?
This question is generally asked to see how current is your knowledge. Generally there is a
section in the beginning of the books online titled "Whats New", which has all such information.
Of course, reading just that is not enough, you should have tried those things to better answer
the questions. Also check out the section titled "Backward Compatibility" in books online which
talks about the changes that have taken place in the new version.
Constraints enable the RDBMS enforce the integrity of the database automatically, without
needing you to create triggers, rule or defaults. Types of constraints: NOT NULL, CHECK,
UNIQUE, PRIMARY KEY, FOREIGN KEY. For an explanation of these constraints see books
online for the pages titled: "Constraints" and "CREATE TABLE", "ALTER TABLE"
Q17. What is an index? What are the types of indexes? How many clustered indexes can be
created on a table? I create a separate index on each column of a table. What are the
advantages and disadvantages of this approach?
Indexes in SQL Server are similar to the indexes in books. They help SQL Server retrieve the
data quicker. Indexes are of two types. Clustered indexes and non-clustered indexes. When you
create a clustered index on a table, all the rows in the table are stored in the order of the
clustered index key. So, there can be only one clustered index per table. Non-clustered indexes
have their own storage separate from the table data storage. Non-clustered indexes are stored
as B-tree structures (so do clustered indexes), with the leaf level nodes having the index key
and its row locater. The row located could be the RID or the Clustered index key, depending up
on the absence or presence of clustered index on the table. If you create an index on each
column of a table, it improves the query performance, as the query optimizer can choose from
all the existing indexes to come up with an efficient execution plan. At the same t ime, data
modification operations (such as INSERT, UPDATE, DELETE) will become slow, as every time
data changes in the table, all the indexes need to be updated. Another disadvantage is that,
indexes need disk space, the more indexes you have, more disk space is used.
Q18. What is RAID and what are different types of RAID configurations?
RAID stands for Redundant Array of Inexpensive Disks, used to provide fault tolerance to
database servers. There are six RAID levels 0 through 5 offering different levels of performance,
fault tolerance. MSDN has some information about RAID levels and for detailed information,
check out the RAID advisory boards homepage
Q19. What are the steps you will take to improve performance of a poor performing query?
This is a very open ended question and there could be a lot of reasons behind the poor
performance of a query. But some general issues that you could talk about would be: No
indexes, table scans, missing or out of date statistics, blocking, excess recompilations of stored
procedures, procedures and triggers without SET NOCOUNT ON, poorly written query with
unnecessarily complicated joins, too much normalization, excess usage of cursors and
temporary tables. Some of the tools/ways that help you troubleshooting performance problems
are: SET SHOWPLAN_ALL ON, SET SHOWPLAN_TEXT ON, SET STATISTICS IO ON, SQL
Server Profiler, Windows NT /2000 Performance monitor, Graphical execution plan in Query
Analyzer. Download the white paper on performance tuning SQL Server from Microsoft web
site. Dont forget to check out sql-server-performance.com
Q20. What are the steps you will take, if you are tasked with securing an SQL Server?
Again this is another open ended question. Here are some things you could talk about: Preferring
NT authentication, using server, databse and application roles to control access to the data,
securing the physical database files using NTFS permissions, using an unguessable SA
password, restricting physical access to the SQL Server, renaming the Administrator account on
the SQL Server computer, disabling the Guest account, enabling auditing, using multiprotocol
encryption, setting up SSL, setting up firewalls, isolating SQL Server from the web server etc.
Read the white paper on SQL Server security from Microsoft website. Also check out My SQL
Server security best practices
Q21. What is a deadlock and what is a live lock? How will you go about resolving deadlocks?
Deadlock is a situation when two processes, each having a lock on one piece of data, attempt to
acquire a lock on the others piece. Each process would wait indefinitely for the other to release
the lock, unless one of the user processes is terminated. SQL Server detects deadlocks and
terminates one users process. A livelock is one, where a request for an exclusive lock is
repeatedly denied because a series of overlapping shared locks keeps interfering. SQL Server
detects the situation after four denials and refuses further shared locks. A livelock also occurs
when read transactions monopolize a table or page, forcing a write transaction to wait
indefinitely. Check out SET DEADLOCK_PRIORITY and "Minimizing Deadlocks" in SQL Server
books online. Also check out the article Q169960 from Microsoft knowledge base.
Blocking happens when one connection from an application holds a lock and a second
connection requires a conflicting lock type. This forces the second connection to wait, blocked
on the first. Read up the following topics in SQL Server books online: Understanding and
avoiding blocking, Coding efficient transactions. Explain CREATE DATABASE syntax Many of
us are used to creating databases from the Enterprise Manager or by just issuing the command:
CREATE DATABAE MyDB.
Q23. But what if you have to create a database with two filegroups, one on drive C and the other
on drive D with log on drive E with an initial size of 600 MB and with a growth factor of 15%?
Thats why being a DBA you should be familiar with the CREATE DATABASE syntax. Check out
SQL Server books online for more information.
Q24. How to restart SQL Server in single user mode? How to start SQL Server in minimal
configuration mode?
SQL Server can be started from command line, using the SQLSERVR.EXE. This EXE has some
very important parameters with which a DBA should be familiar with. -m is used for starting SQL
Server in single user mode and -f is used to start the SQL Server in minimal configuration mode.
Check out SQL Server books online for more parameters and their explanations.
Q25. As a part of your job, what are the DBCC commands that you commonly use for database
maintenance?
Q26. What are statistics, under what circumstances they go out of date, how do you update
them?
Statistics determine the selectivity of the indexes. If an indexed column has unique values then
the selectivity of that index is more, as opposed to an index with non-unique values. Query
optimizer uses these indexes in determining whether to choose an index or not while executing
a query. Some situations under which you should update statistics: 1) If there is significant
change in the key values in the index 2) If a large amount of data in an indexed column has
been added, changed, or removed (that is, if the distribution of key values has changed), or the
table has been truncated using the TRUNCATE TABLE statement and then repopulated 3)
Database is upgraded from a previous version. Look up SQL Server books online for the
following commands: UPDATE STATISTICS, STATS_DATE, DBCC SHOW_STATISTICS,
CREATE STATISTICS, DROP STATISTICS, sp_autostats, sp_createstats, sp_updatestats
Q27. What are the different ways of moving data/databases between servers and databases in
SQL Server?
There are lots of options available, you have to choose your option depending upon your
requirements. Some of the options you have are: BACKUP/RESTORE, dettaching and
attaching databases, replication, DTS, BCP, logshipping, INSERTSELECT, SELECTINTO,
creating INSERT scripts to generate data.
Q28. Explain different types of BACKUPs avaialabe in SQL Server? Given a particular scenario,
how would you go about choosing a backup plan?
Types of backups you can create in SQL Sever 7.0+ are Full database backup, differential
database backup, transaction log backup, filegroup backup. Check out the BACKUP and
RESTORE commands in SQL Server books online. Be prepared to write the commands in your
interview. Books online also has information on detailed backup/restore architecture and when
one should go for a particular kind of backup.
Q29. What is database replication? What are the different types of replication you can set up in
SQL Server?
Replication is the process of copying/moving data between databases on the same or different
servers. SQL Server supports the following types of replication scenarios: Snapshot
replication Transactional replication (with immediate updating subscribers, with queued
updating subscribers) Merge replication See SQL Server books online for indepth coverage
on replication. Be prepared to explain how different replication agents function, what are the
main system tables used in replication etc.
Q30. How to determine the service pack currently installed on SQL Server?
The global variable @@Version stores the build number of the sqlservr.exe, which is used to
determine the service pack installed. To know more about this process visit SQL Server service
packs and versions.
Q31. What are cursors? Explain different types of cursors. What are the disadvantages of
cursors? How can you avoid cursors?
Cursors allow row-by-row processing of the resultsets. Types of cursors: Static, Dynamic,
Forward-only, Keyset-driven. See books online for more information. Disadvantages of cursors:
Each time you fetch a row from the cursor, it results in a network roundtrip, where as a normal
SELECT query makes only one roundtrip, however large the resultset is. Cursors are also costly
because they require more resources and temporary storage (results in more IO operations).
Further, there are restrictions on the SELECT statements that can be used with some types of
cursors. Most of the times, set based operations can be used instead of cursors. Here is an
example: If you have to give a flat hike to your employees using the following criteria: Salary
between 30000 and 40000 5000 hike Salary between 40000 and 55000 7000 hike Salary
between 55000 and 65000 9000 hike. In this situation many developers tend to use a cursor,
determine each employees salary and update his salary according to the above formula. But
the same can be achieved by multiple update statements or can be combined in a single
UPDATE statement as shown below:
UPDATE tbl_emp SET salary = CASE WHEN salary BETWEEN 30000 AND 40000 THEN salary
+ 5000 WHEN salary BETWEEN 40000 AND 55000 THEN salary + 7000 WHEN salary
BETWEEN 55000 AND 65000 THEN salary + 10000 END
Another situation in which developers tend to use cursors: You need to call a stored procedure
when a column in a particular row meets certain condition. You dont have to use cursors for
this. This can be achieved using WHILE loop, as long as there is a unique key to identify each
row. For examples of using WHILE loop for row by row processing, check out the My code
library section of my site or search for WHILE. Write down the general syntax for a SELECT
statements covering all the options. Heres the basic syntax: (Also checkout SELECT in books
online for advanced syntax).
Joins are used in queries to explain how different tables are related. Joins also let you select data
from a table depending upon data from another table. Types of joins: INNER JOINs, OUTER
JOINs, CROSS JOINs. OUTER JOINs are further classified as LEFT OUTER JOINS, RIGHT
OUTER JOINS and FULL OUTER JOINS. For more information see pages from books online
titled: "Join Fundamentals" and "Using Joins".
Yes, very much. Check out BEGIN TRAN, COMMIT, ROLLBACK, SAVE TRAN and
@@TRANCOUNT
Q34. What is an extended stored procedure? Can you instantiate a COM object by using T-
SQL?
An extended stored procedure is a function within a DLL (written in a programming language like
C, C++ using Open Data Services (ODS) API) that can be called from T-SQL, just the way we
call normal stored procedures using the EXEC statement. See books online to learn how to
create extended stored procedures and how to add them to SQL Server. Yes, you can
instantiate a COM (written in languages like VB, VC++) object from T-SQL by using
sp_OACreate stored procedure. Also see books online for sp_OAMethod, sp_OAGetProperty,
sp_OASetProperty, sp_OADestroy. For an example of creating a COM object in VB and calling
it from T-SQL, see My code library section of this site.
Q35. What is the system function to get the current users user id?
USER_ID(). Also check out other system functions like USER_NAME(), SYSTEM_USER,
SESSION_USER, CURRENT_USER, USER, SUSER_SID(), HOST_NAME().
Q36. What are triggers? How many triggers you can have on a table? How to invoke a trigger on
demand?
Triggers are special kind of stored procedures that get executed automatically when an INSERT,
UPDATE or DELETE operation takes place on a table. In SQL Server 6.5 you could define only
3 triggers per table, one for INSERT, one for UPDATE and one for DELETE. From SQL Server
7.0 onwards, this restriction is gone, and you could create multiple triggers per each action. But
in 7.0 theres no way to control the order in which the triggers fire. In SQL Server 2000 you
could specify which trigger fires first or fires last using sp_settriggerorder. Triggers cant be
invoked on demand. They get triggered only when an associated action (INSERT, UPDATE,
DELETE) happens on the table on which they are defined. Triggers are generally used to
implement business rules, auditing. Triggers can also be used to extend the referential integrity
checks, but wherever possible, use constraints for this purpose, instead of triggers, as
constraints are much faster. Till SQL Server 7.0, triggers fire only after the data modification
operation happens. So in a way, they are called post triggers. But in SQL Server 2000 you could
create pre triggers also. Search SQL Server 2000 books online for INSTEAD OF triggers. Also
check out books online for inserted table, deleted table and COLUMNS_UPDATED()
Q37. There is a trigger defined for INSERT operations on a table, in an OLTP system. The
trigger is written to instantiate a COM object and pass the newly insterted rows to it for some
custom processing. What do you think of this implementation? Can this be implemented better?
Instantiating COM objects is a time consuming process and since you are doing it from within a
trigger, it slows down the data insertion process. Same is the case with sending emails from
triggers. This scenario can be better implemented by logging all the necessary data into a
separate table, and have a job which periodically checks this table and does the needful.
Self join is just like any other join, except that two instances of the same table will be joined in the
query. Here is an example: Employees table which contains rows for normal employees as well
as managers. So, to find out the managers of all the employees, you need a self join.
INSERT emp SELECT 1,2,Vyas INSERT emp SELECT 2,3,Mohan INSERT emp SELECT
3,NULL,Shobha INSERT emp SELECT 4,2,Shridhar INSERT emp SELECT 5,2,Sourabh
SELECT t1.empname [Employee], t2.empname [Manager] FROM emp t1, emp t2 WHERE
t1.mgrid = t2.empid Heres an advanced query using a LEFT OUTER JOIN that even returns
the employees without managers (super bosses)
SELECT t1.empname [Employee], COALESCE(t2.empname, No manager) [Manager] FROM
emp t1 LEFT OUTER JOIN emp t2 ON t1.mgrid = t2.empid
The Delete command will log the data changes in the log file where as the truncate will simply
remove the data without it. Hence Data removed by Delete command can be rolled back but not
the data removed by TRUNCATE. Truncate is a DDL statement whereas DELETE is a DML
statement.
Q) What is the maximum buffer size that can be specified using the DBMS_OUTPUT.ENABLE
function?
A) 1000000
Q)What is an UTL_FILE? What are different procedures and functions associated with it?
A)The UTL_FILE package lets your PL/SQL programs read and write operating system (OS) text
files. It provides a restricted version of standard OS stream file input/output (I/O).
Subprogram -Description
FOPEN function-Opens a file for input or output with the default line size.
PUT procedure-Writes a line to a file. This does not append a line terminator.
PUT_LINE procedure -Writes a line to a file. This appends an OS-specific line terminator.
FOPEN function -Opens a file with the maximum line size specified.
A) Database triggers are fired whenever any database action like INSERT, UPATE, DELETE,
LOGON LOGOFF etc occurs. Form triggers on the other hand are fired in response to any
event that takes place while working with the forms, say like navigating from one field to another
or one block to another and so on.
A) OCI is Oracle Call Interface. When applications developers demand the most powerful interface
to the Oracle Database Server, they call upon the Oracle Call Interface (OCI). OCI provides the
most comprehensive access to all of the Oracle Database functionality. The newest
performance, scalability, and security features appear first in the OCI API. If you write
applications for the Oracle Database, you likely already depend on OCI. Some types of
applications that depend upon OCI are:
Pro*C applications
Distributed SQL
A) A precompiler is a tool that allows programmers to embed SQL statements in high-level source
programs like C, C++, COBOL, etc. The precompiler accepts the source program as input,
translates the embedded SQL statements into standard Oracle runtime library calls, and
generates a modified source program that one can compile, link, and execute in the usual way.
Examples are the Pro*C Precompiler for C, Pro*Cobol for Cobol, SQLJ for Java etc.
Q) What is syntax for dropping a procedure and a function? Are these operations possible?
A) Drop Procedure/Function ; yes, if they are standalone procedures or functions. If they are a part
of a package then one have to remove it from the package definition and body and recompile
the package.
A) Yes. In such case you dont need to specify any value and the actual parameter will take
the default value provided in the function definition.
A) The formal parameters are the names that are declared in the parameter list of the header of a
module. The actual parameters are the values or expressions placed in the parameter list of the
actual call to the module.
A) There are three different modes of parameters: IN, OUT, and IN OUT.
IN - The IN parameter allows you to pass values in to the module, but will not pass anything out of
the module and back to the calling PL/SQL block. In other words, for the purposes of the
program, its IN parameters function like constants. Just like constants, the value of the formal IN
parameter cannot be changed within the program. You cannot assign values to the IN
parameter or in any other way modify its value.
IN is the default mode for parameters. IN parameters can be given default values in the program
header.
OUT - An OUT parameter is the opposite of the IN parameter. Use the OUT parameter to pass a
value back from the program to the calling PL/SQL block. An OUT parameter is like the return
value for a function, but it appears in the parameter list and you can, of course, have as many
OUT parameters as you like.
Inside the program, an OUT parameter acts like a variable that has not been initialised. In fact, the
OUT parameter has no value at all until the program terminates successfully (without raising an
exception, that is). During the execution of the program, any assignments to an OUT parameter
are actually made to an internal copy of the OUT parameter. When the program terminates
successfully and returns control to the calling block, the value in that local copy is then
transferred to the actual OUT parameter. That value is then available in the calling PL/SQL
block.
IN OUT - With an IN OUT parameter, you can pass values into the program and return a value back
to the calling program (either the original, unchanged value or a new value set within the
program). The IN OUT parameter shares two restrictions with the OUT parameter:
A) A function always returns a value, while a procedure does not. When you call a function you
must always assign its value to a variable.
Q) Can cursor variables be stored in PL/SQL tables. If yes how. If not why?
A) Yes. Create a cursor type - REF CURSOR and declare a cursor variable of that type.
DECLARE
company_rec company%ROWTYPE;
BEGIN
CLOSE company_curvar;
END;
A) Pass a cursor variable as an argument to a procedure or function. You can, in essence, share
the results of a cursor by passing the reference to that result set.
A) Using OPEN cursor_name and CLOSE cursor_name commands. The cursor must be opened
before using it in order to fetch the result set of the query it is associated with. The cursor needs
to be closed so as to release resources earlier than end of transaction, or to free up the cursor
variable to be opened again.
Q) What should be the return type for a cursor variable. Can we use a scalar data type as return
type?
A) The Where Current Of statement allows you to update or delete the record that was last fetched
by the cursor.
A) NO DATA FOUND is an exception which is raised when either an implicit query returns no data,
or you attempt to reference a row in the PL/SQL table which is not yet defined.
SQL%NOTFOUND, is a BOOLEAN attribute indicating whether the recent SQL statement does
not match to any row.
A) A cursor FOR loop is a loop that is associated with (actually defined by) an explicit cursor or a
SELECT statement incorporated directly within the loop boundary. Use the cursor FOR loop
whenever (and only if) you need to fetch and process each and every record from a cursor,
which is a high percentage of the time with cursors.
A) Cursor attributes are used to get the information about the current status of your cursor. Both
explicit and implicit cursors have four attributes, as shown:
Name Description
%NOTFOUND Returns TRUE if record was not fetched successfully, FALSE otherwise.
%ROWCOUNT Returns number of records fetched from cursor at that point in time.
A) The implicit cursor is used by Oracle server to test and parse the SQL statements and the
explicit cursors are declared by the programmers.
Q) What is a cursor?
A) A cursor is a mechanism by which you can assign a name to a select statement and
manipulate the information within that SQL statement.
A) A cluster provides an optional method of storing table data. A cluster is comprised of a group of
tables that share the same data blocks, which are grouped together because they share
common columns and are often used together. For example, the EMP and DEPT table share
the DEPTNO column. When you cluster the EMP and DEPT, Oracle physically stores all rows
for each department from both the EMP and DEPT tables in the same data blocks. You should
not use clusters for tables that are frequently accessed individually.
A) select count(*) from table, or from NUM_ROWS column of user_tables if the table statistics has
been collected.
A)
A) Information such as row numbers and row descriptions are automatically stored by Oracle and is
directly accessible, ie. not through tables. This information is contained within pseudo columns.
These pseudo columns can be retrieved in queries. These pseudo columns can be included in
queries which select data from tables.
ROWID - physical row (memory or disk address) location, ie. unique row identification.
A) By changing the order of the columns that are used in the index, in the Where condition, or by
concatenating the columns with some constant values.
A) An OUTER JOIN returns all rows that satisfy the join condition and also returns some or all of
those rows from one table for which no rows from the other satisfy the join condition.
select *
The sub query is evaluated, distincted, indexed (or hashed or sorted) and then joined to the original
table typically. As opposed to
loop
then
end if
end loop
It always results in a full scan of T1 whereas the first query can make use of an index on T1(x). So,
when is where exists appropriate and in appropriate? Lets say the result of the sub query (
select y from T2 ) is huge and takes a long time. But the table T1 is relatively small and
executing ( select null from t2 where y = x.x ) is very fast (nice index on t2(y)). Then the exists
will be faster as the time to full scan T1 and do the index probe into T2 could be less then the
time to simply full scan T2 to build the sub query we need to distinct on.
Lets say the result of the sub query is small then IN is typically more appropriate. If both the sub
query and the outer table are huge either might work as well as the other depends on the
indexes and other factors.
Q) When do you use WHERE clause and when do you use HAVING clause?
A) The WHERE condition lets you restrict the rows selected to those that satisfy one or more
conditions. Use the HAVING clause to restrict the groups of returned rows to those groups for
which the specified condition is TRUE.
Q) There is a % sign in one field of a column. What will be the query to find it?
A) INSTR function search string for sub-string and returns an integer indicating the position of the
character in string that is the first character of this occurrence. SUBSTR function return a portion
of string, beginning at character position, substring_length characters long. SUBSTR calculates
lengths using characters as defined by the input character set.
A) SQL is the query language to manipulate the data from the database. SQL*PLUS is the tool that
lets to use SQL to fetch and display the data.
A) An UNIQUE key can have NULL whereas PRIMARY key is always not NOT NULL. Both bears
unique values.
Q) What is difference between Rename and Alias?
A) Rename is actually changing the name of an object whereas Alias is giving another name
(additional name) to an existing object.