SQLNCLI Vs SQLSRV32 / SQLBindCol / SQL_WCHAR To SQL_C_CHAR Stopped Working?

Sep 20, 2006

I'm trying to retrieve native character data (SQL_WCHAR) through ODBC into an SQL_C_CHAR buffer using SQLBindCol and SQLFetch.

The database is SQL Server 2005 Developer Edition.

If I use DRIVER={SQL Server}, i.e., use SQLSRV32, everything gets converted properly.

If I use DRIVER={SQL Native Client}, i.e., use SQLCNLI, I apparently get garbage. This is true for ntext, nchar and nvarchar. I also have problems with xml, but I haven't gotten far enough to isolate what's going on with it.

View 3 Replies


ADVERTISEMENT

Help: SQL Error Handling Stopped Working

Jan 11, 2001

Our stored procedure error handling is not working now but did before.

When a severity level 16 (Miscellaneous user error) occurs the batch (stored procedure) exits without processing the next statement which is the error check routine. This is a simple error processing routine and used to work. What could have changed?

I have searched books online and have found nothing on abnormal termination of a SQL batch. I would appreciate some help here.

Loren

View 3 Replies View Related

Enterprise Manager Has Stopped Working!

Oct 4, 2004

I am having a real problem opening a database on a SQL server through EM. The DB is on the machine as I can use EM on another machine and login from there. However, when I try to login to the DB via EM on the actual server I cannot and get an error saying 'Connection failed. Check SQL Server registration properties'.

Even if I change the reg properties it still will not let me access the database, it just keeps giving the same error.

Has anyone seen something like this before?

View 2 Replies View Related

Insert Into Query Stopped Working

Jan 28, 2008

The following query has been working for months and the other day it just stopped. I get no error, it just never finishes. It used to take 20 minutes. Nothing has changed that I know of.

The query is designed to insert the new records from the t_DTM_DATA_STAGING into t_DTM_DATA_STAGING2 using the t_DTM_DATA_1 as the outer join.

Average record count for t_DTM_DATA_STAGING is 2 Million
Current record count in t_DTM_DATA_1 - 267 Million
Both tables have clustered indexes made up of the 10 fields in the join below.

Any Ideas??

SET QUOTED_IDENTIFIER ON
INSERT INTO
[DTM].[dbo].[t_DTM_DATA_STAGING2]
([CP]
,
,[MAJ]
,[MINR]
,[LOCN]
,[DPT]
,[YEAR]
,[PD]
,[WK]
,[TRDT]
,[SYSTEM]
,[AMOUNT]
,[DESCRIPTION]
,[GROUP]
,[VENDOR]
,[INVOICE]
,[IDAT]
,[PO_NUMBER]
,[DDAT]
,[RCV#]
,[RDAT]
,[RSP]
,[EXPLANATION]
,[UPLOAD_DATE]
,[UPLOAD_USER]
,[UPLOAD_NAME]
,[RELEASE_DATE]
,[RELEASE_USER]
,[RELEASE_NAME]
,[TRTM])
SELECT
t_DTM_DATA_STAGING.CP,
t_DTM_DATA_STAGING.CO,
t_DTM_DATA_STAGING.MAJ,
t_DTM_DATA_STAGING.MINR,
t_DTM_DATA_STAGING.LOCN,
t_DTM_DATA_STAGING.DPT,
t_DTM_DATA_STAGING.YEAR,
t_DTM_DATA_STAGING.PD,
t_DTM_DATA_STAGING.WK,
t_DTM_DATA_STAGING.TRDT,
t_DTM_DATA_STAGING.SYSTEM,
t_DTM_DATA_STAGING.AMOUNT,
t_DTM_DATA_STAGING.DESCRIPTION,
t_DTM_DATA_STAGING.[GROUP],
t_DTM_DATA_STAGING.VENDOR,
t_DTM_DATA_STAGING.INVOICE,
t_DTM_DATA_STAGING.IDAT,
t_DTM_DATA_STAGING.PO_NUMBER,
t_DTM_DATA_STAGING.DDAT,
t_DTM_DATA_STAGING.RCV#,
t_DTM_DATA_STAGING.RDAT,
t_DTM_DATA_STAGING.RSP,
t_DTM_DATA_STAGING.EXPLANATION, t_DTM_DATA_STAGING.UPLOAD_DATE, t_DTM_DATA_STAGING.UPLOAD_USER, t_DTM_DATA_STAGING.UPLOAD_NAME,
t_DTM_DATA_STAGING.RELEASE_DATE, t_DTM_DATA_STAGING.RELEASE_USER, t_DTM_DATA_STAGING.RELEASE_NAME,
t_DTM_DATA_STAGING.TRTM
FROM
t_DTM_DATA_STAGING
LEFT OUTER JOIN
t_DTM_DATA AS t_DTM_DATA_1
ON
t_DTM_DATA_STAGING.TRTM = t_DTM_DATA_1.TRTM
AND
t_DTM_DATA_STAGING.TRDT = t_DTM_DATA_1.TRDT
AND
t_DTM_DATA_STAGING.PD = t_DTM_DATA_1.PD
AND
t_DTM_DATA_STAGING.YEAR = t_DTM_DATA_1.YEAR
AND
t_DTM_DATA_STAGING.DPT = t_DTM_DATA_1.DPT
AND
t_DTM_DATA_STAGING.LOCN = t_DTM_DATA_1.LOCN
AND
t_DTM_DATA_STAGING.MINR = t_DTM_DATA_1.MINR
AND
t_DTM_DATA_STAGING.MAJ = t_DTM_DATA_1.MAJ
AND
t_DTM_DATA_STAGING.CO = t_DTM_DATA_1.CO
AND
t_DTM_DATA_STAGING.CP = t_DTM_DATA_1.CP
WHERE
(t_DTM_DATA_1.CP IS NULL)

View 4 Replies View Related

Replication Scripts Stopped Working..

Aug 21, 2007

I have a merge publication that I always create with a script but has now stopped working with what appears to be a complete server problem.

The actual command i am executing is a simple

sp_addpublication_snapshot


but it fails with


Msg 50000, Level 16, State 1, Procedure sp_add_jobstep_internal, Line 253

The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction.

Msg 3931, Level 16, State 1, Procedure sp_MSadd_repl_job_unsafe, Line 376

The current transaction cannot be committed and cannot be rolled back to a savepoint. Roll back the entire transaction.



I have tried recreating the database from scratch, renaming it, renaming the publication, even disabling the publications altogether but it makes no difference. There is nothing in the sql or event logs and I cant do any work until Ive got past it - help!

I am using SQL 2005 SP2 if that makes any difference.

Thanks
Andy

View 6 Replies View Related

Database Backup Has Stopped Working. Cannot Tell Why

Mar 31, 2007

Hi,



I had a Database maintenance plan setup to do complete backup of my SQL Server 2000 database. Same thing was done for the transaction logs as well. And they had resulted in successful backups sometime ago.



But I have noticed that Backups are no longer happening. I cannot find the backup files where they are supposed to land. Some how, I cannot find any error messages relating why the backups are not getting created.



I do not know where I can look up the logs/reports of what possibly is going wrong. I have looked at the usual places and they are not there, for the times I have deliberately tried to submit the jobs.



Any help will be appreciated.



Thanks

Sam

View 3 Replies View Related

MaintPlan Stopped Working No Errors Noted....

Feb 12, 2002

My MaintPlan 1 has stopped working.

Resetting the time to an hour in the future, does not start.

Tonight I'm going to stop and start MSSQL server.

If that does not start the MaintPlan 1, then I'll rebuild a new maint plan.

Is there any way to tell why it may have failed?

I've checked the error logs, the maint plan logs and NT 4.0 sys logs, all indicated the last backup date / time with no other relevant notations.

TIA

JeffP....

View 2 Replies View Related

2000 &> 2005 And Xp_cmdshell Stopped Working!

Jun 18, 2008

Hi,

I'm just moving over one of our databases from SQL2000 to 2005. Everything is working fine, and all web sites are working, however I just can't seem to get xp_cmdshell to function on the 2005 server.

I have enabled xp_cmdshell, and when I run a stored procedure, which writes the contents of one column to a text file, it says "invalid object name". This table is definitely there, and is actually updated earlier on in the same SP, so permissions for that are fine.

This is the line causing the problem (if I take it out, the rest of the SP works no problems):

--write the text file
EXEC master.sys.xp_cmdshell 'bcp "SELECT newslettertext FROM mydatabase.dbo.newsletters" queryout D:ewslettertext extbody.txt -U -P -c'


Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'mydatabase.dbo.newsletters'.

SQLState = 37000, NativeError = 8180
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.
NULL

Could it be to do with permissions on the master.sys.xp_cmdshell? If so, wouldn't it give me a "permission denied" error?

Any help would be greatly appreciated!

Thanks

View 6 Replies View Related

Installed .NET 1.1 Framework And MSDE Stopped Working

Dec 23, 2005

I just upgraded the .NET 1.0 to 1.1 today and now when I launch the Web Data Administrator for MSDE it hangs up as soon as I hit the login button.

I reinstalled MSDE and the Web Data Administrator and that didn't correct the problem.

Help!

View 1 Replies View Related

Executing A Job From A Stored Procedure Stopped Working

Apr 29, 2008



I've got a stored procedure in database A that calls the sp_start_job stored procedure in msdb as follows:

CREATE PROCEDURE xxxxx
WITH EXECUTE AS 'domainusername'

AS

EXEC msdb.dbo.sp_start_job B'jobname' ;

RETURN

The domainusername is the in the database sysadmin role and the owner of the job. To make this work originally, I had to change the msdb database to be trusted.

This worked for the past several months.

Now it doesn't work (perhaps after a reboot but not sure). The error I get is "The EXECUTE permission was denied on the object 'sp_start_job', database 'msdb', schema 'dbo'

I looked to make sure that the account had grant execute rights and it does. I tried setting it via GRANT statement and it was granted successfully yet the error still occurs. I've tried changing accounts and anything else I can think of to no avail.

Any ideas how to troubleshoot this issue. I've tried all the tricks I can think of.

Thanks - SM

View 3 Replies View Related

Query Notification Stopped Working When Inserting Row

Mar 27, 2008

I'm using query notifications and it worked fine as long as I just edited the data that the "query points to" (one table). That is, my graphical represenation of the data (in a gridview) was updated correctly with the new data 1ms after I changed it, just like it should.

When I inserted a new row to the table the query notification stopped working, meaning my gridview wasn't updated. Any idea of why? Also, after this, not even editing of the data made the query notification trigger so it must have totally stopped.

Thanks in advance
ripern

View 3 Replies View Related

Failure Precedence Constraints Stopped Working In My Package

Aug 30, 2006

I had a Send email task linked to my Sequence Containers in my package and it was working fine. Everytime the container fails it would send an email to myself.

At some point all Failure constraints stopped working. Failure constraints work if I add brand new tasks, but with the existing tasks, they don't work. The Task which fails, turns red and execution stops. Next failure task is not executed.

I am not sure what triggered it to stop working. I cannot get anything on the log

Any help is appreciated.



View 2 Replies View Related

SQL 2005 Merge Repl Suddenly Stopped Working

Mar 28, 2006

Hello...

We have had Merge Replication working for the past few months (SQL 2005 to SQL Mobile) and suddenly today the replication URL that points to the SqlCESA30.DLL does not work. I have tried re-running the SQL Mobile virtual folder wizard a few times....resetting IIS and even a re-boot...and still the URL is not available.

Is there anything that might provide some clue as to why this has unexpectedly failed?

thanks for any help!

- will

View 3 Replies View Related

Debugging Stored Procedures With Visual Studio.net Has Stopped Working

Mar 17, 2004

Hi, I used to be able to debug stored procedures via Visual Studio.net 2003. However, this has stopped working. It does not produce an error just simply doesn't work anymore i.e. the breakpoints are by-passed.
I have the correct settings in the Debug configuration section. If any-one knows how to rectify this your help would be appreciated.
I have thought about re-installing the remote debugging functionality on the server. However, our Visual Studio.net discs are with a developer who is away at present.

Thanks in advance
Lee

View 2 Replies View Related

Solution: T-SQL Execution Command Line Utility Has Stopped Working

Jan 19, 2008

Reinstalling SQL Express did the trick

Thought this might help others..

View 2 Replies View Related

Transaction Scope - The Operation Could Not Be Performed Because OLE DB Provider SQLNCLI For Linked Server XXX_LINKED_SERVER Was Unable To Begin A Distributed Transaction. OLE DB Provider SQLNCLI&a

May 15, 2008

Hello, I've a problem with a software developed in C# with the framework 2.0. This is the error I receive : The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "XXX_LINKED_SERVER" was unable to begin a distributed transaction. OLE DB provider "SQLNCLI" for linked server "XXX_LINKED_SERVER" returned message "No transaction is active.". If I try directly to restart the process, it works fine. Is there someone who can help me ? This is the process 1. In C# --> Call of a Query : select from the linked server (db in sql 2005) and insert into a table SQL 2005 2. In the C# --> using (TransactionScope scope = new TransactionScope()) and insert in a table in SQL 2005 which is link server Thank in advance.

View 1 Replies View Related

SQLSRV32.DLL

Sep 11, 2007

Hi,

In moving a working data warehouse solution in SQL Server 2000 from Windows 2000 Server (32 bit) to Windows 2003 Server Enterprise Edition x64 edition, we are finding that we are unable to access the database.

Is this due to not using a 32bit ODBC driver ? Is there a specific MDAC version or SQL Server 2000 SP we should be using?


Much appreciated,
Julie

View 7 Replies View Related

Connecting To SQLServer 2000 (sqlsrv32.dll)

Oct 14, 2004

Hello,

I am having problem with our network. We run a clinic database system that uses SQLServer 2000 Enterprise as the backend, and Microsoft Access on the front end.

I have had a running problem with all our newer machines (which run Windows 2000 or XP) in that while it connects to the server and retrieves some of the info properly, on some of the pages it doesnt. It will take 2 or 3 minutes for a page of the database to load, and even then not all the information will be retrieved properly.

I was able to fix the problem on the Windows 2000 machines by replacing the Sqlsrv32.dll file with an older version (usually with 3.70.06.23). And then the W2000 machines would work. But for some reason, the XP machines wont accept the older sqlsrv32.dll file...it gives me this error:
SQLState: 'HY000'
SQL Server Error: 126 Unable to load communication module driver correctly.

....and i cant seem to downgrade the MDAC....

any ideas on what I can do?

thanks

View 2 Replies View Related

Provider=SQLNCLI.1

Sep 26, 2007

hi guys,

I'm using MS SQL Server 2005 with MDAC 2.8. When I test my project into TCP/IP, the project does not pick the records completely.

My connection string is using Provider=SQLNCLI.1

Do I need to install SQL Native Client to work-stations ?
Do I need to remove the MDAC ?

Than you.

View 3 Replies View Related

SQLNCLI And Kerberos

Oct 4, 2007



I have a strange problem.

On almost all clients I can connect to mys database server using sqlcmd -S <server> and the connection is authenticated using kerberos.

One one of my clients the command fails. When I have Named Pipes enabled the connection works fine but is made with NTLM authentication.

All servers and clinets are members of the same domain and thay are ll on the same LAN segment. No firewalls are active anywhere.

Where do I look for a solution?

View 3 Replies View Related

SQLNCLI.MSI And APPGUID

May 8, 2008

Hello Folks,

We are using the Redistributable installer for the SQL Native client, SQLNCLI.MSI, with our solution. On MSDN here: http://msdn.microsoft.com/en-us/library/ms131334.aspx it recommends using the APPGUID keyword to specify your application product code. This is to ensure that the installer will know the dependancy between the Native Client and your application.

Unfortunately there doesn't seem to be much info around APPGUID itself. Does anyone know how that ID is generated? What the rules around it are? Or just some better definition of where it comes from?

Thanks, Mark

View 1 Replies View Related

Sqlncli.msi Could Not Be Opened

Mar 23, 2007

I was trying to update a named instance of SQL Express SP1.  I double clicked it and during extraction I get this error message:

The file C:Document and SettingsByersNLocal SettingsTempBSISQLEXP05TRACTsetupsqlcli.msi could not be opened. 

SQL Express came bundled with another porgram so I'm thining it could be a bad cd.  I also thought about reinstalling Windows Installer 3.1.  Anybody experience this error?

 

 

 

View 3 Replies View Related

SQLNCLI + Security Issue

May 29, 2008



I recently my hosting company to provide SQLNCLI provider for MS SQL2005 DB. Right now, they are only providing SQLOLEDB provider for connection.

Connection is slow and unreliable at this point using sqloledb while it was running fine with SQL 2000 db.

When I asked them for SQLNCLI, they replied...

------------------

Unfortunately we cannot install the SQLNCLI driver for MSSQL 2005 as it runs under the system context which would be a security risk to the server. I apologize for the inconvenience.

If you have any questions or require additional assistance, please do not hesitate to contact our support team anytime at

----------------------

How true is this? Will it be really risk? It doesnt make sense to me if this would be risk why microsoft even will produce it.

Can anyone throw some light on this issue?

Thanks

View 1 Replies View Related

Looking For ADO.NET Using SQLNCLI Code Snippet -- Please Help

Oct 17, 2006

I'm looking for some code snippet that will allow me to use ADO.NET and the SQL Native client for database failover scenarios.

Currently what I have does not work and am running out of options.

I would greatly appreciate any help.

Thanks,

Luis B

View 2 Replies View Related

Setup Cannot Find Sqlncli.msi

Feb 7, 2008



I have spend days trying to install SQLEXPR_ADV.EXE. I need it to run the Pinnacle Studio 10 installation fully. I have managed to switch on all the services that the set up demanded, but I keep getting stuck because the installation cannot find sqlncli.msi. I have a copy of it from the SQL site, but where do I stick it so that the installer can find it. I have tried to place it in the SQL directory in Program Files, I have placed it in the folder which is generated by the installer, I have sat it next to the Installer itself but to no avail. I have installed the msi independently nd the process says that it was successfully installed but the SQL2005 Express Installed still cannot find it.
Help!

View 4 Replies View Related

Programmatically Create SQLNCLI DSN

Apr 22, 2008

Hi all,

I need to be able to create a DSN through code that connects to SQL Server using SQL Native Client. I have found the following article: http://support.microsoft.com/kb/q184608/. This demonstrates most of what I need, but it does not show how to set the username and password, which is something that I need to do.

Any ideas how I can do this?

Regards,

Stephen.

View 8 Replies View Related

Setup Failed - No Package &&<sqlncli.msi&&>

Nov 10, 2005

I tried to install a sql 2005 desktop engine. This fails with the error: An installaton package for the product Microsoft SQL Server Native Client cannot be found. Try the installation again using a valid copy of the installation package €˜sqlncli.msi€™   I used a fresh, new download SQLEXPR.EXE. What shall I do?
 

View 84 Replies View Related

SQLNCLI Linked Server Error

Oct 30, 2007

I've been assigned with finding the issue behind this error on one of our production systems:




TCP Provider: The semaphore timeout period has expired. [SQLSTATE 07008] (Error 121) OLE DB provider "SQLNCLI" for linked server "SERVER1" returned message "Communication link failure". [SQLSTATE 01000] (Error 7412). The step failed.




I've Googled the error to death, searched the forums here and at other SQL sites as well and have found nothing that points me at the cause. I've found the individual parts of the error but not the whole. Maybe I've just been looking at it too long and am missing something simple. Anyone have any ideas?





These are two linked SQL2005 64bit enterprise Win2k3 servers. The error comes when an automated daily job is run. Sometimes it happens at once, sometimes after 5 minutes, sometimes after an hour. I can see nothing wrong with the server itself or the network.




Thanks in advance.

View 2 Replies View Related

'SQLNCLI' Supplied Inconsistent Metadata

Dec 20, 2007



I am running a SQL2K on a Server2K box. I have linked servers to SQL2005 Express on WinXP. I am trying to get data off of the SQL2005 DB to the central DB on SQL2K. This has been running for about a year. I am now getting an error message as follows:

Server: Msg 7356, Level 16, State 1, Line 1
OLE DB provider 'SQLNCLI' supplied inconsistent metadata for a column. Metadata information was changed at execution time.
OLE DB error trace [Non-interface error: Column 'TestVarChar' (compile-time ordinal 2) of object '"WKS"."DBo"."testtable"' was reported to have changed. The exact nature of the change is unknown].

When I run the following Queries on the SQL2K box:
SELECT * from WKSA400.WKS.DBo.testtable

or

SELECT * from OPENQUERY(WKSA400, 'SELECT * from WKS.DBO.testtable')

I did notice that if my testtable has only numeric fields, it works fine. It only has a problem with alphanumeric fields.

If I run 'exec sp_tables_ex WKSA400' on the SQL2K, it works fine. I get a listing of all the tables on the remote server. This tells me that my security is fine. It seems to be a conversion from the 2005 to 2000 SQL. If it had not been working for over a year, the dent in the wall the size of my head would be much smaller.

View 7 Replies View Related

How To Drop A Database In OLEDB (SQLNCLI)?

Apr 24, 2008

Howdy Folks!

So I tried the typical IDBDataSourceAdmin:estroyDataSource() command to destroy an existing sql server 2005 express database and guess what it returned:

E_NOTIMPL (not implemented)

This leaves me in the dark on how I'm supposed to drop an existing database in SQL Native Client OLEDB. Any ideas?

My specific code is:

//Set initialization properties.
hr = m_pIDBInitialize->QueryInterface(IID_IDBProperties, (void **)&m_pIDBProperties);
CHKHR(hr, L"Failed to obtain IDBProperties interface", _ExitCreate);

// Sets properties in the Data Source and initialization property groups
hr = m_pIDBProperties->SetProperties(uiNumPropsets, dbpropset);
CHKHR(hr, L"Failed to set data source properties", _ExitCreate);

//Attempt to initialize connection
hr = m_pIDBInitialize->Initialize();
hr = m_pIDBDataSourceAdmin->DestroyDataSource();
hr = m_pIDBInitialize->Uninitialize();

Thanks!!

View 8 Replies View Related

SQLNCLI - Login Timeout Error

Jul 10, 2007

Hi,

I just migrated a SQL7 instance into SQL2005. Use the backup and restore method. The following was the steps done :

1) Database Backup from sql7 and restore on sql2005

2) Create user on sql2005

3) Configure SQL Native client for instance

- When apps tried to access the server, they encounter the following error

Could not find server ServernameSQL7 in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers. - /elogs/lib/db.asp, line 70

4) As requested, i ran sp_addlinkedserver Servername. After which the apps got back with this error

OLE DB provider "SQLNCLI" for linked server "Servername" returned message "Login timeout error" - /elogs/lib/db.asp, line 70

I am unsure of how to proceed from here. Please assist.

Thanks and Regards,

Siva

View 6 Replies View Related

Setup Or Check The Sqlncli.msi Package...

Jun 20, 2007

Hi~~.

In client side, the sqlncli is needed.

Below is the script of installing sqlncli.msi package.



msiexec /i sqlncli.msi /quiet /norestart /le C:sqlncli.log



Question is, how can I check the installation?

If it is already installed skip the installing process.

If not install the package.

View 1 Replies View Related

SQLNCLI Gives Wrong Column Data From Linked Svr

Apr 8, 2008

I am running an SSIS package to extract data from a source SQL Server database to our own database. The source is on a linked server. The package worked until a column size was increased on a table on the source.

If I run a query against the linked server table I get the following error:

'OLE DB provider 'SQLNCLI' for linked server 'GSC-RPT.SVR.BANKONE.NET' returned data that does not match expected data length for column '[GSC-RPT.SVR.BANKONE.NET].[Peregrine].[dbo].[scProblem].short_description'. The (maximum) expected data length is 100, while the returned data length is 160.'

I've tried deleting the links and recreating them. Nothing works. I don't understand why my database query is expecting a data length of 100. Why does it not pick up the definition of the field length from the linked server? How has it retained this expectation when I have deleted the linkage and recreated it?

View 2 Replies View Related







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