SQL Data Generator & SQL 2008 Error

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

SQL Data Generator & SQL 2008 Error

Postby Giovanni8089 » Tue Dec 16, 2008 8:37 pm

I’m having an issue with a licensed copy of Data Generator 1.2.0.286 and SQL Server 2008. When I Generate Data I receive the following error message for all tables that belong to a custom schema. All tables belonging to the dbo schema work fine.

Failed to obtain column collation information for the destination table. If the table is not in the current database the
name must be qualified using the database name (e.g. [mydb]..[mytable](e.g. [mydb]..[mytable]); this also applies
to temporary-tables (e.g. #mytable would be specified as tempdb..#mytable).
System.InvalidOperationException: Failed to obtain column collation information for the destination table. If the
table is not in the current database the name must be qualified using the database name (e.g. [mydb]..[mytable](e.g.
[mydb]..[mytable]); this also applies to temporary-tables (e.g. #mytable would be specified as tempdb..#mytable).
at System.Data.SqlClient.SqlBulkCopy.AnalyzeTargetAndCreateUpdateBulkCommand(BulkCopySimpleResultSet
internalResults) at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternal() at
System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServer(Int32 columnCount) at
System.Data.SqlClient.SqlBulkCopy.WriteToServer(IDataReader reader) at az.a(CancellableController , Int32 ,
Int32 , ConnectionProperties , GenerateAction , SqlConnection , SDGProject , GenerationReport )
Giovanni8089
 
Posts: 1
Joined: Tue Dec 16, 2008 8:25 pm

Postby Brian Donahue » Tue Dec 30, 2008 1:53 pm

Hi,

There seems to be a bug in SQL Data Generator when the schema name contains a dot character, for instance a schema called [My.Schema] would introduce this problem.

This should be fixed in a future version.
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Mon Mar 23, 2009 4:58 pm

Correction -- the bug seems to be in the .NET Framework.

http://support.microsoft.com/kb/944389

The BulkInsert methods of the native SQL client for .NET can't handle table names with a dot in them.
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

SqlBulkCopy issue

Postby Girija » Wed Jul 14, 2010 1:29 am

I am getting following error when I try to import excel sheet to SQL server.
I didn't use dot in the table name and it used to work fine before and I didn't make any changes to application. Microsoft article says problem arises if we fully qualified table name, but I am not using schema name with table name. http://support.microsoft.com/kb/944389

ex: string destTblName = "tbJobResponseIdsRaw";
SqlBulkCopy bulkCopy = new SqlBulkCopy(conn.ConnectionString);
bulkCopy.DestinationTableName = destTblName;

Error:
Failed to obtain column collation information for the destination table.
If the table is not in the current database the name must be qualified using the database name (e.g. [mydb]..[mytable](e.g. [mydb]..[mytable]);
this also applies to temporary-tables (e.g. #mytable would be specified as tempdb..#mytable). :(

Any help on this is appreciated most.
Girija
 
Posts: 2
Joined: Wed Jul 14, 2010 1:22 am

SqlBulkCopy issue - Resolved

Postby Girija » Wed Jul 14, 2010 1:58 am

I think issue is resolved by granting view permission on tables.
It seems recently the application user was denied permissions to view table definition even though the user got read/write access on the tables. SQLBlkcopy seems to be trying to view the table definition and when it can't view it is throwing this exception error (misleading .. not properly described)...
Hope it might help anyone with similar issue. : :)
Girija
 
Posts: 2
Joined: Wed Jul 14, 2010 1:22 am


Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 0 guests