Brijesh's Blog

September 25, 2008

Test Database Connectivity and DOS command to create file of any size

Filed under: Uncategorized — brij28 @ 11:41 am
Here are the steps to test database/database server connectivity from any remote computer.

These steps assume that you have deployed small, medium or large SharePoint server farm and you have established Remote Desktop Connection to one of the Front End Web Servers or Application Servers using account which has full database access privileges and you want to test database connectivity.

For example, following screen shots were taken while testing database connectivity from Front End Web Server – "SPWeb"

1. Establish Remote Desktop Connection to "SPWeb" using "domain\SPAdmin" AD account.

Note: AD Account – "domain\SPAdmin" was used for installing MOSS 2007 and it was assigned DBCreator and SecurityAdmin server roles on SQL Server.

2. Create a new text document.

3. Rename and change the file extension of text document to .udl extension (e.g. DBTest.udl).

4. Double click on DBTest.udl. It will take you to "Connection" tab by default.

5. Select "Provider" tab on the top and choose "Microsoft OLE DB Provider for SQL Server" under "Select the data you want to connect to: " and OLE DB Provider(s) menu. Click "Next" button at the bottom.

6. When you hit next button on previous screen ("Provider" tab), it will bring you back to "Connection" tab.

Step 1: Enter the name of the database server to test the database connectivity (e.g. "Database Server")

Step 2: Select "Use Windows NT Integrated security" option. This is because you are testing database connectivity from "SPWeb" Front End Web Server and you are already logged into that server using AD account "domain\SPAdmin" which has full database access privileges.

Now, click "Refresh" button.

7. This will take few seconds (5-20 seconds) and it will load all the database names to pull down menu.

8. You may select one of the SharePoint databases (e.g. SharePoint_Config_DB) and hit "Test Connection" button at the bottom. It should popup window with "Test connection succeeded." message.

Conclusion: I wanted to test database connectivity from Front Web Server – "SPWeb". So I established Remote Desktop Connection to "SPWeb" using AD Account "domain\SPAdmin", which has full database access privileges on all the SharePoint databases. I used "DBTest.udl" file to test connectivity to "SharePoint_Config_DB" database (SharePoint Configuration database) on database server – "Database Server".

This may help verifying database connectivity and if this test fails, you need to troubleshoot database connectivity issues before you start looking in to the SharePoint errors/issues.

DOS command to create file of any size:

fsutil file createnew C:\Brij\One_MB_File.doc 1024000

Above command will create 1 MB file called "One_MB_File.doc" at C:\Brij location.

You can provide any file extension – e.g. .txt, .xls, .ppt, .pdf etc.

This command may help in creating files for upload/download test in SharePoint or any other application.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: