Hello,
I'm having problems accessing a mapped network drive. Basically, I
need to be able to access the g:\ drive from SQL Server (i.e.
master..xp_cmdshell 'dir g:\')
I created a share on my server (\\MyServer\ShareName) and mapped the
network drive G to this. So, from my machine I can do a "start, run",
and type in g:\, and get what I want to see.
However, when I run:
master..xp_cmdshell 'dir g:\
I get a message "The system cannot find the path specified."
I have the MSSQLSERVER account on this server setup to login as me.
Shouldn't this take care of any issues?
I would like to use a UNC share, but unfortunately I can't do that at
this time.
Much appreciate any ideas!
SylviaTry specifying the UNC path instead of a mapped drive:
EXEC master..xp_cmdshell 'DIR \\MyServer\ShareName'
Hope this helps.
Dan Guzman
SQL Server MVP
"Sylvia" <sylvia@.vasilik.com> wrote in message
news:1133830852.921653.231970@.g49g2000cwa.googlegroups.com...
> Hello,
> I'm having problems accessing a mapped network drive. Basically, I
> need to be able to access the g:\ drive from SQL Server (i.e.
> master..xp_cmdshell 'dir g:\')
> I created a share on my server (\\MyServer\ShareName) and mapped the
> network drive G to this. So, from my machine I can do a "start, run",
> and type in g:\, and get what I want to see.
> However, when I run:
> master..xp_cmdshell 'dir g:\
> I get a message "The system cannot find the path specified."
> I have the MSSQLSERVER account on this server setup to login as me.
> Shouldn't this take care of any issues?
> I would like to use a UNC share, but unfortunately I can't do that at
> this time.
> Much appreciate any ideas!
> Sylvia
>|||Thanks for the reply. Unfortunately using a UNC path is not an option
at this point, as I mentioned above (some hard-coded stuff already
written, can't change right now).
Any other options? Does a network share mapped to a drive just not
work?
Thanks,
Sylvia|||> Thanks for the reply. Unfortunately using a UNC path is not an option
> at this point, as I mentioned above (some hard-coded stuff already
> written, can't change right now).
Sorry, I didn't understand that from your original post.
> Any other options? Does a network share mapped to a drive just not
> work?
A mapped drive can work but it is a kludge. One thing you might try is
establishing a persistent mapped drive. I expect you'll only need to do
this once, unless you change the SQL Server service account or unmap the
drive for that user.
EXEC master..xp_cmdshell 'NET USE L: \\MyServer\ShareName /PERSISTENT:YES'
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Sylvia" <sylvia@.vasilik.com> wrote in message
news:1133845592.917117.66320@.g43g2000cwa.googlegroups.com...
> Thanks for the reply. Unfortunately using a UNC path is not an option
> at this point, as I mentioned above (some hard-coded stuff already
> written, can't change right now).
> Any other options? Does a network share mapped to a drive just not
> work?
> Thanks,
> Sylvia
>|||That did it! Thanks much - it's just the kludge I needed to get past
this.
Showing posts with label network. Show all posts
Showing posts with label network. Show all posts
Tuesday, March 27, 2012
Accessing Foxpro database over network
I have a report that needs to access a foxpro database that is located on
another server on the network. There are no issues in accessing the report
when building it but once it is deployed to the reportserver the database
cannot be accessed using either an OLE or ODBC connection.
The initial error message for ODBC is:
Cannot create a connection to data source 'FoxPro'.
(rsErrorOpeningConnection) ERROR [S1000] [Microsoft][ODBC Visual FoxPro
Driver]Cannot open file \\server\data\sapphire.dbc. ERROR [IM006]
[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR
[01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the
version of ODBC behavior that the application requested (see SQLSetEnvAttr).
If I specify user credentials in the datasource properties, I receive the
following error:
Query execution failed for data set 'FoxPro'. (rsErrorExecutingCommand)
ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Cannot open file
\\server\data\\spjobs.dbf.
This is the table the query is being executed on. NTFileMon shows that the
process w3wp.exe has successfully read the sapphire.dbc file that failed in
the first instance but cannot open the spjobs.dbf file.
Similar errors occur using OLE.
I have tried giving full permissions for the files and network share for
everyone but this makes no difference. How can I get this report to work?
regards,
ChrisI am having similar problems with a link server (W2K to a VFP 6 dbc). The
error is
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed]
[OLE/DB provider returned message: [Microsoft][ODBC Visual FoxPro
Driver]Cannot open file \\myserver\myshare\folder\subfolder\mydbc.dbc.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize
returned 0x80004005: ].
This is strangely intermittent. Some attempts work and some throw this
error. I repeat: this problem is intermittent. I'm beginning to suspect a
network problem, but don't have the faintest idea where to start
troubleshooting.
There are a number of posts in many different newsgroups concerning this
error, but no resolution. Would anyone from MS care to weigh in on this?
This issue is seriously hobbling my Biztalk EDI implementation, and the boss
wants a fix NOW.
TIA for your time and expertise.
--
Phil Hegedusich
Senior P/A
IIMAK
--
A skeleton walks into a bar and says, "I need a beer and a mop."
"Chris Diery" wrote:
> I have a report that needs to access a foxpro database that is located on
> another server on the network. There are no issues in accessing the report
> when building it but once it is deployed to the reportserver the database
> cannot be accessed using either an OLE or ODBC connection.
> The initial error message for ODBC is:
> Cannot create a connection to data source 'FoxPro'.
> (rsErrorOpeningConnection) ERROR [S1000] [Microsoft][ODBC Visual FoxPro
> Driver]Cannot open file \\server\data\sapphire.dbc. ERROR [IM006]
> [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR
> [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the
> version of ODBC behavior that the application requested (see SQLSetEnvAttr).
> If I specify user credentials in the datasource properties, I receive the
> following error:
> Query execution failed for data set 'FoxPro'. (rsErrorExecutingCommand)
> ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Cannot open file
> \\server\data\\spjobs.dbf.
> This is the table the query is being executed on. NTFileMon shows that the
> process w3wp.exe has successfully read the sapphire.dbc file that failed in
> the first instance but cannot open the spjobs.dbf file.
> Similar errors occur using OLE.
> I have tried giving full permissions for the files and network share for
> everyone but this makes no difference. How can I get this report to work?
> regards,
> Chris
another server on the network. There are no issues in accessing the report
when building it but once it is deployed to the reportserver the database
cannot be accessed using either an OLE or ODBC connection.
The initial error message for ODBC is:
Cannot create a connection to data source 'FoxPro'.
(rsErrorOpeningConnection) ERROR [S1000] [Microsoft][ODBC Visual FoxPro
Driver]Cannot open file \\server\data\sapphire.dbc. ERROR [IM006]
[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR
[01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the
version of ODBC behavior that the application requested (see SQLSetEnvAttr).
If I specify user credentials in the datasource properties, I receive the
following error:
Query execution failed for data set 'FoxPro'. (rsErrorExecutingCommand)
ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Cannot open file
\\server\data\\spjobs.dbf.
This is the table the query is being executed on. NTFileMon shows that the
process w3wp.exe has successfully read the sapphire.dbc file that failed in
the first instance but cannot open the spjobs.dbf file.
Similar errors occur using OLE.
I have tried giving full permissions for the files and network share for
everyone but this makes no difference. How can I get this report to work?
regards,
ChrisI am having similar problems with a link server (W2K to a VFP 6 dbc). The
error is
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed]
[OLE/DB provider returned message: [Microsoft][ODBC Visual FoxPro
Driver]Cannot open file \\myserver\myshare\folder\subfolder\mydbc.dbc.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize
returned 0x80004005: ].
This is strangely intermittent. Some attempts work and some throw this
error. I repeat: this problem is intermittent. I'm beginning to suspect a
network problem, but don't have the faintest idea where to start
troubleshooting.
There are a number of posts in many different newsgroups concerning this
error, but no resolution. Would anyone from MS care to weigh in on this?
This issue is seriously hobbling my Biztalk EDI implementation, and the boss
wants a fix NOW.
TIA for your time and expertise.
--
Phil Hegedusich
Senior P/A
IIMAK
--
A skeleton walks into a bar and says, "I need a beer and a mop."
"Chris Diery" wrote:
> I have a report that needs to access a foxpro database that is located on
> another server on the network. There are no issues in accessing the report
> when building it but once it is deployed to the reportserver the database
> cannot be accessed using either an OLE or ODBC connection.
> The initial error message for ODBC is:
> Cannot create a connection to data source 'FoxPro'.
> (rsErrorOpeningConnection) ERROR [S1000] [Microsoft][ODBC Visual FoxPro
> Driver]Cannot open file \\server\data\sapphire.dbc. ERROR [IM006]
> [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR
> [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the
> version of ODBC behavior that the application requested (see SQLSetEnvAttr).
> If I specify user credentials in the datasource properties, I receive the
> following error:
> Query execution failed for data set 'FoxPro'. (rsErrorExecutingCommand)
> ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Cannot open file
> \\server\data\\spjobs.dbf.
> This is the table the query is being executed on. NTFileMon shows that the
> process w3wp.exe has successfully read the sapphire.dbc file that failed in
> the first instance but cannot open the spjobs.dbf file.
> Similar errors occur using OLE.
> I have tried giving full permissions for the files and network share for
> everyone but this makes no difference. How can I get this report to work?
> regards,
> Chris
Tuesday, March 6, 2012
Access table link to SQL question
I have a SQL 7 database I want to link to from Access 2000. Previously this
database could be linked to over our local network by way of a WAN link. We'
ve just moved and now that WAN link has been severed and so I'm forced to re
establish the table link ov
er the internet. The SQL server and website exist on the same box and when I
enter the public IP address of the server into the input field labeled "wha
t server do you want to connect to?" in DSN setup, it won't accept it. What
do I have to do to establis
h a dsn to a database over the internet as opposed to a local network?One option would be to add an entry to your host file for
the server and it's IP address. Then configure the DSN with
the server name you put in the host file for the server.
-Sue
On Thu, 18 Mar 2004 07:46:05 -0800, "Glenn"
<gvenzke@.equiguard.com> wrote:
>I have a SQL 7 database I want to link to from Access 2000.
>Previously this database could be linked to over our local network
>by way of a WAN link. We've just moved and now that WAN link
>has been severed and so I'm forced to reestablish the table link
>over the internet. The SQL server and website exist on the same
>box and when I enter the public IP address of the server into the
>input field labeled "what server do you want to connect to?" in DSN
>setup, it won't accept it. What do I have to do to establish a dsn to a
>database over the internet as opposed to a local network?
database could be linked to over our local network by way of a WAN link. We'
ve just moved and now that WAN link has been severed and so I'm forced to re
establish the table link ov
er the internet. The SQL server and website exist on the same box and when I
enter the public IP address of the server into the input field labeled "wha
t server do you want to connect to?" in DSN setup, it won't accept it. What
do I have to do to establis
h a dsn to a database over the internet as opposed to a local network?One option would be to add an entry to your host file for
the server and it's IP address. Then configure the DSN with
the server name you put in the host file for the server.
-Sue
On Thu, 18 Mar 2004 07:46:05 -0800, "Glenn"
<gvenzke@.equiguard.com> wrote:
>I have a SQL 7 database I want to link to from Access 2000.
>Previously this database could be linked to over our local network
>by way of a WAN link. We've just moved and now that WAN link
>has been severed and so I'm forced to reestablish the table link
>over the internet. The SQL server and website exist on the same
>box and when I enter the public IP address of the server into the
>input field labeled "what server do you want to connect to?" in DSN
>setup, it won't accept it. What do I have to do to establish a dsn to a
>database over the internet as opposed to a local network?
Access standard .NET Framework classes
Hello,
My reports access the class File, a builtin class in the .NET Framework,
to check whether a file exists on a network drive somewhere. I use the File.Exists
method if that's ny help.
What I saw initally was that File.Exists returned false in every instance,
even if the file I was checked existed. I raised the trust level in the ReportServer
by editing the rssrvpolicy.config and setting the FirstMatchCodeGroup to
FullTrust. This made the code work when I access the report server locally
using Remote Desktop, however if I access the ReportServer remotely using
the machine name in the browser the call the File.Exists fails even with
the modifications to rssrvpolicy.config in place.
Does anyone have any idea as to what makes it work locally but not remotely?
--
Med venlig hilsen,
Søren Lund
www.publicvoid.dkI should mention that this is Reporting Services for SQL Server 2000 SP2
running on a Windows Server 2003 machine.
My reports access the class File, a builtin class in the .NET Framework,
to check whether a file exists on a network drive somewhere. I use the File.Exists
method if that's ny help.
What I saw initally was that File.Exists returned false in every instance,
even if the file I was checked existed. I raised the trust level in the ReportServer
by editing the rssrvpolicy.config and setting the FirstMatchCodeGroup to
FullTrust. This made the code work when I access the report server locally
using Remote Desktop, however if I access the ReportServer remotely using
the machine name in the browser the call the File.Exists fails even with
the modifications to rssrvpolicy.config in place.
Does anyone have any idea as to what makes it work locally but not remotely?
--
Med venlig hilsen,
Søren Lund
www.publicvoid.dkI should mention that this is Reporting Services for SQL Server 2000 SP2
running on a Windows Server 2003 machine.
Subscribe to:
Posts (Atom)