Showing posts with label linked. Show all posts
Showing posts with label linked. Show all posts

Monday, March 26, 2012

How to create Link Server ODBC DBase

Hi,
I tried a lot of things to connect a linked server to an ODBC for dBase IV
and I didn't get any successfull result. I have the path, the files names an
d
sysadmin access to my SQL server. I got a lot confused on all connection
string that news group use to connect to an ODBC for dBase. Does someone can
help me creating my Linked Server or tell me a link or doc that explain it
carefully?
Here is my last try:
EXEC master.dbo.sp_addlinkedserver @.server = @.LinkedServerName,
@.srvproduct=N'Haha', @.provider=N'Microsoft.Jet.OLEDB.4.0',
@.datasrc=N'eTimeDB', @.provstr=N'Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=S:\DBFFiles;Extended Properties=dBase IV;User ID=Admin; Password=;'
but this doesn't work:
select * from
OPENQUERY( ETimeODBC04, 'SELECT * FROM EMP')
Thanks a lot in advance.
DavidI'm using a SQL Server 2005 server
"David Parenteau" wrote:

> Hi,
> I tried a lot of things to connect a linked server to an ODBC for dBase IV
> and I didn't get any successfull result. I have the path, the files names
and
> sysadmin access to my SQL server. I got a lot confused on all connection
> string that news group use to connect to an ODBC for dBase. Does someone c
an
> help me creating my Linked Server or tell me a link or doc that explain it
> carefully?
> Here is my last try:
> EXEC master.dbo.sp_addlinkedserver @.server = @.LinkedServerName,
> @.srvproduct=N'Haha', @.provider=N'Microsoft.Jet.OLEDB.4.0',
> @.datasrc=N'eTimeDB', @.provstr=N'Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=S:\DBFFiles;Extended Properties=dBase IV;User ID=Admin; Password=;'
> but this doesn't work:
> select * from
> OPENQUERY( ETimeODBC04, 'SELECT * FROM EMP')
> Thanks a lot in advance.
> David

How to create Link Server ODBC DBase

Hi,
I tried a lot of things to connect a linked server to an ODBC for dBase IV
and I didn't get any successfull result. I have the path, the files names and
sysadmin access to my SQL server. I got a lot confused on all connection
string that news group use to connect to an ODBC for dBase. Does someone can
help me creating my Linked Server or tell me a link or doc that explain it
carefully?
Here is my last try:
EXEC master.dbo.sp_addlinkedserver @.server = @.LinkedServerName,
@.srvproduct=N'Haha', @.provider=N'Microsoft.Jet.OLEDB.4.0',
@.datasrc=N'eTimeDB', @.provstr=N'Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=S:\DBFFiles;Extended Properties=dBase IV;User ID=Admin; Password=;'
but this doesn't work:
select * from
OPENQUERY( ETimeODBC04, 'SELECT * FROM EMP')
Thanks a lot in advance.
David
I'm using a SQL Server 2005 server
"David Parenteau" wrote:

> Hi,
> I tried a lot of things to connect a linked server to an ODBC for dBase IV
> and I didn't get any successfull result. I have the path, the files names and
> sysadmin access to my SQL server. I got a lot confused on all connection
> string that news group use to connect to an ODBC for dBase. Does someone can
> help me creating my Linked Server or tell me a link or doc that explain it
> carefully?
> Here is my last try:
> EXEC master.dbo.sp_addlinkedserver @.server = @.LinkedServerName,
> @.srvproduct=N'Haha', @.provider=N'Microsoft.Jet.OLEDB.4.0',
> @.datasrc=N'eTimeDB', @.provstr=N'Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=S:\DBFFiles;Extended Properties=dBase IV;User ID=Admin; Password=;'
> but this doesn't work:
> select * from
> OPENQUERY( ETimeODBC04, 'SELECT * FROM EMP')
> Thanks a lot in advance.
> David
sql

Friday, March 23, 2012

How to create and schedule a job using linked servers?

There are 2 sql servers : A and C.
I have to grab data on server A and update records with this data on server C. It has to run every night, so it has to be scheduled as a job.
I created linked server on server A and ran query select... It works.
I can create Update query.
What are my steps next? I read how to create a job, but not understand how to incorporate the query into it. I am totaly unexpirenced user, please explain step by step or give me a link to a good explanation. I also do not understand how and whether DTS should be used in all this.
Appreciate any help.

Ann2wrap ur sql query in SP,create and call that SP from job steps.
From BOL,
How to create a job (Enterprise Manager)

To create a job
Expand a server group, and then expand a server.
Expand Management, and then expand SQL Server Agent.
Right-click Jobs, and then click New Job.
In the Name box, enter a name for the job.
To create a Transact-SQL job step
Create a new job or right-click an existing job, and then click Properties. For more information on creating a job, see Creating Jobs (javascript:hhobj_301.Click()).
In the Job Properties dialog box, click the Steps tab, and then click New.
In the Step name box, enter a job step name.
In the Type list, click Transact-SQL Script (TSQL).
In the Database list, click a database for this job step to use.
In the Command box, enter the Transact-SQL command batch(es), or click Open to select a Transact-SQL file to use as the command.
Click Parse to check your syntax. The message "Parse succeeded" is displayed when your syntax is correct. If an error is found, correct the syntax before continuing.|||I created a stored procedure for the job and not sure what Type and Command do I use in this case? EXEC MyProcedure in command window eith type TSQL does not work. The procedur is working fine when I run this command in Query Analyser:EXEC MyProcedure .

Thank you.
Ann

Monday, March 19, 2012

How to create a sdf file using SQL 2005 Management Studio

Does SQL Server Compact Edition support Linked Server? I have 2 SDF files and I want to copy data from one to the other? I thought Linked Server is the easier to go.

No, linked server is not supported by SQL CE. You can try to use the SSMS query analyzer and copy/paste, depending on the amount of data to be copied, or you can code your own "import/export". There are also third party tools available, like http://www.primeworks-mobile.com/Products/DataPortCommand.html

|||

Hi,

As per my present project requirement, I am planning to create a smart client application.

For this I need part of server central DB to be on mobile device. Since we have central DB on SQL 2005, I planned to create a sdf file using Mangt studio and refer the same in VS 2005. Is there a way I can take a set of tables and create a sdf using SQL Server 2005? I tried to right-click the existing DB I have created in SQL 2005 (using management studio) and export, but invain, I couldnt get a right Data Provider for this export.

Any pointers in this regard will be really helpful.

Regards,

DSB

Monday, March 12, 2012

How to create a linked Server using SQL Server Management Studio?

Does SQL Server Compact Edition support Linked Server? I have 2 SDF files and I want to copy data from one to the other? I thought Linked Server is the easier to go.

No, linked server is not supported by SQL CE. You can try to use the SSMS query analyzer and copy/paste, depending on the amount of data to be copied, or you can code your own "import/export". There are also third party tools available, like http://www.primeworks-mobile.com/Products/DataPortCommand.html

|||

Hi,

As per my present project requirement, I am planning to create a smart client application.

For this I need part of server central DB to be on mobile device. Since we have central DB on SQL 2005, I planned to create a sdf file using Mangt studio and refer the same in VS 2005. Is there a way I can take a set of tables and create a sdf using SQL Server 2005? I tried to right-click the existing DB I have created in SQL 2005 (using management studio) and export, but invain, I couldnt get a right Data Provider for this export.

Any pointers in this regard will be really helpful.

Regards,

DSB

How to create a linked server to MySQL from MsSQL?

I can create a linked server to another MsSQL from MsSQL,but encounter error when create a linked server to MySQL:
Error 7399:OLE DB provider 'MSDASQL' reported an error.
Data source name not found and no default driver specified.
.....
Anyone can help me?
Thanks!try this step,

1. Installed MyODBC driver version for windows,u can download from mysql site
2. Create a system ODBC DSN using this driver to a specific server and database.

3. In SQL Server 2K Enterprise Manager, created a linked server using Microsoft OLE DB Provider for ODBC Drivers and specified the DSN in the Data Source.

and select query should be,

SELECT * FROM OPENQUERY(linkedservername, 'database.table')

or

SELECT * FROM OPENQUERY(linkedservername, 'select * from table)

--cheers,
--http://mallier.blogspot.com|||Yes,I did as you said.But still get this error.

The setting are:
Server Type:Microsoft OLE DB Provider for ODBC
DataSource:mydsn
Provider string:DATABASE=mydb;DSN=mydsn;SERVER=myserver;UID =myuid;PWD=mypwd
Location:myserver
Catalog:mydb

Something is wrong?|||I dont have Mysql here,
try this,

Server Type:Microsoft OLE DB Provider for ODBC
DataSource:mydsn

and remove other properties.

--cheers,
--http://mallier.blogspot.com|||Even I linked to the MsSQL server NOT MySQL,
if put myserver in data source,it's ok.
but if put mydsn in data source,it got same error.|||Sorry,I created dns in wrong location.
After I corrected this mistake,linking to MsSQL is ok,but encountered not responding when link to MySQL.(I've verified that the dsn is ok.)|||I've fixed this problem,it's due to I didn't enable root access from remote machines.
Thanks.