We recently copied(replicated) a data base for development. everything went
well until yesterday we had rows start to disappeared in the source data
base. I then found out that the rows disappearing from the source data base
were being deleted from the database copy and this was being replicated in
the source database. I am sure this is a great feature but I need to stop
it from doing this. HELP
I'm about to start a project to design an RTOS application that also will communicate with some sort of relational data base accessed by SQL-commands (this is as general as a description can get, I know) For various reasons I am forced to use wind-rivers VxWorks plattform for my development.
So my questions are these: - Does anyone of you know what types of SQL-data bases that the latest VxWorks plattform supports ? - Does the Tornado design environment provide ready made objects for Microsoft SQL-server, Oracle and/or MySQL for instance ?
I would really appreciate anwers or deferance to some forum where I can get answers on these topics !
I want in one query return columns from tables where exist in different sql bases.
In MS Access can link tables from many defferents sql bases or other MSAccess bases and finally can make a simple query where return columns from tables where exist in different bases.
How can i have the same functionality in Visual Basic .Net 2005 (or Visual Basic 6.0)
I have a record that I want to insert into (2) tables. The first thing I want to do is see if a record already exists in the table for the user, if it does - I just want to skip over the insert.
next I want to do the same thing in the SW_REQUEST table. If there is a record in there for the member, I want to just skip the insert.
My code works as long as there isn't an existing record in the tables. Can someone give me a hand?
Here's what I have (and it doesn't work)
CREATE PROCEDURE b4b_sw_request
@FName as varchar(50)= NULL, @LName as varchar(50)=NULL, @Address1 as varchar(100) = NULL, @Address2 as varchar(100) = NULL, @City as varchar(50) = NULL, @State as char(2) = NULL, @Zip as char(5) = NULL, @Email as varchar(100) = NULL, @Send_Updates as smallint = '0'
AS
IF EXISTS (SELECT FName, LName, Address1, Zip from MEMBERS WHERE FName = @FName AND LName = @LName AND Zip = @Zip) BEGIN RETURN END
ELSE BEGIN INSERT INTO MEMBERS (FName, LName, Address1, Address2, City, State, Zip, Email) Values (@FName, @LName, @Address1, @Address2, @City, @State, @Zip, @Email) END
IF EXISTS (SELECT MEMBER_ID FROM SW_REQUESTS WHERE MEMBER_ID = @@Identity) BEGIN RETURN END
ELSE BEGIN INSERT INTO SW_REQUESTS (MEMBER_ID, Send_Updates) Values (@@Identity, @Send_Updates) END GO
I want to create a line chart showing the bases, split by 6 month periods, on the X axis and a count on the Y. I have tried but am well and trult stuck!
Hey there! I've take a look around the forum and didn't find anything about my problem. The SelectCommand of my SqlDataSource get data from 3 tables. SqlDataSource.SelectCommand = "SELECT [sa_Profil].[ID], [Nom], [Prenom], [Telephone], [ID_Reference], [ID_Appel], [Nom_Reference], [Type_Appel] FROM [sa_Profil], [sa_Suivi], [sa_Reference], [sa_Appel] WHERE [sa_Profil].[ID] = [ID_Profil] AND [ID_Reference] = [sa_Reference].[ID] AND [ID_Appel] = [sa_Appel].[ID]" How can I wrote my InsertCommand & UpdateCommand ? I mean, INSERT INTO Table1 Table2 ... doesn't exist ... Thanks for your help!
I have an ODBC DSN that lets me see the data via Access, however, in EM I set up the DB2 server as a linked server using the OLEDB provider for ODBC, with a Linked server name of DB2DB, a product name of MY DB2 connection and the data source of db2 (which is the DSN name) The Provider string, Location and Catalog I leave blank Under security, I assign all users to be a valid username/password
I can then see the tables in EM, but when I try to query them in QA I get this
Select * from db2db...customer
Server: Msg 7313, Level 16, State 1 Line 1 Invalid Schema or catalog specified for provider 'MSDASQL'
I am using SS7.0, and DB2 connect V7.1 I do not have/use SNA server
My actual requirement is to have a job autmatically run every day to copy certain records onto the SQL Server, but the first step is to be able to query the DB2 data
any ideas ? I think I need to enter something in the catalog box, but what ?
I am trying to run a select statements against linked server. I have NT server running SQL7 Enterprice and Rumba2000. I used Rumba driver to configure a DSN (ODBC based) to a AS400/DB2. Then I created a linked server. Good news are : I can see a list of tables. Bad news : when I am trying to run a select statement either through stored procedures or directly in SQL analyzer I am receiving error message Object 'linkedservername.databasename.tablename' doesn't exist. What am I missing here?
my problem is about the slow execution of a query.
I have two database located in two different servers. The servers are linked with the linked server connection made with the enterprice manager.
The databases structure is the same and I copy some data from a database to the other with the following query:
INSERT INTO DATASERVER.RESULTS.dbo.Tab_Tests SELECT * FROM LINESERVER.WIP.dbo.Tab_Tests WHERE ID_Result = '{76271FC1-9470-4EF7-A403-000CF75C2215}' OR ID_Result = '{08C8EEB9-CD22-4CF9-8269-8C1CC58C752B}' OR ID_Result = '{B7B7EED1-36E4-48FA-9636-ABBE62AAE04D}' OR ID_Result = '{8F7BA69E-D2CE-4EB2-BBC4-AFFA165CE0CE}' OR ID_Result = '{273CB805-945F-4EFA-AE20-BC4E0898A19F}'
Everything works till the database grows up more than 400 MB.
Also if I select one result, that consist of some records, the query is very slow and the CPU is working over the 75 %.
I ask you if my working way is corret or if you have some solution or some explanation for me.
I have a linked server that was built on PostgreSQL database connection. When I try to query one of the tables in the linked server it is giving attached error.
My customer has a .NET application that reads meta data from SQL Server, Oracle, DB2, and several propritary databases. Because each DBMS stores the meta data using various techniques, they have written custom code for each DBMS. They are working on a generic ODBC/OLEDB suppport, but in the interim I was trying to use SQL Server to link to an Access database. The Access linked server works fine for queries in Query Analyzer, but I would like to be able to programatically read the metadata for an Access DB (tables, columns, types, etc) via the linked server. SQL Server's usual mechanism for storing meta-data in the Master database aparently is not used for Linked Servers.
Does SQL Server expose Linked Server meta data? How would one retrieve this meta data if it is exposed?
I have a server that is used to query other servers to ensure that things are functioning correctly. On some of our servers we are running ServiceBroker and some of the monitoring involves querying the SYS.CONVERSATION_ENPOINTS view on these servers.
When I query the SYS.CONVERSATION_ENPOINTS view over a linked server it returns zero rows, though when I run the same query locally it returns data. I initially thought it was a permission issue but it seems I can see data across the linked server to other system views within the sys schema (ie sys.all_objects).
Is there something different/special about SYS.CONVERSATION_ENDPOINTS that prevents me from seeing its data across linked servers or have I simply got permission problems.
I need to link some data from SQL Server 2005 with Oracle 10 data.One way is to link Oracle server to SQL Server and use ROWSOURCE forretrieving data.What other ways for joing data from both databases exist ?Can I do it from SQLCRL VB - Stored Procedure ? If yes, what objectsshall I use for opening database and running an sql ? When I tried to import system.data.oracleclient, it was not available. Do I need to install anything for being able to use it ? Thanks a lot.
I use the following SQL to set up a linked server with Excel and attempt to retrieve data. The c: empauthors.xls is downloaded from the second page of the article above.
EXEC sp_addlinkedserver 'EXCEL', 'Excel', 'Microsoft.Jet.OLEDB.4.0', 'c: empauthors.xls', NULL, 'Excel 8.0', NULL GO SELECT * FROM EXCEL...Sheet1$ GO
The query sets up the linked server OK, and retrieves the field names, but no data is returned. The results in Management Studio are a list of column names:
au_id au_lname au_fname phone address city state zip contract
then an error:
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "EXCEL" returned message "Unknown". Msg 7321, Level 16, State 2, Line 1 An error occurred while preparing the query "SELECT `Tbl1002`.`au_id` AS `Col1004`,`Tbl1002`.`au_lname` AS `Col1005`,`Tbl1002`.`au_fname` AS `Col1006`,`Tbl1002`.`phone` AS `Col1007`,`Tbl1002`.`address` AS `Col1008`,`Tbl1002`.`city` AS `Col1009`,`Tbl1002`.`state` AS `Col1010`,`Tbl1002`.`zip` AS `Col1011`,`Tbl1002`.`contract` AS `Col1012` FROM `Sheet1$` `Tbl1002`" for execution against OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "EXCEL".
Does anyone know how to resolve this? I'm using Windows Authentication to connect to a SQL server (9.0.3054) instance on localhost, and am running from a test database query window.
I have problems while using the Linked Server in MS SQL Server 2000 for data porting.
The Scenario :
I have about 900 hundred tables created in SQL Server database. These tables are freshly created and has no records.
I have created a Linked Server with a DSN connecting to a Sybase database from which the data has to be ported to the newly created tables in SQL Server.
The database creation as well as data porting is done by a Delphi application by executing the scripts in several .sql files.
I have shown an example script below which does the data porting.
INSERT INTO TEST_DATA (COL1,COL2,COL3) SELECT COL1,COL2,COL3 FROM [LINK_SYBASEDB]..[DBA].[TEST_DATA]
The Issue :
I often get the below error which stops the data porting process ( the error is logged in the Errorlog by the Delphi application )
I'm having an issue with a job that calls a stored procedure. The SP is fairly complicated, but basically creates a temp table, then inserts the records from the temp table into a table on a linked server (via VPN). The basic premise here is that I'm trying to update a web-accessible server from the production server. The funny thing is that the process works correctly for 4 out of 5 companies (company is the only parameter fed to the SP). The company that fails is by far the largest, but the process has worked in the past.
I'm not strong with all the tools available in SQL Server that might help me figure out what's going wrong. In the SQL Server Agent, it simply tells me that the job failed. If I use Query Analyzer and run the SP in Debug mode (if I'm stating that correctly), I get this error for any company I try it for, even companies that run fine (line 51 is the DELETE line):
Server: Msg 7391, Level 16, State 1, Procedure procStmtDataToReno, Line 51 [Microsoft][ODBC SQL Server Driver][SQL Server]The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction.
So I suppose my long-winded question is, how can I determine why this SP fails for the one company? If relevant, the job is simply:
EXEC procStmtDataToReno 'B'
and some snippets of the SP:
CREATE PROCEDURE [dbo].[procStmtDataToReno]
@CoCode as varchar(2)
AS
--various declarations and such
DELETE FROM [10.1.1.4].OnlineAR.dbo.StatementData WHERE CompanyID = @CoCode AND (Line1Date < Convert(varchar(10), GETDATE() - 60, 101) OR Line1Date >= Convert(varchar(10), GETDATE() - 5, 101) )
--code to build temp table
INSERT INTO [10.1.1.4].OnlineAR.dbo.StatementData SELECT * FROM #Statement GO
my question is : how do I query data from the linked foxpro database?
more: I have linked a visual foxpro server to my sql server database by using the addserver clause. Two server is in a local network. My linked foxpro server named 'fox'. its datasourse is not a dbc file, but a directory of dbf files ,and its full path is d:foxpro object. In the directory ,there are three table,'show2003.dbf','sysu.dbf','szszj.dbf'. And the .dbf files are not in any database. They are just three files in the same directory. There is no dbc file. Now I can see the table list on the right page of the linked server. But there is something wrong with my sql clause.
sample:
select * from fox..sysu
then the message is: server: message 7313,level 16,status 1,row 1 the appointed constructure or directory to the provider is inefficacious 'MSDASQL'
I know I may use 'openquery',or 'openrowset'. The problem is that variable is not valid in 'openquery' and 'openrowset'. But I must use variable. so ,please give me some advice.
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'm trying to update a field (tmpRequestID) in a SQL Express table (tblTSubRequest) using a value in a SQL 2000 database field (fldtmpRequestID) in the dbo.NewPurchase table.
The procedure I thought would work is: USE [tempPurchase] GO /****** Object: StoredProcedure [dbo].[UpdateSubfldRequestID] Script Date: 07/11/2007 15:01:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[UpdateSubfldRequestID] AS BEGIN -- Insert statements for procedure here UPDATE tblTSubRequest SET tmpRequestID = tblRequest.fldRequestID FROM tblTSubRequest INNER JOIN [NGTXA4-RSMSZ-01].NewPurchase.dbo.tblRequest ON tblTSubRequest.fldRequestID = tblRequest.fldRequestID WHERE (tblRequest.fldUpdateCode = 99) END
It appears that the procedure cannot read the field value on the 2000 server and the 2000 server is linked to the 2005 express edition.
Please bear with me if my vocabulary or phraseology is wrong (and if it is, I wouldn’t mind being corrected).
Background:
We have an application that uses a Cache database (which is a complete black box for me). The data is exposed to us through ODBC. We have set up a linked server that I can see the names of the tables and views in Enterprise Manager and can query on them with Query Analyzer.
Problem:
There are a lot of extra long string fields. I can see the data in both Crystal Reports and Access (in Crystal they are shown defined as sting [32395] and in Access they are shown as a Memo field).
I cannot get Query Analyzer to display the data. I have tried the following select statements:
select definition_text from cwsavpmtest_live..system.problem_def_data
select cast(definition_text as ntext) from cwsavpmtest_live..system.problem_def_data select convert(ntext,definition_text) from cwsavpmtest_live..system.problem_def_data
select cast(definition_text as text) from cwsavpmtest_live..system.problem_def_data select convert(text,definition_text) from cwsavpmtest_live..system.problem_def_data
select cast(definition_text as varchar(8000)) from cwsavpmtest_live..system.problem_def_data select convert(varchar(8000), definition_text) from cwsavpmtest_live..system.problem_def_data
… and get the same error for every one: quote: Server: Msg 7341, Level 16, State 2, Line 1 Could not get the current row value of column '[cwsavpmtest_live]..[system].[problem_def_data].definition_text' from the OLE DB provider 'MSDASQL'. [OLE/DB provider returned message: Requested conversion is not supported.] OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowset::GetData returned 0x80040e1d].
So my question is: Am I out of luck and have to be content with looking at the data in Access or Crystal or is there some way I can look at these fields through Query Analyzer?
I need to link some data from SQL Server 2005 with Oracle 10 data.One way is to link Oracle server to SQL Server and use ROWSOURCE forretrieving data.What other ways for joing data from both databases exist ?Can I do it from SQLCRL VB - Stored Procedure ? If yes, what objectsshall I use for opening database and running an sql ?Thanks a lot.
I need help in creating a Data Source within SQL Server Reporting Services 2005 to connect to a Microsoft Access database. I'm sure the problem is an authentication issue, because the report works fine when previewed through Visual Studio 2005. But, through the report server browser front end I get the following error:
An error has occurred during report processing. (rsProcessingAborted) Query execution failed for data set 'AssignedEmployees'. (rsErrorExecutingCommand) The Microsoft Jet database engine cannot open the file '...'. It is already opened exclusively by another user, or you need permission to view its data.
The Access database happens to reside on the same server as the SQL Server instance. The query that it is invoking uses tables linked to other Access databases including one that is on the same server and another that is on a completely different server. The error listed above references the database that is linked from the main Access database and that is on the same server.
I tried various things to get it to work, but what it comes down to is that I do not know the proper way to create the Data Source to an Access database from SRS (especially where the Access database links to other Access databases). Can anyone provide the steps to do this properly?
I am trying to access the View through linked server connection .The linked server connection is between two sql server 2005.
The problem is I am not able to access 2 columns of nvarchar datatype of length 255, from the view through select statement.
I do a SELECT col1,col2 from VIEW,then getting the following error .
Cannot get the data of the row from the OLE DB provider "SQLNCLI" for linked server "SRVXPR". Could not convert the data value due to reasons other than sign mismatch or overflow.
Then I tried with
Select cast(Col1 as nvarchar) ,
cast(col2 as nvarchar) from VIEW,
I am able to get the values.
The collation type is same for all underlying tables and also for the servers.
Is there any restrictions in handling nvarchar data thru linked server/ anyother size limitation.
I don't want to use cast as this will lead to performance problem.
When i run above script, it prompt me an error message; "Microsoft OLE DB Provider for SQL Server The requested operation could not be performed because OLE DB provider "IBMDA400" for linked server "TESTDB2" does not support the required transaction interface."
If i run it without "begintrans" and "committrans", it update the data successfully.
I have a server that is linked to two other servers. The server I am linking has SQL Epress installed, whereas the servers I am linking to (and getting the data from) are enterprise versions of SQL. I used the following code to link both the servers (changing the server name and the datasrc field) and both worked fine.
One of the links is fine and I have no error messages when trying to access the data, but the second link throws this error when I attempt to get any data from the linked server:
Code Block OLE DB provider "MSDASQL" for linked server "SALEEN" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". Msg 7303, Level 16, State 1, Line 3 Cannot initialize the data source object of OLE DB provider for "MSDASQL" for linked server "SALEEN".
I am pretty new to SQL and am totally stumped! If any one has any ideas I would be greatful.
I have a report my business users need from from two data sources, which are on two different servers (both are oracle DBs). I have a common Primary key between both. I've read through a ton of posts and it looks like there is no way to join the data using Datasets, that you need to do something called Linked Servers. but what I couldn't find is where do I go to create a Linked Server and how. I'm new to SS, so I need help and details.