.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Issues with Database Porting Scripts

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :

Our application works with sql server 2008 R2 enterprise edition. This server has around 315 databases used by the application and in this server Sql Backups are configured. The SQL Backups are just doing a normal VDI backup (i.e. using SQL Server's built-in mechanisms). The application is developed using .NET 3.5 and is deployed in IIS 7.0

One of the requirements is to port old sql databases to work with the new version of the application which requires running scripts for altering/removing/creating tables, constraints, Stored Procedures, Views, Indexes etc from the application. We use SMO to run scripts. This was working fine previously. Recently we found that when the scripts are run from the program, it is failing.
The errors that are logged from the application are given below,
1) A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)
2) Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
3)A network-related or instance-specific error occurred while establishi

View Complete Post

More Related Resource Links

Facing MSDTC related issues while archiving data from one database server machine to another databas

I have a question with respect to distributed transactions when carried out between two database server machines on the same network.   Consider there are two database server machines \SOURCE_DATABASE_SERVER\ and \DESTINATION_DATABASE_SERVER\. Now we have to archive the data from one database server to other database server.   Let us suppose the database server \SOURCE_DATABASE_SERVER\ is the live production database server and \DESTINATION_DATABASE_SERVER\ is Long term storage database server. Now data from \SOURCE_DATABASE_SERVER\ needs to be archived into the database server \DESTINATION_DATABASE_SERVER\.   So I have written a dynamic stored procedure which includes distributed transaction (begin Tran, commit Tran, rollback            Tran) coding in it.   Now initially when I executed the procedure, it gave some of the following errors   1) OLE DB provider "SQLNCLI" for linked server "\DESTINATION_DATABASE_SERVER\" returned message "The partner transaction manager has disabled its support for remote/network transactions.". Msg 7391, Level 16, State 2, Line 1 The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "\DESTINATION_DATABASE_SERVER\" was unable to begin a distributed transaction.    

Web.Config issues - Trying to add SQLExpress database link so that I can see a GridView in a Web Pag


Current Web.Config
<?xml version="1.0"?>
      <sectionGroup name="system.web.extension

Websites using shared libraries and single common database issues


Hi everyone,

    I will be having several websites using the same shared libraries(Domain,Repository,etc..) and one single database.

 Later on i want to add another website with some added functionalities and added tables,columns ,etc in the database. The issue is that when i go deploy the last website, i will have to update all my other projects so that they work.

Is there any work around this process? Or is this the right way of doing things? 

Thx everyone

SharePoint 2010 Upgraded database Issues


Hi all,

I am having SharePoint 2010 upgraded database, I have already enabled workflow service in web application features page. But I can view default workflow templates, like approval workflow.. etc. But new web application got this feature. Please advice.

Thank You

A. Shilambuselvan

A. Shilambuselvan

Database deployment with Backup and Restore vs. Generate and Publish Scripts Wiz.


Could you please explain when is it better to deploy (publish) a database with Backup and Restore and when with the Generate and Publish Scripts Wizard?

As far as I understand Data-tier Applications in SQL Server 2008 R2 is a third option, isn't it? Are there more?

Thank you!

Error when creating Issues Web Database: The formula contains a syntax error or is not supported.



I have been trying to create an Issues Web Database on one of our MOSS 2010 servers, but I keep getting the error "The formula contains a syntax error or is not supported" when I try to. I have tried this on one of our other 2010 environments and it works fine but for some reason it happens just one this one.

In the error logs I found this:

Error updating field: List: Issues, SchemaXml: <Field DisplayName="OpenedDate" Type="DateTime" Required="TRUE" Format="DateOnly" xmlns="http://schemas.microsoft.com/sharepoint/soap/" Name="OpenedDate"><DefaultFormula>=TODAY()</DefaultFormula><DefaultFormulaValue></DefaultFormulaValue><Validation Message="Value must be greater than 1/1/1900.">=OpenedDate&gt;=DATETIME(1900,1,1,0,0,0)</Validation></Field>. Exception: Microsoft.SharePoint.SPException: The formula contains a syntax error or is not supported.

Does anyone have an idea as to what the cause might be?


The trick to force Webmatrix to create the MySQL database install scripts on my local box?


 Here is why I ask:

I've found a Webmatrix help article that says MS Webmatrix "publishes the (SQL Server or MySQL) database by creating scripts that run in a database that has been created for you by your hosting provider." That is wonderful, except I can't get it to work when I'm trying to publish a MySQL database (backing wordpress) through FTP (my hosting provider does not support 'web deploy'). Again, no problem, since it is already documented that " FTP protocols cannot be used to publish MySQL database. "

But this does not excuse Webmatrix from generating MySQL database install scripts for me. During the publishing step, no database install script is generated - at least that I can tell - and there is no manual option to create a database export / backup / install script.

In short, as Webmatrix goes, I'm dead in the water trying to get my database uploaded to my hosting provider. Does anyone know the trick to force Webmatrix to create the MySQL database install scripts on my local box? Once created, I can take-over the upload and install process.

Generate scripts tool blok on geting list of objests in database (last indefinitly)


I' using SQL server 2008 R2 with merge replication. Suudenly if I tray to start Generate scripts tool to generate scripts for view, functions and sp's on one database generation of scripts block on Getting the list of objects in 'database' faze. This faze run indefinitly and listing of object and generation of scripts  don't take place.

Database has more then 1600 merge articles.

Thanks in advanced. 

How to handle Daylight Saving Time issues in sql server Database


Hi We have users across the globe and have issues everytime the Daylight Savings change occur. Is there a way to handle this issue in sql server?


SMO Database in Single User mode issues


I am trying to use the SMO library and setting the single user mode. Here is a simple example illustrating my issue.

The below code will fail the first time. Saying "Invalid object name TestTable". Eventhough that table does exist and so does the DB. However, if you run it again (now the DB is already in single user mode) everything works fine. Also, if you remove the code that alters the db user mode everything works fine. I am assuming the problem must exist with the single user mode and utilizing the correct db connection. I have tried flipping the AutoDisconnectMode and NonPooledConnection but that hasn't help. Any help would be appreciated.

Sample code

SqlConnectionStringBuilder sb = new SqlConnectionStringBuilder(); 

sb.Password = "P@ssword!"; 

sb.UserID = "testuser"; 

sb.DataSource = @".\mssql2008"; 

sb.InitialCatalog = "TestDB"; 

ServerConnection serverConn = new ServerConnection(); 

//serverConn.AutoDisconnectMode = AutoDisconnectMode.NoAutoDisconnect; 


Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Publishing SQL Server Database using Publishing Wizard : Tips & Tricks

We can use SQL Server Publishing Wizard to deploy our local Database to remote hosting server/production server.This feature is available in SQL Server 2008/VWD 2008.

Below is the complete step by step guide of this process.

Adding Rows in GridView without using a Database

This article describes on how to add rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in the TextBox on Button Click and retain the GridView data on post back.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

ASP.NET Database Tutorial

This tutorial will show you how to display data using the .NET GridView Control, ASP.NET 2.0 and VB.NET

The GridView control is a powerful tool and is simple to implement.

First, you will need to import the System.Data.SqlClient namespace.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend