Showing posts with label path. Show all posts
Showing posts with label path. 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

Wednesday, March 21, 2012

How to create a storeprocedure

Hi,
I'm very very new in SQLServer.
I need to create a store procedure that execute a sql file located in a PATH
for example:
C:\Inetpub\Reserved\update.sql
HOw can I made this?
Thanks a lot!Hi
what version of sql server you using.
if you have sql server installed on your computer, then you can open .sql
file in query analyser or management studio to execute it
i still don't understand why you a need a SP to execute update.sql file
Regards
VT
Knowledge is power, share it...
http://oneplace4sql.blogspot.com/
"Andrea" <noreply@.nospam.net> wrote in message
news:5Fkni.2101$BM.412@.tornado.fastwebnet.it...
> Hi,
> I'm very very new in SQLServer.
> I need to create a store procedure that execute a sql file located in a
> PATH
> for example:
>
> C:\Inetpub\Reserved\update.sql
>
>
> HOw can I made this?
>
> Thanks a lot!
>
>|||Andrea
Sorry, I type it from the memory, please test it
EXEC master..xp_cmdshell 'osql.exe -S SVR -U sa -P pswd -i
"c:\Inetpub\Reserved\update.sql" -o "C:\output.txt"'
"Andrea" <noreply@.nospam.net> wrote in message
news:5Fkni.2101$BM.412@.tornado.fastwebnet.it...
> Hi,
> I'm very very new in SQLServer.
> I need to create a store procedure that execute a sql file located in a
> PATH
> for example:
>
> C:\Inetpub\Reserved\update.sql
>
>
> HOw can I made this?
>
> Thanks a lot!
>
>sql

Monday, March 12, 2012

How to create a new Backup device?

How do I create a new Backup device in SQL Server 2005? When I invoke "Back
Up..." from Management, I only get the option to select a file path (under
Select Backup Destionation). The option to select a Backup device is empty
and greyed out.
OlavYou need to create the backup device first. This is under the "Server Objects" folder, or use
sp_addumpdevice directly.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Olav" <x@.y.com> wrote in message news:%234EW0V$WGHA.5012@.TK2MSFTNGP05.phx.gbl...
> How do I create a new Backup device in SQL Server 2005? When I invoke "Back Up..." from
> Management, I only get the option to select a file path (under Select Backup Destionation). The
> option to select a Backup device is empty and greyed out.
> Olav
>

How to create a new Backup device?

How do I create a new Backup device in SQL Server 2005? When I invoke "Back
Up..." from Management, I only get the option to select a file path (under
Select Backup Destionation). The option to select a Backup device is empty
and greyed out.
OlavYou need to create the backup device first. This is under the "Server Object
s" folder, or use
sp_addumpdevice directly.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Olav" <x@.y.com> wrote in message news:%234EW0V$WGHA.5012@.TK2MSFTNGP05.phx.gbl...reen">
> How do I create a new Backup device in SQL Server 2005? When I invoke "Bac
k Up..." from
> Management, I only get the option to select a file path (under Select Back
up Destionation). The
> option to select a Backup device is empty and greyed out.
> Olav
>

How to create a job to execute an Access program?

I am trying to schedule an Access Job using SQL Server Agent. I have
created a .BAT file with the full path to a Access .mdb file. The Access
program will automatically start up a form and copy data from an Orcale
database into the SQL Server. When I execute the .BAT file by hand (by
double-clicking it) everything works fine. I can't get things to work
when I create a job and specify the full path to the .BAT file in the
command window. The following is what I enter in the command window: "G:
\SQLJobs\GetData.mdb". I get no errors in the event log. Can someone
give me an idea on what I need to do. I assume I am missing something.
Thanks.
John
Hi
Scheduling an interactive program is not a good idea. You may want to change
this to use a linked server and have it totally within SQL Server itself or
you may want to look at DTS as an another alternative.
John
"John" <nomail@.none.com> wrote in message
news:MPG.1ccc2ae08c2915d9989682@.news.comcast.gigan ews.com...
>I am trying to schedule an Access Job using SQL Server Agent. I have
> created a .BAT file with the full path to a Access .mdb file. The Access
> program will automatically start up a form and copy data from an Orcale
> database into the SQL Server. When I execute the .BAT file by hand (by
> double-clicking it) everything works fine. I can't get things to work
> when I create a job and specify the full path to the .BAT file in the
> command window. The following is what I enter in the command window: "G:
> \SQLJobs\GetData.mdb". I get no errors in the event log. Can someone
> give me an idea on what I need to do. I assume I am missing something.
> Thanks.
> John
|||I think you should point the path to "access.exe", something like this:
"C:\program files\microsoft office\office\access.exe g:\...\GetData.mdb"
But I really do not know if it good idea to run such external process by
using SQL Server Agaent. SQL Server agent (and SQL Server) has no control to
the Access app except for starting it. That is why you do not have error
logged. To schedule this Access app, I'd simply use Windows' "Scheduled
Tasks" applet in Control Panel.
Specific to your task, using DTS might be more suitable.
"John" <nomail@.none.com> wrote in message
news:MPG.1ccc2ae08c2915d9989682@.news.comcast.gigan ews.com...
> I am trying to schedule an Access Job using SQL Server Agent. I have
> created a .BAT file with the full path to a Access .mdb file. The Access
> program will automatically start up a form and copy data from an Orcale
> database into the SQL Server. When I execute the .BAT file by hand (by
> double-clicking it) everything works fine. I can't get things to work
> when I create a job and specify the full path to the .BAT file in the
> command window. The following is what I enter in the command window: "G:
> \SQLJobs\GetData.mdb". I get no errors in the event log. Can someone
> give me an idea on what I need to do. I assume I am missing something.
> Thanks.
> John

How to create a job to execute an Access program?

I am trying to schedule an Access Job using SQL Server Agent. I have
created a .BAT file with the full path to a Access .mdb file. The Access
program will automatically start up a form and copy data from an Orcale
database into the SQL Server. When I execute the .BAT file by hand (by
double-clicking it) everything works fine. I can't get things to work
when I create a job and specify the full path to the .BAT file in the
command window. The following is what I enter in the command window: "G:
\SQLJobs\GetData.mdb". I get no errors in the event log. Can someone
give me an idea on what I need to do. I assume I am missing something.
Thanks.
JohnHi
Scheduling an interactive program is not a good idea. You may want to change
this to use a linked server and have it totally within SQL Server itself or
you may want to look at DTS as an another alternative.
John
"John" <nomail@.none.com> wrote in message
news:MPG.1ccc2ae08c2915d9989682@.news.comcast.giganews.com...
>I am trying to schedule an Access Job using SQL Server Agent. I have
> created a .BAT file with the full path to a Access .mdb file. The Access
> program will automatically start up a form and copy data from an Orcale
> database into the SQL Server. When I execute the .BAT file by hand (by
> double-clicking it) everything works fine. I can't get things to work
> when I create a job and specify the full path to the .BAT file in the
> command window. The following is what I enter in the command window: "G:
> \SQLJobs\GetData.mdb". I get no errors in the event log. Can someone
> give me an idea on what I need to do. I assume I am missing something.
> Thanks.
> John|||I think you should point the path to "access.exe", something like this:
"C:\program files\microsoft office\office\access.exe g:\...\GetData.mdb"
But I really do not know if it good idea to run such external process by
using SQL Server Agaent. SQL Server agent (and SQL Server) has no control to
the Access app except for starting it. That is why you do not have error
logged. To schedule this Access app, I'd simply use Windows' "Scheduled
Tasks" applet in Control Panel.
Specific to your task, using DTS might be more suitable.
"John" <nomail@.none.com> wrote in message
news:MPG.1ccc2ae08c2915d9989682@.news.comcast.giganews.com...
> I am trying to schedule an Access Job using SQL Server Agent. I have
> created a .BAT file with the full path to a Access .mdb file. The Access
> program will automatically start up a form and copy data from an Orcale
> database into the SQL Server. When I execute the .BAT file by hand (by
> double-clicking it) everything works fine. I can't get things to work
> when I create a job and specify the full path to the .BAT file in the
> command window. The following is what I enter in the command window: "G:
> \SQLJobs\GetData.mdb". I get no errors in the event log. Can someone
> give me an idea on what I need to do. I assume I am missing something.
> Thanks.
> John

How to create a job to execute an Access program?

I am trying to schedule an Access Job using SQL Server Agent. I have
created a .BAT file with the full path to a Access .mdb file. The Access
program will automatically start up a form and copy data from an Orcale
database into the SQL Server. When I execute the .BAT file by hand (by
double-clicking it) everything works fine. I can't get things to work
when I create a job and specify the full path to the .BAT file in the
command window. The following is what I enter in the command window: "G:
\SQLJobs\GetData.mdb". I get no errors in the event log. Can someone
give me an idea on what I need to do. I assume I am missing something.
Thanks.
JohnHi
Scheduling an interactive program is not a good idea. You may want to change
this to use a linked server and have it totally within SQL Server itself or
you may want to look at DTS as an another alternative.
John
"John" <nomail@.none.com> wrote in message
news:MPG.1ccc2ae08c2915d9989682@.news.comcast.giganews.com...
>I am trying to schedule an Access Job using SQL Server Agent. I have
> created a .BAT file with the full path to a Access .mdb file. The Access
> program will automatically start up a form and copy data from an Orcale
> database into the SQL Server. When I execute the .BAT file by hand (by
> double-clicking it) everything works fine. I can't get things to work
> when I create a job and specify the full path to the .BAT file in the
> command window. The following is what I enter in the command window: "G:
> \SQLJobs\GetData.mdb". I get no errors in the event log. Can someone
> give me an idea on what I need to do. I assume I am missing something.
> Thanks.
> John|||I think you should point the path to "access.exe", something like this:
"C:\program files\microsoft office\office\access.exe g:\...\GetData.mdb"
But I really do not know if it good idea to run such external process by
using SQL Server Agaent. SQL Server agent (and SQL Server) has no control to
the Access app except for starting it. That is why you do not have error
logged. To schedule this Access app, I'd simply use Windows' "Scheduled
Tasks" applet in Control Panel.
Specific to your task, using DTS might be more suitable.
"John" <nomail@.none.com> wrote in message
news:MPG.1ccc2ae08c2915d9989682@.news.comcast.giganews.com...
> I am trying to schedule an Access Job using SQL Server Agent. I have
> created a .BAT file with the full path to a Access .mdb file. The Access
> program will automatically start up a form and copy data from an Orcale
> database into the SQL Server. When I execute the .BAT file by hand (by
> double-clicking it) everything works fine. I can't get things to work
> when I create a job and specify the full path to the .BAT file in the
> command window. The following is what I enter in the command window: "G:
> \SQLJobs\GetData.mdb". I get no errors in the event log. Can someone
> give me an idea on what I need to do. I assume I am missing something.
> Thanks.
> John