Writing To Network Drives From SQLServer

Apr 23, 2008

I am having difficulty getting both xp_cmdshell and the Scripting.FileSystem to work via sp_OACreate/sp_OAMethod with files residing on network drives . I am able to create/move/copy/delete files on local drives through both of these methods, but when I specify a network drive as the target an operation requiring write access I get an "Access is Denied" error. I recognize that the SQLServer service account is being used to perform these operations, and I have granted Full control permissions to this user on the directory I'm trying to perform the operation on. Is there some other permission either on the SQLServer or Windows account that is required to enable write access from T-SQL?

--Listing of network directory works fine:

EXEC xp_cmdshell 'dir \Gol-devftprootgolsolgolEngMaint';
GO
Volume in drive \Gol-devftproot has no label.
Volume Serial Number is 5493-88CD
NULL
Directory of \Gol-devftprootgolsolgolEngMaint
NULL
04/23/2008 12:37 PM <DIR> .
04/23/2008 12:37 PM <DIR> ..
03/28/2008 01:56 PM <DIR> 40083388
04/23/2008 12:37 PM <DIR> 4008343A
04/23/2008 11:05 AM 230 4008343a.task
12/18/2007 12:15 PM <DIR> 4008CE92
04/23/2008 08:41 AM <DIR> 4008D108
04/22/2008 06:40 PM <DIR> 4008D134
04/21/2008 02:46 PM <DIR> 4008D15D
03/05/2008 10:14 PM <DIR> 4008D1BA
02/12/2008 04:41 PM <DIR> 4008D1FA
10/29/2007 11:06 PM <DIR> 4008D583
04/21/2008 02:41 PM <DIR> CMU
04/22/2008 02:25 PM 313 ESN_All.task
09/05/2007 11:22 AM <DIR> HotSpot
04/23/2008 07:25 AM <DIR> M4008CEC7
04/23/2008 07:56 AM <DIR> M4008D1BC
04/22/2008 05:24 PM <DIR> M4008D1CF
04/21/2008 02:43 PM <DIR> MEU3
04/21/2008 02:43 PM <DIR> Tools
2 File(s) 543 bytes
18 Dir(s) 25,083,801,600 bytes free


-- Local copy works fine...
EXEC xp_cmdshell 'COPY C:TestLoad4008D1FA4008D1FA.TASK C:Temp';
GO
1 file(s) copied.


-- Copy to network drive fails
EXEC xp_cmdshell 'COPY C:TestLoad4008D1FA4008D1FA.TASK \Gol-devftprootgolsolgolEngMaint';
GO

Access is denied.
0 file(s) copied.

View 8 Replies


ADVERTISEMENT

Creating Databases On Network Drives?

Jul 11, 2001

Is this possible? I seem to remember doing it with SQL Server 7 a long time ago. The Microsoft Knowledgebase says it's not possible with 4.2 through 6.5, but nothing about 7.0 and up.

View 2 Replies View Related

Problem With Xp_cmdshell ,BCP And Network Drives

Sep 27, 1999

Basically what I am trying to do is run bcp from within a stored procedure in SQL 6.5.
It allows me to dynamically assign the destination filename (the legacy application expects to see a file for each picking slip) I want to store the file on another server/shared directory on the LAN

Here is the code
DECLARE @ship_no varchar(16)
SELECT @ship_no = '1234567'
DECLARE @SQL_SYNT varchar(255)
SELECT @SQL_SYNT = "master.dbo.xp_cmdshell " + '"BCP AUSTCHAR..armaster out servernameBECpsqlout'+@ship_no+'.cba /c /t , /r /Sservername /Uuser /Ppassword"'
EXEC( @SQL_SYNT)

However I get the following output:

(1 row(s) affected)


(1 row(s) affected)

output
---------------------------------------------------------------------------------------------------------------------------------------------
DB-LIBRARY error:
Bcp: Unable to open host data-file.

The destination file is not created.
I have tried:
making the path the local HDD that works:
Using a mapped drive, that does not work
Running the same bcp command from the command line. That works.
Using UNC's (as above) You can see the result.
I have also checked security and made SQLexecutive ran as the domain admin. Did not work.


Can Anyone help?

Thanking you in advance

View 1 Replies View Related

Setup And Upgrade :: Users With Sysadmin Role Can't Access Network Drives

Oct 12, 2015

When I create logins for SQL Server 2012, something strange happens. When I assign the sysadmin role to a login, the login loses the access to the network drives (for example when creating or attaching databases). The only possible place is the c:drive of the computer that is running SQL Server.

View 11 Replies View Related

Reading/writing Files To Network Drive

Mar 20, 2007

We have a package that is using a ForEach loop container to access files on a network drive. For some reason I am getting a message that the ForEach enumerator is empty and did not find any files that matched the pattern. For the pattern I left the default *.* for testing purposes. I have specified the file folder as \remoteserverfilesharesubfolder and also as \remoteserverc$filesharesubfolder and have gotten the same message. However when I map a network drive and set the file folder to the network drive it finds the files. Is this a permissions issue?

After I finish processing the file I want to move it to a new directory. Once this is deployed in production, the package will not be running under a domain account and probably won't have access to the network folder. Is there any way to specifiy in the connection manager itself that it should use a specific account to access the folder?



TIA,

Sabrina

View 1 Replies View Related

Fatal Network Error 4014 When Writing Big BLOB Chunks

Jun 1, 2007

Using the SqlClient provider I'm trying to write big datachunks of maybe 20 MB each to SQL server to store in BLOBs using blobColumn.Write(...) using .NET 2.0 dbcommand object calling a Stored procedure



CREATE PROCEDURE [dbo].[putBlobByPK]

(

@id dKey

, @value VARBINARY(MAX)

, @offset bigint

, @length bigint

, @ModDttm dModDttm OUT

, @ModUser dModUser OUT

, @ModClient dModClient OUT

, @ModAppl dModAppl OUT

)

....



When doing this I can do this exactly 3 times than the application hangs (for ever).



When looking in the SQL Server log, I find the following to errors:



Error: 4014, Severity: 20, Status: 2.



A fatal error occurred while reading the input stream from the network. The session will be terminated.



I don't get this error on the client! OK, the session died.



What may be the problem?



I write big chunks like this to avoid many writes as the data shall be replicated later using peer to peer replication. And the more writes used for writing the total BLOB the more huge becomes the transaction log of the subscriber database.



TIA



Hannoman

View 1 Replies View Related

SQLServer And Network Shares

Jul 23, 2005

Hi,My SQL server is short on disk space and I need to create a new instanceof SQLServer. I had another server running Linux with enough space leftso i create a new partition on it and shared it through SAMBA.Now I can use this shared disk in RW mode from the SQL server (tested OK).However, when i try to create another database on this network share,SQLServer denies the operation.Does anybody have a clue about what's going on?Isn't it possible to set database files on a network share?Regards.CH COLLIN

View 2 Replies View Related

Scanning Network To See Running SQLServer

Oct 4, 2007

Hello All,

I am working for a company with approx. 5000 computers(Mix of Win2000+WinXP-PRO). I am asked to write some script or find some kind of tool or mehanism to scan the network to see how many PCs are running SQLServer ( Any version -- may be Desktop/Standard Edition). Is there any such way/script/tool anyone knows here . Please share your experience.

Thanks A lot.

R

View 10 Replies View Related

When I Connect SqlServer Db I Got The Specified Network Name Is No Longer Available.

Dec 28, 2007



Hi.
i got an error when i connect to sqlserver 2005 db with use of Sqlserver ManagementStudio.

A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (.Net SqlClient Data Provider)(Microsoft Sql Error - 64)...

View 4 Replies View Related

Data Access In Local Network Ms Sqlserver 2000

Aug 24, 2005

Hi, i need some help, i have a problem trying to access data in my local network.

I have a PC with ms windows server 2003 and ms sql server 2000, and i want that the others PC in the network can access the data. I installed the client sql server in the others PC, but i can't make it work. What i have to do?

Thanks

View 5 Replies View Related

[DBNETLIB][ConnectionRead (recv()).]General Network Error. Check Your Network Documen

Sep 30, 2004

Hello all,

We have a Windows 2003 Web Edition server serving a site through IIS. It connects to a Windows 2003 Standard Edition server running SQL 2000 SP3a.

This site receives the following error as seen in the topic:
[DBNETLIB][ConnectionRead (recv()).]General network error. Check your network documentation.

We've configured the server network utility to only allow TCP/IP connections. The connection string for the site is as follows:

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
MM_connSpankMSSQL_STRING = "Provider=sqloledb;Data Source=SERVER_IP,1433;Network Library=DBMSSOCN;Initial Catalog=ourmaindb_1;User ID=ourmaindb_1;Password=hotcookies;"
%>

Any ideas or tips on solving this issue? We've noticed it is due to larger queries as smaller ones do work with no problems.

The servers are behind a BSD box running iptables, has 1433,1434 along with standard web ports wide open. Anything outbound is allowed.

Some further testing via ODBC on the IIS server improved things. No more connection pooling for the SQL Server driver allows for 1/3 of the query to run. Still 2/3s of it doesn't show up, and that general network error message appears.

Should have 330 rows if it works right.

View 2 Replies View Related

[DBNETLIB][ConnetionWrite (WrapperWrite()).]General Network Error. Check Your Network

May 19, 2004

Hi
While running a DTS, many times the error message: "[DBNETLIB][ConnetionWrite (WrapperWrite()).]General network error. Check your network documentation." appears.
Does somebody knows why?

I am running the DTS from a computer (not the server where the DTS is stored) and it is connected without any problem when this happens.

Thanks!!
Regards
Lautaro - Argentina.

View 4 Replies View Related

ASP.Net 1.1 With SQL 2005 : General Network Error. Check Your Network Documentation

Oct 4, 2007

Hi Every one,

I am using .Net 1.1 for my web application.

And my database server is SQL Server 2005.

My application is running fine, as i can login to it and also able to view pages. But when i open Order management(having 3K records) its give me error,

General Network Error. Check your network documentation


I have also searched many articles and tried following solutions but nothing working

- connectiontimeout = 0, max pool size = 7500/100, pooling = false

- SSL disabling enforce security false as mentioned in microsoft kb article.

And there's nothing any issue with hardware/firewall as my application's login and other forms are working fine(which use same database with same connection string)

Can any one please help me to solve this error?

With Regards,

View 3 Replies View Related

General Network Error. Check Your Network Documentation

May 26, 2007

Hi We have a written a error log in Global.asax. which capture below mentioned error in the prodcution server. Same applications is working fine in some locations and some loactions we are getting the error.Any body knows why this error is occurs.Any body knows why this error is occurs. Error Message:General network error. Check your network documentation.Stack Trace: at System.Data.SqlClient.SqlInternalConnection.OpenAndLogin() at System.Data.SqlClient.SqlInternalConnection..ctor(SqlConnection connection, SqlConnectionString connectionOptions) at System.Data.SqlClient.SqlConnection.Open() at datalayer.sqldb.Execute(String ProcedureName, SqlParameter[] Parameters) at lms.User.GetUserDetails(String strUserid)ITs at LMS.Login.w_btn_Login_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

View 2 Replies View Related

General Network Error. Check Your Network Documentation

Oct 4, 2007

 Hi,I am using .Net 1.1 for my web application.And my database server is SQL Server 2005. My application is running fine, as i can login to it and also able to view pages. But when i open Order management(having 3K records) its give me error,General Network Error. Check your network documentation  I have also searched many articles  and tried following solutions but nothing working- connectiontimeout = 0, max pool size = 7500/100, pooling = false- SSL disabling enforce security false as mentioned in microsoft kb article. And there's  nothing any issue with hardware/firewall as my application's login and other forms are working fine(which use same database with same connection string) Can any one please help me to solve this error? 

View 2 Replies View Related

General Network Error. Check Your Network Documentation

Feb 8, 2004

When I try to update the site setting, I get this Error and I don't know how to fix.

Server Error in '/DotNetNuke' Application.
--------------------------------------------------------------------------------

General network error. Check your network documentation.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: General network error. Check your network documentation.

Source Error:


Line 281:
Line 282: myConnection.Open()
Line 283: myCommand.ExecuteNonQuery()
Line 284: myConnection.Close()
Line 285: End Sub


Source File: C:DotNetNukeComponentsAdminDB.vb Line: 283

Stack Trace:


[SqlException: General network error. Check your network documentation.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +721
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +196
DotNetNuke.AdminDB.UpdatePortalInfo(Int32 PortalId, String PortalName, String PortalAlias, String LogoFile, String FooterText, Int32 UserRegistration, Int32 BannerAdvertising, String Currency, Int32 AdministratorId, String ExpiryDate, Double HostFee, Double HostSpace, String PaymentProcessor, String ProcessorUserId, String ProcessorPassword, String Description, String KeyWords, String BackgroundFile, Int32 SiteLogHistory) in C:DotNetNukeComponentsAdminDB.vb:283
DotNetNuke.SiteSettings.Update_Click(Object sender, EventArgs e) in C:DotNetNukeadminPortalSiteSettings.ascx.vb:287
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Please Help!

Thank you,

dlouanis

View 2 Replies View Related

General Network Error. Check Your Network Documentation

Jan 9, 2006

I use sqlclient to connect directly from my mobile 5 pocketpc to a sql server 2005 database on my desktop.

I use a sqldatareader to traverse the results of a query that delivers 2 fields: (1) the filespec, and (2) the image field.

I use a filestream with a binary writer to write the contents of the image data to the pocketpc's storage card.

I have a test table with 10 images, not one more than 4 MB.  I cannot complete a test run prior to receiving the  general network error.

The pocketPC is connected via activesync to the desktop, and I connect to the database with:

Integrated Security=false;
user id=sa
password=admin.

Any help with this strange error would be greatly appreciated.

Wil

View 5 Replies View Related

General Network Error Check Network Documentation

Oct 11, 2006

Hi I get a "General Network Error Check network documentation" error sometimes, but its only while insert or update statements are fired while selects keep working perfectly.

The Error details are as follows:
General network error. Check your network documentation.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: General network error. Check your network documentation.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

[SqlException: General network error. Check your network documentation.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)

View 1 Replies View Related

Different Drives

Feb 6, 2008

I am trying to run a program called NVivo7, which - when I install - also requires installation of SQL Server. Because my C drive is small (and nearly full), I am trying to run NVivo7 off my D drive, though SQL seems to install on C. Is it possible, do you think, to use 2 different drives in this way, or do both the program and the Server need to be on the same one? If so, is there any way to get them both on D?

View 3 Replies View Related

Raptor Drives?

Feb 21, 2007

So i'm not really new, but got a question. i've recently been looking to to the Western Digital Raptor Drives.

as far as performance, it's always been my understanding that the speed of the hard drive is just about always the bottle-neck of a computer. i'm currently running 2 stripped WD 500gb SATA drives for my SQL server (dual Xeon 2.8 with 2GB memory).

i'm thinking of upgarding to 4 WD Raptors (10k RPM) drives, the new 150GB models. anyone have an opionion? do you think i'll get a large performance increase?

the database that i run queries off of now is about 125 Million names, with about 80 fields in width. so it's rather large, and usally takes a fair abount of time to get my results back (we're talking anywhere from a minute, to half the day.)

do you think the raptors will slim that down significantly?

View 20 Replies View Related

Restore Does Not See All Of The Drives

Mar 14, 2008



We recently installed SQL Server 2005. The server has 3 drives. When I try to restore a database I can only access the C: drive. How do I make the D: and E: drives visible in the "locate folder" window?

View 5 Replies View Related

Can Not Locate Other Drives

Nov 13, 2007

Hi,

Can someone help me, I installed SQL 2005 Enterpirse Editon on windows clustered servers. Then after the installation
I want to change the path of my DB logs but the problem was, I can not see the other drives. I can see only the drive where the DB was located. Is there any special configurations that should be done.

Thanks.

Russell

View 1 Replies View Related

Cluster Configuration W/ Drives

Apr 19, 2001

Ideally we'd like to configure our SQL cluster w/ the databases on one drive and the logs on another. Is this feasable in a cluster solution.. Will it basically just be 2 drives that are failed over vs. 1?

Thanks

View 1 Replies View Related

Mapping Drives---URgent Pls

Jul 13, 2000

Hi ,
We are having 4 sql7 servers. All are in network only.
serverA: drives c,d
serverB: drives c,e
serverC: drives c,d
serverD: drives c,d,f
Now my question i want map all the drives to each other. So that i can use the space wherever available, because in serverA i dont have space but in ServerC have lot of free space.
Can anyone pls tell me in detail how we have to map the drives.
Thanks

--Siva

View 2 Replies View Related

Monitor Hard Drives

Jul 30, 2001

Hi, I'm looking for a way to check the free space left on the hard drives and then if needed send an alert to notify when we need to free up some space. I played around with the performance monitor and realized I could do it that way but I think you would have to leave the performance monitor running all the time and I'm not sure if I want to do that. I also read about the xp_fixeddrives proc that displays how much free space is available but then I don't know what to do from there? Does anyone have any recommendations for the best way to do this.

View 3 Replies View Related

Mapped Drives On SQL Server

Aug 6, 2001

Hi,

I mapped a drive on to my SQL Server box. It points to another server from the same domain. When I try to backup or restore a database, I can't see this mapped drive through my SQL Server. Even if I type the entire path, SQL Server wouldn't take it. I don't have a clue about why it is not working. Can anyone throw some light on this. Your help is grately appreciated.

Thanks,
Varma

View 2 Replies View Related

Why We Allocate .mdf And .ldf On Seperate Drives?

Oct 25, 2004

Hi,
Why we allocate .mdf and .ldf on seperate drives?
Please tell me a proper logical reason behind it.

View 2 Replies View Related

SQL Server Not Showing The Drives

Mar 13, 2006

My sql server is not showing all of my drives in server. Please help me

View 5 Replies View Related

Drives On Perfomance Monitor

Jan 20, 2004

Can someone tell me if it is possible to see the drives on the server using Perfomance Monitor? I so, where are tehy hiding because i struggled the wholed day!

View 6 Replies View Related

Best Practice For Db Design On 2 Drives

Nov 1, 2007

I have a SQL 2000 server that is installed on a Dual Xeon server running win2k. The server has two raid 5 hard drives, a C drive and an E drive.
The C drive is currently where the operating system files are stored as well as the SQL program files. As things stand there are SQL DB and transaction logs strewn between these two drives with no particular logic.
My question is, with two drives as it stands how should I move things around to gain the best performance? For example, should I keep all my data on the E drives and all my transaction logs on the C drives with the OS and the program files?

There are about 10 Databases in use. One database run's the configuration for proprietary predictive dialing software. The other databases are calling information for each campaign we run within the dialing software.

I have enough space on both drives to accommodate the data, its performance I would like to see a difference in.

View 6 Replies View Related

Query For Full Drives

Apr 22, 2015

SQL Windows Server: 2008 R2
SQL: 2008 R2

Problem: I have following drives on this server, Is there a query that I can run daily which will show us the % full and remaining storage capacity on these drives?

Logs(L)
Data(M)
Tempdb(T)

I would like to run that query on all of my servers to get a daily report.

View 6 Replies View Related

Drives In A Cluster Environment

Jul 24, 2006

Hi,



I have a SAN and configuring a cluster on SQL 2005. I initially created a Quorum drive when setting up the cluster and now added 4 more drives to the physical node but when I try to install SQL that drive cannot be located.

Do we need to create all the drives when installing the cluster or what is the way to add the drives later on.



Thanks

Anup

View 9 Replies View Related

Mirroring Hard Drives

Jul 16, 2007

I have a 75 GB hard drive and a 300 GB. I want to mirror the 75 to the 300 and use the extra space as data storage. Is this possible if I partition the 300 and then mirror the hard drives.

Thanks

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved