Can I Used A Shared Drive Rather Than A Mapped Drive With OpenRowSet?
Apr 4, 2008
Hi
I have been trying to use openrowset with a shared drive, and even though the share has "full control" permissions granted to "everyone" and the accout that SQL runs under has been granted explicit full control permissions I am unable to open the file which itself has no security on it.
Can I not use a \ path and only use mapped drives?
Thanks
below works...
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=C:5People.xls', [Sheet1$])
below doesn't work...
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=\cluster02FileManager5People.xls', [Sheet1$])
View 3 Replies
ADVERTISEMENT
Nov 15, 2005
I created a DTS local package on the SQL Server. It's basically importing a text file into a table in my database. This file resides in a mapped drive (X:) from another server. When I schedule the DTS as a job, it fails. It doesn't execute any of the workflow in the design.
However, when I copy the text file into a drive local to the SQL server (D:), it runs flawlessly.
What I do right now is I have a windows scheduled task that runs a batch file that copies the text file from X: to D: at certain time intervals. Then the job scheduler runs to import it.
What am I missing? How come the job scheduler can't read the file directly from the mapped drive?
Any info would be appreciated. TIA
View 2 Replies
View Related
Oct 16, 2007
Hey guys
I am having a problem with a DTS package that pulls from a flat file off a mapped drive. When the package is ran alone, it runs perfectly but the stored proc that I took from an example from the net will not execute the DTS properly and I am unsure as to why it will not do so.
CREATE PROC spExecuteDTS
@Server varchar(255),
@PkgName varchar(255), -- Package Name (Defaults to most recent version)
@ServerPWD varchar(255) = Null,-- Server Password if using SQL Security to load Package (UID is SUSER_NAME())
@IntSecurity bit = 0,-- 0 = SQL Server Security, 1 = Integrated Security
@PkgPWD varchar(255) = ''-- Package Password
AS
SET NOCOUNT ON
/*
Return Values
- 0 Successfull execution of Package
- 1 OLE Error
- 9 Failure of Package
*/
DECLARE @hr int, @ret int, @oPKG int, @Cmd varchar(1000)
-- Create a Pkg Object
EXEC @hr = sp_OACreate 'DTS.Package', @oPKG OUTPUT
IF @hr <> 0
BEGIN
PRINT '*** Create Package object failed'
EXEC sp_displayoaerrorinfo @oPKG, @hr
RETURN 1
END
-- Evaluate Security and Build LoadFromSQLServer Statement
IF @IntSecurity = 0
SET @Cmd = 'LoadFromSQLServer("' + @Server +'", "' + SUSER_SNAME() + '", "' + @ServerPWD + '", 0, "' + @PkgPWD + '", , , "' + @PkgName + '")'
ELSE
SET @Cmd = 'LoadFromSQLServer("' + @Server +'", "", "", 256, "' + @PkgPWD + '", , , "' + @PkgName + '")'
EXEC @hr = sp_OAMethod @oPKG, @Cmd, NULL
IF @hr <> 0
BEGIN
PRINT '*** LoadFromSQLServer failed'
EXEC sp_displayoaerrorinfo @oPKG , @hr
RETURN 1
END
-- Execute Pkg
EXEC @hr = sp_OAMethod @oPKG, 'Execute'
IF @hr <> 0
BEGIN
PRINT '*** Execute failed'
EXEC sp_displayoaerrorinfo @oPKG , @hr
RETURN 1
END
-- Check Pkg Errors
EXEC @ret=spDisplayPkgErrors @oPKG
-- Unitialize the Pkg
EXEC @hr = sp_OAMethod @oPKG, 'UnInitialize'
IF @hr <> 0
BEGIN
PRINT '*** UnInitialize failed'
EXEC sp_displayoaerrorinfo @oPKG , @hr
RETURN 1
END
-- Clean Up
EXEC @hr = sp_OADestroy @oPKG
IF @hr <> 0
BEGIN
EXEC sp_displayoaerrorinfo @oPKG , @hr
RETURN 1
END
RETURN @ret
GO
that is the stored proc that i am using along with a couple error trapping ones but this being the one that does the actual execution. Is there anything i can change about this in order for it to run the DTS properly from the mapped drive?
thank you
View 5 Replies
View Related
Jan 22, 2001
From my workstation (with SQL Server 7 Desktop Edition SP3), I seem unable to restore a database on my Server (SQL Server Standard Edition SP3). I am logged into both machines, and I am an Administrator on both machines. Using either a UNC or Mapped Drive (see below)
RESTORE DATABASE ogAEC FROM ogAECDump WITH REPLACE , RECOVERY , STATS
, MOVE 'AEC_Data' TO 'Og-sqlsrvrC-DriveMSSQL7DataogAEC_Data.MDF'
, MOVE 'AEC_Log' TO 'Og-sqlsrvrC-DriveMSSQL7DataogAEC_Log.LDF'
RESTORE DATABASE ogAEC FROM ogAECDump WITH REPLACE , RECOVERY , STATS
, MOVE 'AEC_Data' TO 'Q:MSSQL7DataogAEC_Data.MDF'
, MOVE 'AEC_Log' TO 'Q:MSSQL7DataogAEC_Log.LDF'
I get
Server: Msg 3156, Level 16, State 2, Line 1
The file 'Og-sqlsrvrC-DriveMSSQL7DataogAEC_Data.MDF' cannot be used by RESTORE. Consider using the WITH MOVE option to identify a valid location for the file.
But I am successful if I run the essentially command locally from the server:
RESTORE DATABASE ogAEC FROM ogAECDump WITH REPLACE , RECOVERY , STATS
, MOVE 'AEC_Data' TO 'C:MSSQL7DataogAEC_Data.MDF'
, MOVE 'AEC_Log' TO 'C:MSSQL7DataogAEC_Log.LDF'
What can I do to be able to restore DBs from my workstation?
View 1 Replies
View Related
Mar 23, 2004
Is it possible to create a database (MSSQL2k) on a mapped drive which is not a SAN?
Thanks,
Peter Schauss
View 3 Replies
View Related
Mar 1, 2001
Hi,all.
I tried to issue:
sp_attach_db pubs,'F:anthonypubs.mdf','F:anthonypubs.ldf'
where the pubs.mdf and pubs.ldf are on a remote mapped drive F:,
I got error:
Server: Msg 5105, Level 16, State 4, Line 1
Device activation error. The physical file name 'f:anthonypubs.ldf' may
be incorrect.
Is attaching a database ONLY supported for local servers ??
What about creating database on remote drive? (I have same error msg back)
Thx
Anthony
View 1 Replies
View Related
Aug 6, 2003
I am new to the DB Administration.
How do i back up the data to a network drive mapped on a day to day basis.
View 4 Replies
View Related
Mar 20, 2002
Hi,
I have a rather odd problem that hopefully you'll be able to shed some light on.
We want to back up the databases to a hard drive held on another server so I mapped the drive in explorer to the drive then went into Enterprise manager and tried to create a backup device and it won't see the mapped drive.
I've tried mapping to my PC and I can see that via enterprise managers backup stuff (infact any PC in the office works) but it won't see any of the servers even though we can map to them and access them via windows explorer.
I've tried when logged on via sa and the windows NT administrator and still no luck. In fact no matter what I type or do it fails and keeps telling me device error or device off line which it isn't.
On our test instance of SQL Sever we can backup to other servers but not the new live version!
Any thoughts on what might cause this to happen and how to fix it?
Help much appriciated.
Thanks Helen
View 1 Replies
View Related
Mar 20, 2002
Hi,
I have a rather odd problem that hopefully you'll be able to shed some light on.
We want to back up the databases to a hard drive held on another server so I mapped the drive in explorer to the drive then went into Enterprise manager and tried to create a backup device and it won't see the mapped drive.
I've tried mapping to my PC and I can see that via enterprise managers backup stuff (infact any PC in the office works) but it won't see any of the servers even though we can map to them and access them via windows explorer.
I've tried when logged on via sa and the windows NT administrator and still no luck. In fact no matter what I type or do it fails and keeps telling me device error or device off line which it isn't.
On our test instance of SQL Sever we can backup to other servers but not the new live version!
Any thoughts on what might cause this to happen and how to fix it?
Help much appriciated.
Thanks Helen
View 1 Replies
View Related
Mar 20, 2015
Although clearly not best practice for a produciton DB, is it supported to attach MDF/LDF files that are hosted on a network drive?
I have been exploring options to host a read only archive database that we need to access on a very short term adhoc basis.
View 2 Replies
View Related
May 22, 2006
I am setting up 4 Windows 2003 server with SQL server 2005 .
I am using a new SAN device and I am setting up over 37 separate devices.
Three of the machines will be the production machines. The fourth machine will
contains log shipped copies of 37 databases.
I would like to keep each the 37 databases on its own device on the new SAN device.
The problem that I am running into is that I can only map drives up to the letter Z .
Is it possible to map more than 26 drives on a Windows 2003 server ?
View 1 Replies
View Related
Oct 16, 2014
I'm trying to create a job that will copy a backup file from a mapped network drive to a local folder however it keeps failing due to a privilege.
The command is:
copy 10.10.10.5f$ est.nightly H:MSSQLBackup est.nightly
I can run the command successfully from the command prompt, however using the same command in a SQL Server job it fails with "Access is denied".
How do I configure the mapped network drive to allow the Sql Server Agent to get access to it?
View 1 Replies
View Related
May 11, 2000
Hi,
I have a shared drive mapped to the h: drive letter on my sql server and I want to create new databases on that drive. Is this at all
possible?
I try it and I couldn't see h: even if I typed it in.
Thanks
View 2 Replies
View Related
Nov 3, 2006
Hello, everyone:
I want to write a query to check a remote shared drive. The shared drive is mapped as T drive in my local. I run the statement,
EXEC master.. xp_cmdshell 'DIR C:'
It works. If I change to T drive like,
EXEC master.. xp_cmdshell 'DIR T:'
It dosen't work and returns,
"The system cannot find the path specified."
But I run DIR T: in DOS prompt, it works.
Any help will be great appreciated.
Thanks a lot.
ZYT
View 4 Replies
View Related
May 18, 2004
I have an Access2000 app placed on a shred drive. The problem i am having is that users leave it opened and take long breaks. Sometimes they leave it overnight. I would like to make corrections to the form but can't. How can I save and close all users. I would like to send a message telling all users to save any changes and give them 1 minute before shutting down.
Thanks
View 2 Replies
View Related
Jun 11, 2008
Is this possible? I can only seem to restore when the *.bak is on a local drive which is ridiculous. I'm sure this translates to other operations in addition to restoring databases...
View 7 Replies
View Related
Nov 29, 2007
I know , it is not going to work , just wondering if anyone could give any reasons for that. Whether it was intentional constraint or just internally compact edition was designed in particular way which makes such a usage not possible. It is a pity that it doesn't work that way as it would be much easier transitional path for many Visual Foxpro , MS Access applications.
In my case I just want READ-ONLY database either for multi-user access via shared drive or stand-alone on local drive.
View 1 Replies
View Related
Jul 17, 2015
I've one table which is contains sales Tax data and I need to send data(only for past month) to accounting person by every end of the month for Example. Today is July/1/2015 so I need to send data for month of June/2015.
Is there anyway I can setup a job to send a data. Also I am not able to send large file using OUTLOOK so is there any other Tool to send a data?
View 5 Replies
View Related
Jan 6, 2000
Hi
I am having an Access database on a shared network drive which has read/write access rights on the that shared network drive.
When I try to Access data through the linked server it gives me gives me a message box saying you do not have permissions to view the data.
Also if i try to use xp_cmdshell to copy over the mdb file to my local drive it say 'Access denied'
But when I copy (through command prompt) the same file to another network drive or my local drive where I have full control the linked server can connect sucessfully.
The problem is the i cannot have 'full control' permissions on shared drive where my database resides.
Has anybody encountered this problem....
Any help will be greatly appreciated.
Urgent
Puru
View 1 Replies
View Related
Aug 31, 2015
Is there a way to get access to the files on the shared drive from either of the nodes when the SQL Cluster is shut down?
It doesn't look like there is, but hoping there is some trick. I see how it can be done with a Windows Cluster but not a SQL Cluster.
View 4 Replies
View Related
Sep 8, 2007
Hi
I have VC++ express and MSSQL SMS express and have an application working nicely locally. The Data explorer and data connections part works really easily.
Now, I want to make the application available to my home network.
I mapped the drive where the database is and called it Z: so I could put my "release" on my other network PC and assumed it would find Z: if I mapped the shared network drive on that machine and called it Z:
But: I can't even add the mapped connection on the local machine, I get:
The file "Z:databasescalorie.mdf" is on a network path not supported for database files. An attempt to attach.....etc"
It works fine on the original F drive.......
Am I approaching this the wrong way. How should I distribute to network PCs?
thanks hopefully
David
View 5 Replies
View Related
Nov 9, 2000
I am trying to move a log file from one drive to another.
What I have done is add another file to my file group. So now my log has a file on the 'e' drive and one on the 'f' drive. I now want to remove the file on the 'e' drive. I have emptied the file on the 'e' drive. When doing the command:
ALTER DATABASE Uniprodruntime
REMOVE FILE m_rk_runtime_log
I get the following error message..
Server: Msg 5020, Level 16, State 1, Line 1
The primary data or log file cannot be removed from a database.
I have also gone into enterprise manager and tried to delete the file and it does nothing.
Has anyone run into this?
View 2 Replies
View Related
Feb 12, 2007
How do you compare SAN drive vs local drive on a 32 bit server?
Is it good idea to move my DB files to a SAN instead of local?
Canada DBA
View 4 Replies
View Related
Nov 28, 2015
Server: SQL 2008 R2
1: TempDB keeps getting filled. Restart of the server has not fixed it. I shrink it, but the space gets filled again. Now I can't even shrink it anymore
2: TempDB is at the wrong location. Its current location is this :C:Program FilesMicrosoft SQL ServerMSSQL10_50.SQLPROD6MSSQLDATA empdb
How do I change its location?
C:Program FilesMicrosoft SQL ServerMSSQL10_50.SQLPROD6MSSQLDATA empdb
Correct location of TempDB should be: TempDB(T:) But its not there
View 13 Replies
View Related
Jan 31, 2008
Being a very novice SQL Server administrator, I need to ask the experts a question.
How do I go about moving a database from 1 drive to another? The source drive (C is local to the server, but the target drive (E is on a Storage Area Network (SAN), although it is still a local drive for the server. I want to move the database from C: to E:. Can someone provide me with instructions?
Thanks,
Rick
View 4 Replies
View Related
Jan 16, 2015
How to backup half of dbs from a server on C drive and the other half on D drive and vice versa, first half on D drive and other half On C drive using only one job and one stored procedure??
Using scheduling from job add 2 schedules to the job so first schedule backup first half to C and second half to D , the second schedule backup first half to D and second half to D.
View 1 Replies
View Related
Aug 13, 2004
If my computer has a map drive, i want to delete it, how to do it? Is that right if i right click the map drive and click the disconnect?
View 3 Replies
View Related
Oct 26, 2006
I am installing the X86 Executable version of SQL Server. I copied it to my desktop and clicked RUN. It extracts the files and then the Install Wizard tells me there is not enough space on the C Drive to load the program. I have 23 gigabits of free space and the program only takes about 900 megabits.
Is there a solution to this problem?
Thanks,
Modez
View 2 Replies
View Related
Jun 19, 2002
I'm running out of space on my C. Is it possible to store additional DBs on another drive or do I need to load SQL server onto the new drive?
View 6 Replies
View Related
Jun 6, 2001
Would this be ok for a SQL Server?
Here's what we are thinking about doing:
3x18 GB RAID 5 for OS/apps/database/data.
2x9 GB mirrored for the log files.
(we normally don't have apps on the server besides SQL itself)
Thanks!
View 2 Replies
View Related
Aug 7, 2000
Hi
I have a database(CEB) and my CEB.mdf is on D Drive and CEB.LDF is on
G DRIVE ...NOw I want to move the CEB.LDF on to the different drive ..
can any one suggest me the way and will I have any effect on the database.
It is kind of urgent.
Thanks
RAGHU
View 1 Replies
View Related
Aug 15, 2000
How do I move all the databases to a new drive in the same machine?What effects/problems will be?
Thanks!
View 7 Replies
View Related
Feb 4, 2001
Hi,
What problems will I get if the hard drive for the transaction logs becomes defective? Will this affect transactions and/or backup? What should I do to fix this problem?
View 1 Replies
View Related