Go to content Go to navigation Go to search

Fix : RPC server Unavailable

December 16th, 2008 by Gabriel

If you try to run the Netdom.exe query fsmo command or if you try to run any remote procedure call (RPC)-based tool on the ISA server, you may receive the following error message :

RPC server Unavailable”

Here is a quick fix for this error message :-

Configure the EnableRSS registry value and the EnableTCPA registry value

1. Click Start, click Run, type in regedit, and then click OK.

2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Tcpip\Parameters

3. On the Edit menu, point to New, click DWORD Value, and then type EnableRSS.

4. Double-click EnableRSS, type 0, and then click OK.

5. On the Edit menu, point to New, click DWORD Value, and then type EnableTCPA.

6. Double-click EnableTCPA, type 0, and then click OK.

7. Exit Registry Editor, and then restart the server.

Configure the DisableTaskOffload registry entry

If you continue to receive RPC errors, follow these steps:

1. Click Start, click Run, type regedit, and then click OK.

2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Tcpip\Parameters

3. In the details pane, make sure that the DisableTaskOffload registry entry exists. If this entry does not exist, add the entry. To do this, follow these steps :

#. On the Edit menu, point to New, and then click DWORD Value
#. Type DisableTaskOffload.

4. Double Click DisableTaskOffload, type 1, and then click OK.

5. Exit Registry Editor, and then restart the server.

Basic SQL Statements

December 8th, 2008 by Gabriel

Basic SQL Statements :

SQL is used to query the database which are almost same for SQL Server, MS Access, Oracle and MySQL.
There are four types of basic queries :-

SELECT
INSERT
UPDATE
DELETE
ORDER BY

Different combination of parameters can be passed to a query.

1] SELECT :-

its the most common SQL statement using which data can be selected from database and the output is returned to user.The result is

stored in a result table, called the result-set.SQL is not case sensitive. SELECT is the same as select.
Here is a simple example -

select name, bdate from user;
this will return all names and bdates from the table user.

select * from user;
this will return all records of user table.

select * from user where name=’john’;
this will return all records in which name = john

select * from user where name=’john’ OR name=’paul’ OR bdate=01012007
this way you can add multiple filtering using “OR” , “AND” clause.

2] INSERT :-

it is used to take the data input from user and insert it into table of the database. Data can be taken from any form or it can be

directly inserted using query.It is used to insert a new row in a table.
Simple example-
Insert into Table1 (FirstName, LastName, Phone) Values (’Gabriel’, ‘R’, ‘1112222′);

3] UPDATE :-

Using Update, we edit / modify any exisiting table. Either all the rows can be updated, or a subset may be chosen using a condition.
Simple example -
Update Table1 Set name=@FirstName, LastName=@LastName, Phone=@Phone where id=@ID

WHERE clause us very important in Update query. If you don’t use WHERE then it will update all existing records in the table.

4] DELETE :-

It is used to delete rows in a table. It also uses WHERE claue. The WHERE clause specifies which record or records that should be deleted. If you omit the WHERE clause, all records will be deleted.
Here is an example of a Delete statement-

Delete From Table1 where ID=10

it will delete all records in which ID = 10

5] Order By Clauses :-

It is used to sort the output returned by a query. Using this clause, you can sort by any field in the table.
Example -
Select * from Table1 Order By name

This will list all returned records sorted by Name alphabetically.

‘ASC’ (ascending order) or ‘DESC’ (descending order) can be included in Orderby query to sort the output in ascending or descending order respectively.
Like -

Select * from Table1 Order By name DESC

How to start SQL server 2000 in Single User Mode

November 26th, 2008 by Gabriel

sql_logo How to start SQL server 2000 in Single User Mode

Single User mode allows only one single user to connect to the database.
Even if SQL server is in Single User Mode, you can connect the SQL Query Analyzer with the SA user.

Single user mode specifies that only one user at a time can access the database. Basically it is used for maintenance purposes.

If any other users are connected to the database and you  switch the database to single user mode then their connections to the database will be closed without any warning message.

Following are the steps to start SQL server in Single User mode -

On your server :

Start >> Run >> type in CMD and hit Ok >> it will open up Command Prompt >> here execute the following command

net stop MSSqlServer

>> it will stop the SQL service >> now to start SQL in Single User mode execute following command

sqlservr -m

####

How to Set a single database into Single User Mode :-

You can set a single database into single user mode using an alternative procedure but this process cannot be used to set the MASTER database into single user mode.

# Connect to SQL Server using SQL Query Analyzer with SA user

# Execute the following command -

alter database database-name set SINGLE_USER

where “database-name” is the actual name of the database.

This cannot be used to place the databases MASTER, MSDB or TEMPDB in single user mode.

# To set the database back into normal multi-user mode use, execute the following command -

alter database db-name set MULTI_USER

Database Connection String

November 24th, 2008 by Gabriel

A connection string is a string which contains information about a data source and its connectivity.
Connection string is always passed to a driver or provider which initiate the actual database connection.
It includes the attributes like name of the driver, server/host address, database name, security information like user name and password.
The format of a connection string is a semicolon-delimited list of key/value parameter pairs.

Following is a sample SQL database connection string :-

<add name=”SampleConnectionString” connectionString=”Data Source=AAAAAA;Initial Catalog=BBBBBB;User ID=CCCCCC;Password=DDDDDD” providerName=”System.Data.SqlClient” />

Where :
AAAAAA : Your server’s actual IP address.
BBBBBB : Your database’s actual Name.
CCCCCC : Your database’s actual Username.
DDDDDD : Your database’s actual Password.

System Databases in SQL Server

November 19th, 2008 by Gabriel

System Databases in SQL Server :-

A Database Administrator shold be aware of system databases which is an integral part of the SQL Server.

System Databases are essential for the operation of a server instance.

Following are System Database in SQL Server 2005 & 2008.

Master Database :-

Master database is the heart of SQL Server, it records all system-level information of a SQL Server which includes instance-wide metadata such as logon accounts, endpoints, linked servers, system configuration settings, System Level Stored Procedures, System level Functions, all other existing databases, their MDF/LDF data file location etc.
Each SQL instance have its own Master database.
Master database consists of two physical files, namely master.mdf (data file) and mastlog.ldf (log file).
SQL Service can not be started if there is any problem with master database or its database files.
There are some restrictions on Master Database, you are not allowed to perform all the operations that you perform with normal database like, you can not add files or file groups, you can not change the owner, you can not drop the database, you can not change the collation, you can not remove the filegroup, primary data file, or log file, you can not take the database offline…

Model Database :-

The model database is used as the template for all databases created on an instance of SQL Server.
While creating a new database, SQL Server create it by getting a template from Model Database. Hence any change that you make in Model Database will reflect in newly created database as well for e.g. if a user creates any tables, stored procedures, user defined data types in Model database then those objects will be available in every newly created database as well.
Model database consists of two physical files namely Model.mdf (data file) and ModelLog.ldf (log file).
If the Model database is damaged or corrupted then SQL Server Service will not start up as it will not be able to create the tempdb database as TempDB database is recreated on every restart of SQL service.
Restrictions on Model Database are the same as that on Master Database.

MSDB Database :-

MSDB is the database used by SQL server Agent to store configuration information, Agent Jobs, Job schedules, Alerts, Operators, Service Broker, Log Shipping, database backups and restore information, Maintenance Plan Configuration, Configuration of Database Mail etc.
MSDB database consists of two physical files namely MSDBData.mdf (data file) and MSDBLog.ldf (log file).
The scheduling information used by SQL Server Agent will be lost in case of any problem occured with MSDB database.
Restrictions on MSDB Database are the same as that on Master Database.

TempDB Database :-

The TempDB is the only database which is recreated every time when SQL Server restarts.
It is besically used to store all the temporary objects like temporary tables, temporary stored procedures, cursors, table variables etc.
TempDB database consists of two physical files namely tempdb.mdf (data file) and templog.ldf (log file).
A clean/new copy copy of TempDB is created on each restart of SQL server, there is never anything stored in tempdb from one session of SQL Server to another.

New features in Microsoft SQL 2005

October 14th, 2008 by Gabriel

Following are few of the new features and improvements introduced in Microsoft SQL 2005

Manageability :-

SQL Server 2005 makes it easy to deploy, manage, optimize data.
A single integrated management console enables database administrators to easily monitor and manage distributed data.It provides an extensible management infrastructure that can be easily programmed using SQL Management Objects.

SQL Server Management Studio :-

SQL Server Management Studio is a new database management tool for database administrators, developers and end users. It combines the functionality of Enterprise Manager and Query Analyzer. It allows management and authoring for SQL Server 2005 Reporting Services (SSRS), Integration Services, Notification Services, replication, and previous versions of Microsoft SQL Server, all through the same interface.

Enhanced Query Authoring :-

SQL Server 2005 introduces Query Editor which is integrated into SQL Server Management Studio. Query Editor also allows you to write and execute scripts such as multidimensional expressions (MDX), data mining expressions (DMX) and XMLA. Its nothing but the replacement for SQL Server 2005 Query Analyzer.

Security :-

SQL Server 2005 makes significant enhancements to the security model which is already explained at-
http://winadmin.co.uk/microsoft-sql-server/security-features-in-sql-server-2005/

Integration Services :-
SQL Server 2005 includes Integration Services (SSIS) which enables organizations to more easily integrate and analyze data from multiple heterogeneous information sources. By analyzing data across an array of operational systems, organizations may gain a competitive edge through a holistic understanding of their business.

Security Features in SQL Server 2005

October 14th, 2008 by Gabriel

Microsoft SQL server 2005 has been designed to be more secure with many features that increase the degree of protection.
Authentication, Authorization and encryption are the key features.

Authentication :-

Mixed and windows authentication are the two authentication modes supported by SQL 2005.

In Windows Authentication mode access is given based on a security token assigned during successful domain logon by a Windows account, which obviously have full access to SQL server. The Windows authentication mode only allows you to login/connect to SQL Server with Windows authentication. Windows Authentication is for the environment that all of your users are part of a Windows domain. Your access to SQL Server is controlled and authenticated when you log on to the Windows operating system. If you are a member of Windows’ administrator group then you should be able to use Windows Authentication to connect to SQL Server.
When a user connects through a Windows user account, SQL Server validates the account name and password using the Windows principal token in the operating system. This means that the user identity is confirmed by Windows. SQL Server does not ask for the password, and does not perform the identity validation.

The mixed authentication mode stipulates that the SQL Server authentication be done on the verification of credentials stored and maintained by the SQL Server. The logins are created in SQL Server that are not based on Windows user accounts.Users connecting using SQL Server Authentication must provide their credentials (login and password) every time that they connect.

Password Complexity :-

1. The length of the password used,
2. The type of characters that can be used like special characters, alphabets, numbers etc.
3. System reserved words should not be allwed to use,
4. Non blank password should be disallowed

Password Expiration :-
Password Expiration is determined by the value of “Maximum password age” group policy setting. The group policy settings are defined using the CREATE_LOGIN T_SQL statements.The password expiration and policy for individual accounts can be obtained from the SQL Server Management Studio interface.

Lockout Behavior :-
Lockout behavior is determined by the values assigned to “Account lockout duration”, “Account lockout threshold” and “Reset account lockout counter after” settings.

Authorization :-
Authorization features determine the level of access rights/previleges assigned to a user.
SQL 2005 allows separation of user schema objects and database objects.A schema is nothing but group of objects so that the set of objects in a schema can be treated as a unit for owning permissions.For example Execute permissions can be allowed on a role of stored procedures.

Microsoft SharePoint

October 14th, 2008 by Gabriel

Microsoft SharePoint is a browser based document-management platform.
It can be used by the web sites that access shared workspaces and documents, applications like wikis, blogs etc.
SharePoint interface is a web interface. Share point sites are mainly .Net sites with MS SQL as back end database.
It provide content management features, implement business processes, and supply access to information that is essential to organizational goals and processes.Support specific content publishing, content management, records management, or business intelligence needs.It provide centralized repository for shared documents, as well as browser-based management and administration of them.
Some of its good features includes workspaces and dashboards, navigation tools, lists, alerts (including e-mail alerts), shared calendar, contact lists and discussion boards etc.

The SharePoint family -

Windows SharePoint Services (WSS)
:-
Windows SharePoint Services 3.0 (WSS) is a free addon in Windows server which offers the infrastructure, supporting HTTP and HTTPS based editing of documents, as well as document organization in document libraries, version control capabilities, wikis, and blogs etc.
WSS 3.0 is built on top of ASP.NET 2.0.

Microsoft Search Server (MSS) :-
Microsoft Search Server (MSS) is a search platform supported by Microsoft. MSS shares its architectural underpinnings with the Windows Search platform for both the querying engine as well as the indexer. MOSS search provides the ability to search metadata attached to documents.Microsoft has made Microsoft Search Server available as Search Server 2008, released on March 2008. A free version, Search Server 2008 Express, is also available.

Microsoft SharePoint Designer (SPD) :-
The “What You See Is What You Get” editor MS SharePoint Designer focus on design of SharePoint sites and end-user workflows for WSS sites. Its nothing but the next-generation Microsoft replacement for Microsoft FrontPage :)
SPD requires that IIS has Frontpage extensions installed on the server.