Showing posts with label connected. Show all posts
Showing posts with label connected. Show all posts

Thursday, March 29, 2012

Direct Connection to Local SQL express gives error

I'm just starting out here.

I created a simple formview connected to a local file copy of the database by adding the database into the project. It worked fine.

However, I noticed that this copy of the database was not synch'ing with the database with the same name in SQL express. So I created a new connections string to access the SQL database directly out of SQL express. Its just a simple Select * from column. However, this gives an error. Why?

Server Error in '/NETCatMgr' Application.

The data types ntext and nvarchar are incompatible in the equal to operator.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: The data types ntext and nvarchar are incompatible in the equal to operator.

This is the connection string

<

addname="CatalogMgrConnectionString"connectionString="Data Source=mymachine\sqlexpress;Initial Catalog=CatalogSQL;Integrated Security=True"providerName="System.Data.SqlClient" />

Doesn't make sense. How can the formview work fine with the SQL integrated into the project but not working with a connection string to the SQL Express proper?


The error seems to be a data operation error other than a connection error. It indicates your code was trying to compare nvarchar value and ntext using "=" operator. Please make sure you choose proper data for comparation. To manipulate text/ntext/image data in SQL Server, you should use specific functions:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_fa-fz_0gs3.asp

|||Its not me -- the problem appears to be some kind of bug in the GridView. The database column is a type nText and the GridView doesn't seem to be able to write code for SQL databases with column types nText. It writes the code with a string comparison and then it crashes... I didn't write any code at all.

Sunday, March 11, 2012

Differential backup vs Log Shipping

Hello,
I'm trying to figure out the most effective way to have a standby database
in remote location (connected by reliable broadband link).
The option which I'm looking at are log shipping and differential backups.
As far as I understand with log shipping all I have to do is to periodically
apply transacton logs to original full restore database and be good forever.
On the other hand if I use differential restores, I need to restore full
backup to standby server each time I do full backup at origin server, right?
Original database is 10 Gb so does it mean with differential backup scenario
I would have to copy 10 Gb each time I do full backup on source server?
Are there any advantages in using differential backup as opposed to log
shipping method?
On a separate note what is effect of full and transaction log backups on log
shipping process?
"ChanKaiShi" wrote:

> Hello,
> I'm trying to figure out the most effective way to have a standby database
> in remote location (connected by reliable broadband link).
> The option which I'm looking at are log shipping and differential backups.
> As far as I understand with log shipping all I have to do is to periodically
> apply transacton logs to original full restore database and be good forever.
> On the other hand if I use differential restores, I need to restore full
> backup to standby server each time I do full backup at origin server, right?
> Original database is 10 Gb so does it mean with differential backup scenario
> I would have to copy 10 Gb each time I do full backup on source server?
> Are there any advantages in using differential backup as opposed to log
> shipping method?

Differential backup vs Log Shipping

Hello,
I'm trying to figure out the most effective way to have a standby database
in remote location (connected by reliable broadband link).
The option which I'm looking at are log shipping and differential backups.
As far as I understand with log shipping all I have to do is to periodically
apply transacton logs to original full restore database and be good forever.
On the other hand if I use differential restores, I need to restore full
backup to standby server each time I do full backup at origin server, right?
Original database is 10 Gb so does it mean with differential backup scenario
I would have to copy 10 Gb each time I do full backup on source server?
Are there any advantages in using differential backup as opposed to log
shipping method?On a separate note what is effect of full and transaction log backups on log
shipping process?
"ChanKaiShi" wrote:

> Hello,
> I'm trying to figure out the most effective way to have a standby database
> in remote location (connected by reliable broadband link).
> The option which I'm looking at are log shipping and differential backups.
> As far as I understand with log shipping all I have to do is to periodical
ly
> apply transacton logs to original full restore database and be good foreve
r.
> On the other hand if I use differential restores, I need to restore full
> backup to standby server each time I do full backup at origin server, righ
t?
> Original database is 10 Gb so does it mean with differential backup scenar
io
> I would have to copy 10 Gb each time I do full backup on source server?
> Are there any advantages in using differential backup as opposed to log
> shipping method?