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.
I have a problem retrieving data from a linked SQL Server 6.5 server in version 7. I have set-up the server as a linked server and most operations occur with no problem. With some tables, though, I get the following error when I attempt to query any column of data:
Server: Msg 7356, Level 16, State 1, Line 1 OLE DB provider 'SQLOLEDB' supplied inconsistent metadata for a column. Metadata information was changed at execution time.
This occurs consistently for a subset of tables. I cannot see any pattern to the configuration of these tables that would make them any different to those where a query succeeds.
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.
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?
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?
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.
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!
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.
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?
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.
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?
// 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);
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.
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?
I am trying to setup up a linked server in our test environment that allows Server A to run a stored procedure that writes to server B. However, I am receiving the following errors when attempting to make the connection and execute the stored procedure.
OLE DB provider "SQLNCLI" for linked server "TEST2" returned message "Invalid authorization specification". Msg 7399, Level 16, State 1, Procedure Test_SP, Line 230 The OLE DB provider "SQLNCLI" for linked server "TEST2" reported an error. Authentication failed. Msg 7303, Level 16, State 1, Procedure Test_SP, Line 230 Cannot initialize the data source object of OLE DB provider "SQLNCLI" for linked server "TEST2".
I've created a user (linkuser) that has db_reader/db_writer access to the destination box. I'm using SQL Server under the Server type on the General Tab. I've added the user(linkuser) as the local login to impersonate on the destination box. However, the stored procedure is still erroring. Any Suggestions?
This connection string works for Vista 64bit but not for Vista Business 32bit...
What have I done so far to the Vista Business 32bit... 1. Downloaded/Installed SQLNCLI from Microsoft Site 2. Tested the connection string several ways with no luck... 3. Was able to get Vista Business 32bit to connect via a File DSN with the same credentials... DSN route is not an option for this app...
I am linking to another SQL Server database to extract data into my own system. Following an increase in size on one of the columns in a table I am extracting, I am getting 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 148'
The column short_description has been increased from 100 to 1024. Writing a simple query, SELECT (max(len(short_description)) FROM dbo.Peregrine_Problem will generate the error, but if I embed the same SQL into an Excel VBA macro and connect to the server, it happily returns the result 1024. Our Access databases also link to the table on the remote server and handle the increased column size properly.
I have done everything I can think of, including deleting the linked server within SQL Server MS, and recreating it, but I can't override the setting of 100.
and it works fine if the database on PRIMARY is alive. however when the mirror has failed over to SECONDARY and PRIMARY is no longer available, I get the following when I try to query the database via the linked server:
OLE DB provider "SQLNCLI" for linked server "MIRROR" returned message "Login timeout expired". OLE DB provider "SQLNCLI" for linked server "MIRROR" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". Msg 10061, Level 16, State 1, Line 0 TCP Provider: No connection could be made because the target machine actively refused it.
As far as I can tell, it doesn't try to contact SECONDARY at all. It seems like SQL Server is ignoring the FailoverPartner attribute.
If I switch PRIMARY and SECONDARY in the connection string (ie @provstr=N'Server=SECONDARY;FailoverPartner=PRIMARY;') then it works when SECONDARY is online, but not when the mirror has failed back to PRIMARY.
I have .NET Framework 2.0 and Visual studio 2005 installed on my machine. I also have SQL Server 2000 Developer Edition installed with Service Pack 4.
When I try to install SQL Server 2005 express, I get an error when the setup tries to install SQL Native Client. I have read many forums, but couldnt find a resolution. I can not see SQL Native Client in my Add Remove Programs either.
I tried to unzip the SQLEXPR.exe into a temp folder and when I right click sqlncli.msi and say Repair or Uninstall. It says "This action is valid for products that are currently installed."
When i try to run the sqlncli.msi file ..i get an error message saying "Installation of Microsoft SQL Server Native Client failed because a higher version already exisits on the machine. To proceed uninstall the higher version and then run Microsoft SQL Server Native Client Setup"
Please help as I am unable to install SQL Server 2005 Express.... SQL Server Native Client -- Set up failed SQL VSS Writer -- Set up failed Database Services -- Set up failed
Thank you in advance
Log mesg -==
Verbose logging started: 12/17/2007 23:18:36 Build type: SHIP UNICODE 3.01.4000.4039 Calling process: c:Program FilesMicrosoft SQL Server90Setup Bootstrapsetup.exe === MSI (c) (74:B4) [23:18:36:828]: Resetting cached policy values MSI (c) (74:B4) [23:18:36:828]: Machine policy value 'Debug' is 0 MSI (c) (74:B4) [23:18:36:828]: ******* RunEngine: ******* Product: {50A0893D-47D8-48E0-A7E8-44BCD7E4422E} ******* Action: ******* CommandLine: ********** MSI (c) (74:B4) [23:18:36:828]: Client-side and UI is none or basic: Running entire install on the server. MSI (c) (74:B4) [23:18:36:828]: Grabbed execution mutex. MSI (c) (74:B4) [23:18:36:828]: Cloaking enabled. MSI (c) (74:B4) [23:18:36:828]: Attempting to enable all disabled priveleges before calling Install on Server MSI (c) (74:B4) [23:18:36:828]: Incrementing counter to disable shutdown. Counter after increment: 0 MSI (s) (100) [23:18:36:828]: Grabbed execution mutex. MSI (s) (10:E0) [23:18:36:843]: Resetting cached policy values MSI (s) (10:E0) [23:18:36:843]: Machine policy value 'Debug' is 0 MSI (s) (10:E0) [23:18:36:843]: ******* RunEngine: ******* Product: {50A0893D-47D8-48E0-A7E8-44BCD7E4422E} ******* Action: ******* CommandLine: ********** MSI (s) (10:E0) [23:18:36:843]: Machine policy value 'DisableUserInstalls' is 0 MSI (s) (10:E0) [23:18:36:843]: User policy value 'SearchOrder' is 'nmu' MSI (s) (10:E0) [23:18:36:843]: User policy value 'DisableMedia' is 0 MSI (s) (10:E0) [23:18:36:843]: Machine policy value 'AllowLockdownMedia' is 0 MSI (s) (10:E0) [23:18:36:843]: SOURCEMGMT: Media enabled only if package is safe. MSI (s) (10:E0) [23:18:36:843]: SOURCEMGMT: Looking for sourcelist for product {50A0893D-47D8-48E0-A7E8-44BCD7E4422E} MSI (s) (10:E0) [23:18:36:843]: SOURCEMGMT: Adding {50A0893D-47D8-48E0-A7E8-44BCD7E4422E}; to potential sourcelist list (pcode;disk;relpath). MSI (s) (10:E0) [23:18:36:843]: SOURCEMGMT: Now checking product {50A0893D-47D8-48E0-A7E8-44BCD7E4422E} MSI (s) (10:E0) [23:18:36:843]: SOURCEMGMT: Media is enabled for product. MSI (s) (10:E0) [23:18:36:843]: SOURCEMGMT: Attempting to use LastUsedSource from source list. MSI (s) (10:E0) [23:18:36:843]: SOURCEMGMT: Processing net source list. MSI (s) (10:E0) [23:18:36:843]: Note: 1: 1706 2: -2147483647 3: sqlncli.msi MSI (s) (10:E0) [23:18:36:843]: SOURCEMGMT: Processing media source list. MSI (s) (10:E0) [23:18:36:843]: SOURCEMGMT: Trying media source G:. MSI (s) (10:E0) [23:18:36:843]: Note: 1: 2203 2: G:sqlncli.msi 3: -2147287038 MSI (s) (10:E0) [23:18:36:843]: SOURCEMGMT: Source is invalid due to missing/inaccessible package. MSI (s) (10:E0) [23:18:36:843]: Note: 1: 1706 2: -2147483647 3: sqlncli.msi MSI (s) (10:E0) [23:18:36:843]: SOURCEMGMT: Processing URL source list. MSI (s) (10:E0) [23:18:36:843]: Note: 1: 1402 2: UNKNOWNURL 3: 2 MSI (s) (10:E0) [23:18:36:843]: Note: 1: 1706 2: -2147483647 3: sqlncli.msi MSI (s) (10:E0) [23:18:36:843]: Note: 1: 1706 2: 3: sqlncli.msi MSI (s) (10:E0) [23:18:36:843]: SOURCEMGMT: Failed to resolve source MSI (s) (10:E0) [23:18:36:843]: MainEngineThread is returning 1612 MSI (c) (74:B4) [23:18:36:859]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1 MSI (c) (74:B4) [23:18:36:859]: MainEngineThread is returning 1612 === Verbose logging stopped: 12/17/2007 23:18:36 ===
and it works fine if the database on PRIMARY is alive. however when the mirror has failed over to SECONDARY and PRIMARY is no longer available, I get the following when I try to query the database via the linked server:
OLE DB provider "SQLNCLI" for linked server "MIRROR" returned message "Login timeout expired". OLE DB provider "SQLNCLI" for linked server "MIRROR" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". Msg 10061, Level 16, State 1, Line 0 TCP Provider: No connection could be made because the target machine actively refused it.
As far as I can tell, it doesn't try to contact SECONDARY at all. If I switch PRIMARY and SECONDARY in the connection string (ie @provstr=N'Server=SECONDARY;FailoverPartner=PRIMARY;') then it works when SECONDARY is online, but not when the mirror has failed back to PRIMARY.
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.
i am try to execute a command " SELECT * FROM [SQLSERVER].[DATABASENAME].[DBO].[TABLE] ".. but i am receiving a error message
Msg 7319, Level 16, State 1, Line 19
The OLE DB provider "SQLNCLI" for linked server "SQLSERVER" returned a "NON-CLUSTERED and NOT INTEGRATED" index "MSmerge_index_1348915877" with the incorrect bookmark ordinal 0.
but when i try to check the linked server it's shows me the linked is okay.. The following command i use to check wethare the link is fine or not..
CREATE TABLE #foo
(
pingResult SYSNAME NULL
);
INSERT #foo
EXEC master..xp_cmdshell
'ping SQLSERVER;
IF EXISTS
(
SELECT 1
FROM #foo
WHERE pingResult LIKE '%TTL%'
)
BEGIN
PRINT 'Feel free to use linked server.';
END
ELSE
BEGIN
PRINT 'Linked server not available.';
END
DROP TABLE #foo;
and Following result i receive..
(13 row(s) affected)
Feel free to use linked server.
Can any One tells me where i m making mistake or how can i resolve this problem
I'm running Server 'A' and Server 'B' which are both on SQL 2005 SP2. Server B connects to Server A using the linked server functionality via the SQLNCLI provider. I am issuing an update statement from a web api in a nested transaction that uses a distrubted transaction.
However, I am receiving the following error :
Unable to start a nested transaction for OLE DB provider "SQLNCLI" for linked server "A". A nested transaction was required because the XACT_ABORT option was set to OFF. OLE DB provider "SQLNCLI" for linked server "A" returned message "Cannot start more transactions on this session.".
I've researched the issue and understand how XACT_ABORT works.
Also, I looked at the Linked Server provider options for SQLNCLI and came accross the Nested Queries option being unchecked. I checked the option and applied it to the Linked Server.
Okay, so after my long post my questions are: Do i need to restart SQL in order for this to take effect? If not, what do i need to do? I 've restarted IIS to no avail .
HiI have an oddity. If I run a piece of SQL:SELECT EmployeeNo, MailToFROM ST_PPS.dbo.Employeewhere AddedOn BETWEEN '01-jan-2006' and '01-feb-2006'AND MailTo NOT IN ( '3', 'x')order by MailToI get the resultsEmployeeNo MailTo----------- ------608384 1606135 1608689 1609095 1607163 1606165 1606472 1608758 1.....for 2594 rowsIf I create a stored procedure with the same SQL:-CREATE PROCEDURE dbo.PPS_testASSELECT EmployeeNo, MailToFROM ST_PPS.dbo.Employeewhere AddedOn BETWEEN '01-jan-2006' and '01-feb-2006'AND MailTo NOT IN ( '3', 'x')order by MailToGOand run it:-EXEC PPS_testI get three extra rowsEmployeeNo MailTo----------- ------607922 NULL606481 NULL605599 NULL606316 1608871 1607427 1608795 1.....for 2597Does anyone know what is happening here? It appears that the clause:-MailTo NOT IN ( '3', 'x')excludes NULL in raw SQL, but includes NULL (correctly I think) in astored procedure.Chloe CrowderThe British Library
I get an error every so often with a DTS package on SQL 7. Error asfollows.The connection is currently being used by a task. The connectioncannot beclosed or re-used.This doesn't happen all the time and I can sometimes (more often thannot) get the DTS package to complete in it's entirety.To explain what the DTS package does...Truncate tables in reporting environment(several in a batch)Clear Transaction LogsCopies data from live environment into CSV (for speed)Copies data from CSV files into tables previously truncated.Builds up a table based on the data copied (for reporting)Clear Transaction logsI'm using a pretty basic set up, Connection (1st DB) -> Transformationto CSV -> Transformation to Connection (2nd DB). It seems to fail oneither the first or second transformation at random (?).I've checked the transformations so that they close the connectionafterwards so it should in theory be releasing the CSV files for thenext step. I suspect that there is a timing issue with this. I cancopy the CSV files over, but this is a little sloppy and I wouldprefer not to do it.Any ideas how to find a tidy way to ensure these are closed bothbefore and afterwards ?ThanksRyan
I am building a report with a recursive hierarchy for drill-down purposes. The hierarchy is built by querying a SSAS OLAP cube and defining a details grouping for the table/matrix.
Every time I run the report one or more of the leaf members in the recursive hierarchy "jumps" up to the highest level. First I thought that this may be due to the fact that the leafs parents are not part of the returned dataset. However, the queries makes sense and the "offending" members does never contain any data (while the query should return only non empty members) which is why this is a very strange behavior. Furthermore, the "offending" member differs between different executions of the report, despite the fact that the parameters is exactly the same and the cube is untouched between executions.
I am actually pressing "View Report", waiting for the report to execute and when I press "View Report" again, the returned datasets seem to differ, yielding different "offending" members in the report.
When I run the queries individually in the Data-tab in BIDS, the returned datasets are always the same. Execution caching is turned off for the report.
Checking against SSRS's ExecutionLog, the RowCount for consecutive executions with the exact same parameters differ. For example, RowCount: 3094 3080 3079 3088 3087
Why does SSRS behave such inconsistently? Any tips or tricks?
I have two servers, DEV and PROD. Now my DEV server works just great, I can connect to the linked server, query, etc... all is well.
So I'm setting up my PROD server and when I go to add the linked server I get:
Cannot initialize the data source object of OLE DB provider "SQLNCLI".... and Unable to complete login process due to delay in opening server connection.
Now I am running SQL Server 2005 and connecting to an SQL 2000 server.
The odd part is that this works just fine on DEV.
When I go to create the linked server I set:
Linked Server: "LinkedServerName"
Server Type: "SQL Server"
and that's it.
I go to Security and enter my DOMAINUSER.ACCOUNT and then enter the login creds for the linked server.
When I click "OK" I get the above mentioned error code.