Client Workstation Initiated Bulk Inserts Fail

Sep 24, 2007

I'm setting up a new 2005 server and bulk insert from a client workstation (using windows authentication) is failing with:

Msg 4861, Level 16, State 1, Line 1
Cannot bulk load because the file "\FILESERVERNAMEsharedfolderfilename.txt" could not be opened. Operating system error code 5(Access is denied.).


Here's my BULK INSERT statement (though I'm pretty sure there's nothing wrong with it):


BULK INSERT #FIRSTROW FROM '\FILESERVERNAMEsharedfolderfilename.txt'
WITH (
DATAFILETYPE = 'char',
ROWTERMINATOR = '
',
LASTROW = 1
)

If I run the same transact SQL when remote desktopped into the new server (under the same login as that used in the client workstation), it imports the file without errors.

If I use the sa client login from the client workstation (sql server authentication) the bulk insert succeeds.

My old SQL 2000 server lets me bulk insert the file without errors even from my client workstations using windows authentication.

I have followed the instructions on this site: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=928173&SiteID=1
, but still no luck and same error.

I'm pretty sure it is being caused by the increased constraints on bulk insert in 2005. Hoping someone can help. The more specific the better. If you need more info, let me know.

Oh and I've also made sure that the SQL service uses a domain logon account rather than the local system account.

Note that the file server (source file resides there) is a DIFFERENT machine than the 2005 SQL server. If I move the source file to the sql server machine the error goes away (not a preferred solution though).

Thanks!

View 9 Replies


ADVERTISEMENT

Uninstall SQL 6.5 Client Tool From NT Workstation

May 12, 2000

Hi:

I have installed SQL 6.5 client tool on to my workstation. Since then, we have upgraded to SQL 7.0 on our server. I installed SQL 7.0 client tool to my workstation and have been using it. I want to remove SQL 6.5 client tool from my workstation and do not know how. There is no uninstall button in the SQL 6.5 folder nor this program exists in Add/Remove Program in COntrol Panel. Can you help? Thank you.

-Nicole-

View 1 Replies View Related

SQL Server 2005 Installation Woes For Workstation Components And Client Tools

Apr 27, 2008


Hello,

I have installed successfully Microsoft SQL server 2005 in MSCS.

However the set up did not install Workstation components (client tools - SSMS etc).

I have successfully installed workstation components in one node of cluster.

However setup is giving following error while installing workstation components on other node. (From this node MS SQL server 2005 was installed).

Product: Microsoft SQL Server 2005 Tools -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action SqlWbSetup.5F46584E_060D_4BCB_ADEE_BD15A7BFCC2A, location: C:Program FilesMicrosoft SQL Server90ToolsBinnVSShellCommon7IDESqlWb.exe, command: /setup

There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.

I did "C:Program FilesMicrosoft SQL Server90ToolsBinnVSShellCommon7IDESqlWb.exe, /setup".

It executed but no error, no output.

Any gues, help in isolating issue?

Any more information required.(Media is ok. Setup has been tried after reboot. There is enough disk space.)

Regards.

Mahesh
===========
Setup

1) Microsoft Cluster of two nodes.
2) Hardare - HP Blade servers
3) OS - Windows 2003 EE with SP2
4) SQL Server 2005 Standard Edition with SP2.

=============================

MSI (s) (B0:7C) [17:40:20:390]: Note: 1: 1722 2: SqlWbSetup.5F46584E_060D_4BCB_ADEE_BD15A7BFCC2A 3: C:Program FilesMicrosoft SQL Server90ToolsBinnVSShellCommon7IDESqlWb.exe 4: /setup
MSI (s) (B0:7C) [17:47:23:609]: Product: Microsoft SQL Server 2005 Tools -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action SqlWbSetup.5F46584E_060D_4BCB_ADEE_BD15A7BFCC2A, location: C:Program FilesMicrosoft SQL Server90ToolsBinnVSShellCommon7IDESqlWb.exe, command: /setup


MSI (s) (B0:7C) [17:47:35:921]: Note: 1: 1729
MSI (s) (B0:7C) [17:47:35:921]: Product: Microsoft SQL Server 2005 Tools -- Configuration failed.

MSI (s) (B0:7C) [17:47:35:953]: Cleaning up uninstalled install packages, if any exist
MSI (s) (B0:7C) [17:47:35:953]: MainEngineThread is returning 1603
MSI (s) (B0:A0) [17:47:36:062]: Destroying RemoteAPI object.
MSI (s) (B0:80) [17:47:36:062]: Custom Action Manager thread ending.

View 1 Replies View Related

Bulk Inserts

Mar 3, 2006

I'm trying to perform a bulk insert as shown below. It's problematic b/c it's not updating the identity fields correctly and we're getting dups. I think, but I'm not sure, that On Update Cascade would solve all this, b/c we wouldn't have to concern ourselves with even touching the identity fields, b/c they would be autogenerated. Can someone shed some light?? I'm pretty confused.


CREATE PROCEDURE AddMiamirecords AS

BEGIN TRANSACTION

--USERS
INSERT INTO [Undex_Production].[dbo].[USERS]([LastName], [UserName], [EmailAddress], [Address1], [WorkPhone], [Company], [CompanyWebsite], [pword], [IsAdmin], [IsRestricted],[AdvertiserAccountID])
SELECT dbo.fn_ReplaceTags (convert (varchar (8000),Advertisername)), [AdvertiserEmail], [AdvertiserEmail],[AdvertiserAddress], [AdvertiserPhone], [AdvertiserCompany], [AdvertiserURL], [AccountNumber],'3',0, [AccountNumber]
FROM Miami
WHERE not exists (select * from users Where users.Username = miami.AdvertiserEmail)
AND validAD=1


--PROPERTY
INSERT INTO [Undex_Production].[dbo].[Property]([ListDate],[CommunityName],[TowerName],[PhaseName],[Unit], [Address1], [City], [State], [Zip],[IsActive],[AdPrintId])
SELECT [FirstInsertDate],[PropertyBuilding],[PropertyStreetAddress],PropertyCity + ' ' + PropertyState + ' ' + PropertyZipCode as PhaseName,[PropertyUnitNumber],[PropertyStreetAddress],[PropertyCity], [PropertyState], [PropertyZipCode],'0',[AdPrintId]
FROM [Undex_Production].[dbo].[miami]
WHERE miami.AdvertiserEmail IS NOT NULL
AND validAD=1


--ITEM
INSERT INTO [Undex_Production].[dbo].[ITEM] ([SellerID],[Price],[StartDate],[EndDate], [HomePageFeatured],[Classified],[IsClosed])
SELECT USERS.UserID, miami.PropertyPrice, convert(datetime,miami.FirstInsertDate), dateadd(day, 30, miami.FirstInsertDate)as EndDate, 1, convert (int,AdNumber) as Classified, 0
FROM USERS RIGHT OUTER JOIN
miami ON USERS.UserName = miami.AdvertiserEmail
WHERE validAD=1


--PROPERTYITEM
INSERT INTO [Undex_Production].[dbo].[propertyItem]( [propertyId], [ItemId])
SELECT Property.propertyId, ITEM.ItemID
FROM ITEM RIGHT OUTER JOIN
miami ON ITEM.StartDate = miami.FirstInsertDate AND ITEM.Price = miami.PropertyPrice AND ITEM.Classified = convert(int,miami.AdNumber) LEFT OUTER JOIN
Property ON miami.PropertyUnitNumber = Property.Unit AND miami.PropertyZipCode = Property.Zip AND
miami.PropertyCity = Property.City AND miami.PropertyStreetAddress = Property.Address1
WHERE validAD=1

--CONDOFEATURES
INSERT INTO [Undex_Production].[dbo].[CondoFeatures](PropertyId,[Bedrooms], [Area], [PropertyDescription], [Bathrooms], [NumOfFloors])
SELECT Property.propertyId, [PropertyBedrooms], [PropertySquareFeet], dbo.fn_ReplaceTags (convert (varchar (8000),PropertyDescription)),
[PropertyBathrooms], [PropertyTotalFloors]
FROM miami LEFT OUTER JOIN
Property ON miami.PropertyUnitNumber = Property.Unit AND miami.PropertyZipCode = Property.Zip AND
miami.PropertyCity = Property.City AND miami.PropertyStreetAddress = Property.Address1
WHERE validAD=1

--COMMUNITY FEATURES
INSERT INTO [Undex_Production].[dbo].[CommunityFeatures](PropertyId,[totalFloors],isComplete1)
SELECT Property.propertyId, miami.propertyTotalFloors,'0' as IsComplete
FROM miami LEFT OUTER JOIN
Property ON miami.PropertyUnitNumber = Property.Unit AND miami.PropertyZipCode = Property.Zip AND
miami.PropertyCity = Property.City AND miami.PropertyStreetAddress = Property.Address1
WHERE validAD=1

--UNITDISCLOSURES
INSERT INTO [Undex_Production].[dbo].[UnitDisclosures]([propertyId],[monthcondoasso])
SELECT Property.propertyId, [propertyassocfee]
FROM miami LEFT OUTER JOIN
Property ON miami.PropertyUnitNumber = Property.Unit AND miami.PropertyZipCode = Property.Zip AND
miami.PropertyCity = Property.City AND miami.PropertyStreetAddress = Property.Address1
WHERE validAD=1


--BROKERDEVELOPER
INSERT INTO [Undex_Production].[dbo].[BrokerDeveloper]([IsFSBO],[FSBOName],
[FSBOEmail],[FSBOWebsite],[IsDeveloper],[DeveloperName],[DeveloperWebsite],[IsBroker],[BrokerName],[BrokerageWebsite],
[propertyId],[brokercommission],[isComplete])SELECT
CASE AdvertiserType when 'FSBO' THEN 1 else 0 end,
CASE AdvertiserType when 'FSBO' THEN [AdvertiserName] else NULL end,
CASE AdvertiserType when 'FSBO' THEN [AdvertiserEmail] else NULL end,
CASE AdvertiserType when 'FSBO' THEN [AdvertiserURL] else NULL end,
CASE AdvertiserType when 'Developer' THEN 1 else 0 end,
CASE AdvertiserType when 'Developer' THEN [AdvertiserName] else NULL end,
CASE AdvertiserType when 'Developer' THEN [AdvertiserURL] else NULL end,
CASE AdvertiserType when 'Realtor' THEN 1 when 'Broker' THEN 1 else 0 end,
CASE AdvertiserType when 'Realtor' THEN [AdvertiserName] when 'Broker' THEN [AdvertiserName] else NULL end,
CASE AdvertiserType when 'Realtor' THEN [AdvertiserURL] when 'Broker' THEN [AdvertiserName] else NULL end,
Property.propertyId,[PropertyCommBroker],'0' as IsComplete
FROM miami LEFT OUTER JOIN
Property ON miami.PropertyUnitNumber = Property.Unit AND miami.PropertyZipCode = Property.Zip AND
miami.PropertyCity = Property.City AND miami.PropertyStreetAddress = Property.Address1
WHERE validAD=1
IF @@ERROR <> 0
BEGIN
ROLLBACK TRAN
RETURN
END
COMMIT TRANSACTION
GO

View 2 Replies View Related

Using Triggers With Bulk Inserts

May 4, 2005

Hello All.

I am attempting an

insert into <tablename> select * from...

This is inserting thousands of rows into a table that has a trigger on it. The trigger updates a seperate table.

Now my question is will the trigger fire for every record inserted because I need it to fire only once as the table the trigger is updating is becoming locked when the insert statement is executed. I am assuming it is because of the number of times the trigger is being fired that the table is becoming locked. Any help would be greatly appreciated.

View 4 Replies View Related

Bulk Inserts Between Two Different DBMS

Sep 21, 2004

Hi folks,
I have a table located in DB2 nd I need to have a mirror image of this table on a SQL2000 database to avoid some server downtime problems.
Right now I have a solution using ADO.NET with Windows Services.

This windows service invokes itself everyday morning and pulls all the records from this table in DB2 to a dataset. Then I loop through the dataset and insert every record into SQL 2000 Table. This method is working fine ( It take approximately 2 minutes to insert 5000 records). I am just wondering whether there is any way to acheive bulk insertion in this case. Considering future growth of table I am not thinking the existing solution is neither elegant nor efficient.

Please let me know if I can achive the same either using XML, BULK INSERTS or any other mechanism in ADO.NET and please remeber that we are talking about data migration between different DBMS ( DB2 to SQL 2000)

Thanks,
Sai

View 1 Replies View Related

SQL 2012 :: Blocking During Bulk Inserts?

Dec 9, 2014

We are noticing a lot of blocking when performing bulk inserts.

Sometimes the lead blocker(s) are blocking inserts into the same tables, but most of the time, it's insert to other tables. So, while bulk insert into table X is running, bulk insert into table Y is blocked from the insert into X.

- We turned off transactions from the application performing the bulk inserts - no change.

- We enabled table locking from the application - no change

- We enabled lock_on_bulk_load on the tables - this seems to have worked; however still see some blocking.

According to the lock_on_bulk article - When you specify table locking for a bulk import operation, a bulk update (BU) lock is taken on the table for the duration of the bulk-import operation, shouldn't we be seeing this BU lock? Instead, we see nothing but LCK_M_X (exclusive table locks).

Just found out that in order get a BU lock, no indexing can exist on the table ... sure be nice if that was in the article!

Also, we saw the exclusive locks happening before we made these changes, meaning it wasn't using the row locks that it should be by default. Assuming we're missing something here with lock escalation. I am profiling just for lock escalation, and it never happens ...

So I guess my pending question at this time is that why when inserting into table X do inserts into table Y get blocked?

View 3 Replies View Related

T-SQL (SS2K8) :: Bulk Inserts In Batch?

Jun 16, 2015

I have a table with 370 million rows and 50+ columns. I need to change the data type of a column from character to numeric. Here's what it contains:

40 million with numbers I want to keep, the rest I just want to set to null:

4k with alpha characters
55 million other numbers
275 million empty strings

An alter column statement fails not just on the alpha characters but on the empty strings. So I tried a couple things on a test database to get an idea of the time it would take:

An update statement to clear out the non-numeric data is too slow (~1.5 days, batched 10000 at a time). I think I probably should create a new column anyway though, so I'm going to copy the data to a new table since it would be faster than adding a new column to the original table.

An insert ... select ... takes about 12 hours; adding WITH (TABLOCK) didn't seem to have any effect, and I'm not sure how to batch it. Recovery model is simple.

A select ... into ... only takes about 1 hour, but can't be batched.

Using a 3rd party ETL tool takes about 5 hours, batched.

I wanted to batch it to minimize impact on other queries but primarily the logs. Is there any way to do a fast batched bulk transfer within SSMS?

View 9 Replies View Related

BULK INSERT Inserts 2 Rows

May 15, 2008

Greetings

Got bulk insert thing going real nice thanks to your feedback! But now I notice that the BULK INSERT creates 2 identical rows while the flat file has the column headers and then corresponding row, just one row.
Why would it do that. Interestingly if the data file and format file are residing on a shared folder on SQL 2005, and I ran the BULK INSERT from studio it only inserts one row. But when I do BULK INSERT via user interface it creates 2 rows. What is going here.

View 10 Replies View Related

Bulk Inserts To Data Warehouse - Best Practices?

Jul 20, 2005

Hello all,I just started a new job this week and they complain about the length oftime it takes to load data into their data warehouse,which they do once a month.From what I can gather, they rebuild the indexes before the insert with an80% Fillfactor, then insert the data (with theindexes enabled), then rebuild the indexes with a 100% Fillfactor.Most of my RDBMS experience is with a different product. We would havedisabled the indexes and Foreign Keys, loaded the data, thenre-enabled them, moving any records that violated the constraints into anappropriate audit table to be checked after.Can someone share with me what the accepted "best practices" are for loadingdata efficiently into a data warehouse?Any thoughts would be deeply appreciated.Steve

View 2 Replies View Related

Row Level Security And Integration Services Bulk Inserts Don't Work

Jan 24, 2007

Hi i followed Microsofts "Implementing Row-and-Cell-Level Security in Classified Databases Using SQL Server 2005"

this works fine when i insert delete data on a normal script (mangement studio)

my project runs in a SSIS package, different users. i cannot do a bulk insert using OLEDB data Destination i get the following error

An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Conflicting locking hints are specified for table "dbo.tblUniqueLabelMarking". This may be caused by a conflicting hint specified for a view.".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Conflicting locking hints are specified for table "dbo.tblUniqueLabelMarking". This may be caused by a conflicting hint specified for a view.".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Conflicting locking hints are specified for table "dbo.tblUniqueLabel". This may be caused by a conflicting hint specified for a view.".
Error: 0xC0209029 at Data Flow Task, OLE DB Destination 1 [1741]: The "input "OLE DB Destination Input" (1754)" failed because error code 0xC020907B occurred, and the error row disposition on "input "OLE DB Destination Input" (1754)" specifies failure on error. An error occurred on the specified object of the specified component.

View 6 Replies View Related

Odbc Using Native Client Fail

Aug 26, 2007

I installed sql2005 on server, created odbc connection , sucess connection.
I installed native client on pc. pc ping server sucessfully. I created odbc using sa with valid password (as i do in server), when completing give error " sql server does not exist or access denied" , and can not connect with server.
how can i resolve the problem.

View 1 Replies View Related

Vista SQL 2005 SP2 Client To Windows XP SQL 2005 (non-sp2) Workstation.

Apr 26, 2007

I'm trying to use SQL Management Studio to connect from a Vista SQL 2005 client w/ SP2 over to a Windows XP workstation running SQL server developer edition (non-sp2) using windows authentication.



I'm already preauthenticated by network shares to the xp workstation. This worked just fine in windows xp but stop working in vista.



After searching around, i found out that vista handles trusted authentication differently than windows xp due to changes in the SSPI. Logging in as sql authentication works fine. Logging in as windows authentication does not.



UPDATE: I found out that two workstations running vista and sql 2005 sp2 cannot connect to each other using windows trusted authentication!!!



What the heck?



UPDATE: I found out that my IIS 7.0 using ASP.NET and connecting to SQL 2005 (non sp2) on a Windows 2003 server (SP1) WILL connect to the database using trusted authentication... apparently IIS can access the credentials and pass them to the sql 2005 box just fine. My Sql 2K5 SP2 tools cannot. I'm forced to use SQL authentication to the box.



Same thing applies with a Windows XP SP2 box running SQL 2005 (non sp2).


Here is my sql server error log off of the windows xp workstation:

2007-04-26 15:41:32.34 Logon Error: 17806, Severity: 20, State: 2.
2007-04-26 15:41:32.34 Logon SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT: 192.168.254.100]
2007-04-26 15:41:32.34 Logon Error: 18452, Severity: 14, State: 1.
2007-04-26 15:41:32.34 Logon Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: 192.168.254.100]




How can i Fix this issue?



[1] Client side:

What is the connection string in you app or DSN?
N/A
If client fails to connect, what is the client error messages?

Is the client remote or local to the SQL server machine?
Remote

Can you ping your server?
YES

Can you telnet to your SQL Server?
YES

What is your client database provider?
SQL Management Studio

Is your client computer in the same domain as the Server computer?
WorkGroup

What protocol the client enabled?
Shared Memory & TCPIP

Do you have aliases configured that match the server name portion of your connection string?
NO

Do you select force encryption on server and/or client?
NO

[2] Server side:



What is the MS SQL version?
SQL Server 2005

What is the SKU of MS SQL?
Developer

What is the SQL Server Protocol enabled?
Shared Memory & TCPIP

Does the server start successfully?
YES

If SQL Server is a named instance, is the SQL browser enabled?
N/A

What is the account that the SQL Server is running under?
Network Service

Do you make firewall exception for your SQL server TCP port if you want connect remotely through TCP provider?
YES

Do you make firewall exception for SQL Browser UDP port 1434?
N/A

[3] Platform:

What is the OS version?
Client - Windows Vista Final w/ SQL Server 2005 SP2 & Network Client SP2

Server - Windows XP Professional SP2 w/ SQL 2005 Server Developer Edition

Do you have third party antivirus, anti-spareware software installed?
None

[4] Misc:

If you have certificate configuration issue: Please use €ścertutil.exe €“v €“store my€? to dump certificate specific info and post it in your question.
N/A

Tips:

1. Find SQL Server Errorlog: Default to C:Program FilesMicrosoft SQL ServerMSSQL.#MSSQLLOG

2007-04-26 15:41:32.34 Logon Error: 17806, Severity: 20, State: 2.
2007-04-26 15:41:32.34 Logon SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT: 192.168.254.100]
2007-04-26 15:41:32.34 Logon Error: 18452, Severity: 14, State: 1.
2007-04-26 15:41:32.34 Logon Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: 192.168.254.100]






[1] Client side:

What is the connection string in you app or DSN?
N/A
If client fails to connect, what is the client error messages?

Is the client remote or local to the SQL server machine?
Remote

Can you ping your server?
YES

Can you telnet to your SQL Server?
YES

What is your client database provider?
SQL Management Studio

Is your client computer in the same domain as the Server computer?
WorkGroup

What protocol the client enabled?
Shared Memory & TCPIP

Do you have aliases configured that match the server name portion of your connection string?
NO

Do you select force encryption on server and/or client?
NO

[2] Server side:



What is the MS SQL version?
SQL Server 2005

What is the SKU of MS SQL?
Developer

What is the SQL Server Protocol enabled?
Shared Memory & TCPIP

Does the server start successfully?
YES

If SQL Server is a named instance, is the SQL browser enabled?
N/A

What is the account that the SQL Server is running under?
Network Service

Do you make firewall exception for your SQL server TCP port if you want connect remotely through TCP provider?
YES

Do you make firewall exception for SQL Browser UDP port 1434?
N/A

[3] Platform:

What is the OS version?
Client - Windows Vista Final w/ SQL Server 2005 SP2 & Network Client SP2

Server - Windows XP Professional SP2 w/ SQL 2005 Server Developer Edition

Do you have third party antivirus, anti-spareware software installed?
None

[4] Misc:

If you have certificate configuration issue: Please use €ścertutil.exe €“v €“store my€? to dump certificate specific info and post it in your question.
N/A

Tips:

1. Find SQL Server Errorlog: Default to C:Program FilesMicrosoft SQL ServerMSSQL.#MSSQLLOG

2007-04-26 15:41:32.34 Logon Error: 17806, Severity: 20, State: 2.
2007-04-26 15:41:32.34 Logon SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT: 192.168.254.100]
2007-04-26 15:41:32.34 Logon Error: 18452, Severity: 14, State: 1.
2007-04-26 15:41:32.34 Logon Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: 192.168.254.100]

View 48 Replies View Related

Pk To Be Initiated Every Time?

Jul 28, 2006

 
i want primary key of table to be inserted automatically. i've set its in desgin table as Identity = Yes; Seed=1
i want my application all other attributes except primary key which i've set atutomatically inserted.
 
but by doing this; it doesn't insert its value. instead it enters 0
 
can u plz help me in doing so?

View 1 Replies View Related

Bulk Copy Error: Received Invalid Row Length X From Bcp Client. Minimum Row Size Is Y

Jul 23, 2005

Hi,I am attempting a bulk copy from a c program into SQL Server 2000 usingDBLib in freeTDS 0.63 RC11 (gcc 3.4.3, RH 9). I am getting an error messagethat I cannot find any documentation on.The server is sending back the following: "Received invalid row length 2from bcp client. Minimum row size is 4."I know the row is longer 2 bytes (see below). Once this happened I created atest table and C program. See below. Anyone with any ideas?ThanksProgram output ---------------->$ ./test_bcpbcp'ing This is a test with a length of 14sentMsg 4807, Level 16, State 1Server 'CENTIVIA_10', Line 1Received invalid row length 2 from bcp client. Minimum row size is 4.done<----------------------Table ddl --------------------->CREATE TABLE [xxx] ([col2] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL) ON [PRIMARY]GO<------------------------------------Compiled using gcc ------------------->gcc -g -I/home/test_user/dev/freetds-0.63RC11/include -Wall -Wno-strict-aliasing-g -O2 -c -o test_bcp.o test_bcp.cgcc -o test_bcp test_bcp.o -L/home/test_user/lib -lsybdb<----------------------------------program source (included the msg and error handlercode) -------------------------->#include <string.h>#include <stdio.h>#include <stdlib.h>#include <sqldb.h>intsyb_msg_handler(DBPROCESS * dbproc, DBINT msgno, int msgstate, int severity,char *msgtext, char *srvname, char *procname, int line){char var_value[31];int i;char *c;if (msgno == 5701 || /* database context change */msgno == 5703 || /* language changed */msgno == 5704) { /* charset changed */if (msgtext != NULL && (c = strchr(msgtext, ''')) != NULL){i = 0;for (++c; i <= 30 && *c != '' && *c != '''; ++c)var_value[i++] = *c;var_value[i] = '';}return 0;}if (severity >= 0 || msgno == 0) {if (msgno > 0 && severity > 0) {fprintf(stdout, "Msg %d, Level %d, State %d",(int) msgno, (int) severity, (int) msgstate);fprintf(stdout, "Server '%s'", srvname);if (procname != NULL && *procname != '')fprintf(stdout, ", Procedure '%s'",procname);if (line > 0)fprintf(stdout, ", Line %d", line);fprintf(stdout, "");fprintf(stdout, "%s", msgtext);fflush(stdout);} else {fprintf(stdout, "%s", msgtext);fflush(stdout);}}return 0;}intsyb_err_handler(DBPROCESS * dbproc, int severity, int dberr, int oserr, char*dberrstr, char *oserrstr){if (dberr == SYBESMSG)return INT_CANCEL;env_set(g_env, "batch_failcount", "1");fprintf(stdout,"DB-LIBRARY error (severity %d, dberr %d, oserr %d, dberrstr%s, oserrstr %s):",severity, dberr, oserr, dberrstr ? dberrstr : "(null)",oserrstr ? oserrstr : "(null)");fflush(stdout);if ((dbproc == NULL) || DBDEAD(dbproc)) {if (dberr != SYBECOFL) {exit(255);}}return INT_CANCEL;}int main(int argc, char *argv[]){DBPROCESS *dbproc;LOGINREC *login;DBINT test_int = 99999999;DBCHAR test_char[32] = "This is a test";dbinit();dberrhandle(syb_err_handler);dbmsghandle(syb_msg_handler);login = dblogin();DBSETLPWD(login, "audit");DBSETLUSER(login, "audit");dbproc = dbopen(login, "192.168.58.1");dbuse(dbproc, "audit_dev");bcp_init(dbproc,"xxx", (BYTE *)NULL, (BYTE *)NULL, DB_IN);printf("bcp'ing %s with a length of%d",test_char,strlen(test_char));//ii = bcp_bind(dbproc, (BYTE *) &test_int, 0, -1, NULL, 0, SYBINT4,1 );//printf("bound %d",ii;bcp_bind(dbproc, test_char, 0, strlen(test_char), NULL, 0, SYBCHAR,1 );bcp_sendrow(dbproc);printf("sent");bcp_batch(dbproc);printf("done");return 0;}<---------------------------------

View 1 Replies View Related

Is It Wrong To Allow User Initiated DDL Commands To Facilitate An Extensible Schema

Jul 20, 2005

I have a client who wants to build a database with a user extensibleschema.The client wants to model an entity with about 100 numeric attributes.As time goes on, more numeric attributes will be added. The clientwants an admin function that will allow him to add these attributeswhen needed.My instinct is that this is wrong and that bad things will happen ifwe build this. However, when I went to write up the reasons, all Icould come up with was that* we would need to write dynamic SQL to handle the changing tablestructure,* that table locking would result from field additions* and that it was "non-standard"One alternative is to create a table containing field-name/valuepairs. This is ugly and breaks the ER modelling rules that tell me yoput attributes of an item into the same row. All the same, I wouldprefer this method to the first approach.This problem does not arise on database projects that follow thepattern of only allowing DDL commands to be issued during the initialdevelopment phase and during subsequent change requests.Have any of you been faced with a similar problem? What should I do?Karen

View 4 Replies View Related

SQL Server 6.5 On MS NT4.0 Workstation

Dec 14, 1999

I recently installed VB6.0 Enterprise on my system. As a part of the installation is the option to install SQL Server 6.5 Development. I elected to install SQL. The install went without any glitches. Upon going into SQL Enterprise Manager, I was asked to register the server where SQL was running.
My understanding was that SQL would allow me to register the name of my host system. (This is a stand alone system with VB6.0 and Sql development 6.5 installed - no network attached). SQL will not allow me to register my server's name as the host server. It says that if cannot connect to the named server. SQLSERVER and SQL EXEC services appear to be running without any problems. Anyone have any idea where I should start or what could be disallowing my connection/registeration of my server. Any help would be greatly appreciated..... Thanks... Tom

View 1 Replies View Related

SQL Server On Win XP Workstation

Jan 7, 2004

Developers wanting to access sql server developer edition on XP workstation in small office network (workgroup) will have problems using windows authentication (trusted connection) if the XP "server" machine has "simple file sharing" enabled.

Simple file sharing in XP can be disabled in control panel - folder options.

For this sneak mode to work accounts with the same user and password should exist on both "client" and "server".

At least it worked for me!

View 1 Replies View Related

Workstation Date

Jan 31, 2006

Hi all!Is there any function in SQL that I can use to get current date fromworkstation? All functions which I tried (now(), getdate() etc.)returns current date from server but I need date from workstation.Regards,Mirnes Lemes

View 3 Replies View Related

Bulk Insert - Bulk Load Data Conversion Error

Jan 17, 2008

Im having some issues with bulk insert.

This is the table:

CREATE TABLE [dbo].[tmp_GA_status](

[GA_recno] [int] NOT NULL,

[GA_desc] [varchar](40) NULL

)


This is the file (unicode):
1|"test1"
2|"test2"
3|"test3"
4|"test4"
5|"test5"
6|"test6"
7|"test7"
8|"test8"


and this is the sql:

bulk insert tmp_GA_status from 'C: empTextDumpGA_status.dta'

with (CODEPAGE='RAW', FIELDTERMINATOR='|', ROWTERMINATOR='
', DATAFILETYPE='widechar')



so yeah, pretty simple. But whatever I do I get this;

Msg 4864, Level 16, State 1, Line 1

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 2 (GA_desc).



So what am I doing wrong ?

View 13 Replies View Related

Remote Admin Using MMC On NT Workstation

May 30, 2000

Hello,

I would like to know if one can adminiter SQL server remotely using MMC on NT workstation? If so, how do you install the MMC and SQL Enterprise Manager Add-in on NT workstation?

Thanks for the help

Kevin

View 1 Replies View Related

Problem Configuring Workstation

Apr 14, 1999

How can I configure my workstation running WIN95 to used the SQL Enterprise Manager from the server end and other utilities. I have installed the client network utility.

Reason to use enterprise manager because I wanted to perform administrative tasks on my workstation and I've installed SQL SERVER 7.0(Standard version with 5 clients)on the WINNT 4.0 server.


Can anyone helps?

View 1 Replies View Related

SQL 2000 Standard Ed. On W2k Workstation?

Jul 4, 2001

Hi there,

I need to use transaction replication between 2 DB Servers. One is running
W2k Server, the other is a W2k Workstation.

Can I install the SQL 2000 Standard edition on the Workstation in order to
implement Transaction replication?

are there other posibilities/suggestions?

Any help highly welcome!
Volker

View 1 Replies View Related

Connection Problem With The Workstation

Jul 23, 2005

Hi all;I am trying to replicate our database by using the merge replication.[color=blue]>From server side I tried to connect to the workstation. I have[/color]installed MSDE to the client machine. I can see the machine name on theSQL Server Group however I wasnt able to create the conncetion betweenthe machines. I have checked my network connection, there is no problemI can see the machine and I can connect it through the network. I triedto use Client Network Utility with Named Pipes and TCP/IP but not agood news. I couldnt achieve to connect to the machine. So couldsomeone please help me out with this problem. I am really in trouble Ihave to find out this end of this week.RegardsAs

View 3 Replies View Related

How To Find Out Workstation Name From Net_address

Jul 20, 2005

Hi,Is it possible to know workstation name from data in columnnet_address from master..sysprocesses?TIA

View 2 Replies View Related

Can't Install Workstation Components

Mar 10, 2008



I've got VS 2008 Pro installed, as well as SQL Sever 200 (which I must keep installed). When I run the install for SQL Server 2005 developer edition, it continually fails to install

SQL Setup Support Files
SQL Native Client
Backward Compatability Files
SQLXML4
Workstation Components

I'm at a complete loss here. I've googled the problem, and apparently this is not uncommon. Is there a good resolution to this?

View 6 Replies View Related

Cannot Install Anything But Workstation Components Etc.

Mar 4, 2008

Hi,

I had a perfectly good working copy of SQL Server 2005 installed. However, at some point I needed the Report Services Designer so I could edit my reports in Visual Studio. I inserted the CD and selected the feature from the list and it installed. Only problem being that it has completely removed my Management Studio and practically every other tool I didnt explicitly checked when installing the RS Designer.

When I tried to run the same Setup again and check everything, it tells me that there is no change between what I have selected and what is installed, which sounds like total bs to me, since my pc doesnt have a management studio etc anymore.

Out of pure misery I decided to remove my entire SQL Server installation, inc Instance, hoping to start anew and achieve the result I wanted with the least amount of frustration. I ended up here and followed it all the way: http://support.microsoft.com/kb/909967

When I started reinstalling, I ran into something new. The installer refuses to let me install anything but the Workstation components, books online and development tools. All the other options are greyed out and not even available.

Someone please help me get my SQL Server back up and running because I'm getting hopeless.

-DeV

View 5 Replies View Related

Workstation Components Not Available At All On SS 2005 X64 CD For X86 XP?

Aug 9, 2006

It appears that there is no way to install SQL Server 2005 Workstation Components on an x86 operating system (XP in this case) if you have the x64 install disks (Standard Edition). Can someone verify this?

I am finding it hard to believe that workstation components for a standard Windows client environment are not distributed with the version of SQL Server that matches Windows 2003 x64.

Thanks,
Chris

View 1 Replies View Related

I Don't Suppose BULK UPDATE Exists?... Like BULK INSERT?

Sep 27, 2007

I have to update a field within a table of 60 records or so. Each record has a different field value. it's type varchar. i was given an excel file with the field values and was thinking of a bulk update like bulk insert, but i don't recall that it's possible that way.

Is the only way to create a table, bulk insert, then merge the two tables together with UPDATE?

Just wanted to see if there was an easier way to do it, otherwise i'll take the latter route. Thanks!

View 1 Replies View Related

Cannot Fetch A Row From OLE DB Provider BULK With Bulk Insert Task

Nov 23, 2005

Hi, folks:

View 18 Replies View Related

Client With Tcp/ip Produce &#34;time Out Error&#34; While Same Client While Switced To Named Pipes

May 28, 2001

We have 15 clients running our applicaton
14 of then conected to SQL server using TCP/IP and it runs fine

1 of 15 when connected using TCP/IP produce "..Time out error "
but runs fine when swiched from TCP/IP to Named pipes

1.What area should we look to correct problem with Time out using TCP/IP ?
2. Where to get information about using TCP/IP via Named pipes ?

View 1 Replies View Related

Install SQL Server2005 Error:[Native Client]Encryption Not Supported On The Client

May 10, 2006

Product: Microsoft SQL Server 2005 -- Error 29515. SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client]Encryption not supported on the client. Refer to server error logs and setup logs for more information. For details on how to view setup logs, see "How to View Setup Log Files" in SQL Server Books Online.

View 78 Replies View Related

Client Unable To Establish Connection Encryption Not Supported On SQL Server. (Microsoft SQL Native Client)

May 2, 2006

On Windows XP systems I get the following issue when trying to browse the MSDB folder in SSIS

Client unable to establish connection
Encryption not supported on SQL Server. (Microsoft SQL Native Client)

I have noticed another post where several others have noticed the same issue. It appears to only occur on Windows XP installations. Is there a workaround or fix for this?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved