Sql Server Keep Connection Opened

Feb 2, 2007

Hi,

I am working with SQL Server 2005 and Vb.NET, this program is connected to a serial port where it might start receiving lots of data and stores it in the SQL db, but also it could be without receiving anything for hours.

I have discovered that sometimes data arriving is faster than opening the connection to db and an exception is thrown, so I am thinking about leaving the connection opened forever since the program is the only client who connects to that database.

How could I leave the connection opened forever ? or if there's a better way to achieve it I would be eternally thankful.

I am using: SqlClient.SqlConnection

Thanks in advance.



George.

View 1 Replies


ADVERTISEMENT

SQL Server 2008 :: SSMS - XML Resultset Not Opened In New TAB

May 7, 2015

If you write a query that outputs XML, you'll have a long string in the Results window/tab that is also a link. Clicking on this link opens a new tab in SSMS with the formatted XML string easier to read.

My issue is that clicking on the link opens the "formatted XML string" tab ON THE SAME tab as my code and no way to go back to my code after that ... I need to reload the query from disk, if saved, to erase the "formatted XML" window.

View 0 Replies View Related

Error 1429: A Server Cursor Cannot Be Opened...

Sep 12, 2006

Using SQL native client from VFP 9.0 to SQL Server 2005 64 bit SP1 (happened before SP1 too)..

We have a stored procedure that returns 6 result sets. This SP uses 2 cursors. It is rather lengthy - I'll post the code if needed.

This SP works fine when called from VFP 99 percent of the time. Normally takes 2 to 3 secunds to execute.

Once in a while we will get a return from SQL ..

"OLE IDispatch exception code 0 from Microsoft SQL Native Client: A server cursor cannot be opened on the given statement or statements. Use a default result set or client cursor..."

The OLE error code is 1429. An OLE Exception code 3604 is also returned.

When this happens the SP will return the same error when executed for the same parameters over and over when called from VFP. When called directly from SQL management console it will normally work for the same parameters, although once in a while it will just hang (and not timeout apparently). In that case it will also hang from SQLCMD command line utility as well.

Wait a few hours and the SP will run fine for the same parameters in VFP. This happens even in the middle of the night when there is no possibility that data is being changed.

Here's the really fun part...

Open the SP source for modification (ALTER PROCEDURE) in management console and execute it (no changes at all, just let it recompile). Immediately it will work fine when called with the same parameters called from VFP or anywhere else (even if it was one of the rare instances where it hung in management console). This works EVERY TIME.

Sooo... I edited and executed the SP with the WITH RECOMPILE option assuming that that should do the trick (same as alter procedure/executing from management console right?). NOPE. Same problems. In order to work around the problem when the error occurs, I HAVE TO alter procedure and execute the code from management console.

Help??

Bill Kuhn - MCSE

The Kuhn Group, Inc.

http://www.kuhngroup.com



View 2 Replies View Related

Can SQL Express Db Be Opened With SQL Server 2005 Management Studio?

Apr 28, 2008

I'm trying to open a SQL Express database (MDF) with SQL Server 2005 management Studio.  Is that possible?  I'm getting the following error: 
 The specified file is either not a SQL Server Compact Edition file  or is corrupt.
It opens fine in Visual Studio 2005.
Also, is it possible to run a script in Visual Studio 2005?  If so, how?
Thanks, Alex

View 1 Replies View Related

SQL Server 2012 :: Calculate Failure Rates Of Systems Based On Cases Opened Through Support

Jun 5, 2014

I am trying to build a query which will be used in an automated report to calculate failure rates of systems based on cases opened through support. Here is where I am stuck. Some systems may have multiple cases opened within the same span of another cases however we would consider this one failure:

System ACase12013-07-11 13:17:09.0002013-07-15 12:05:03.000
System ACase22013-07-12 16:27:50.0002013-07-12 16:29:12.000
System ACase32013-07-12 17:30:32.0002013-07-12 17:40:11.000
System ACase42013-07-12 19:00:24.0002013-07-12 19:04:14.000
System ACase52013-10-01 18:02:23.0002013-10-01 18:11:26.000

Lets say System A generated those 5 cases however Case 2,3 and 4 all happened within the same period as Case 1 so those 4 cases should count as one failure so my end result should be

System ACase12013-07-11 13:17:09.0002013-07-15 12:05:03.000
System ACase52013-10-01 18:02:23.0002013-10-01 18:11:26.000

And that system should show me 2 failures. I was thinking of using a temp table but not sure if that is possible as I am stumped on how to compare the dates to be able to validate if they fall within the range of an older case and whether or not to include them into the new Temp Table.

View 8 Replies View Related

The Database 'x.MDF' Cannot Be Opened Because It Is Version 611. This Server Supports Version 607 And Earlier??

Mar 11, 2006

Hi,

I have tried to attatch a database ,created by SQL server Express within a C# application , in SQL server 2005 Enterprise edition, but the following error message appears:

-----------------------------

TITLE: Microsoft SQL Server Management Studio
------------------------------

Attach database failed for Server 'MEDO'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft SQL Server&ProdVer=9.00.1187.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach database+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

The database 'E:X.MDF' cannot be opened because it is version 611. This server supports version 607 and earlier. A downgrade path is not supported.
Could not open new database 'E:X.MDF'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948)

------------------------------



so , how can I solve this problem , I need to reed the data resides in the tables of 'X' database , how can I do it?? please help me.



Thanks in advance for any help.

Aya.

View 7 Replies View Related

MDF Cannot Be Opened,How Can I Do?

Jan 23, 2006

The default web diretory works on my locathost,but when I upload to the free website, http://dehim.aspx.sk/  I'm getting the following error.
The database 'D:LOCALUSERDEHIMAPP_DATAWAPDATABASE.MDF' cannot be opened because it is version 611. This server supports version 603 and earlier. A downgrade path is not supported.Could not open new database 'D:LOCALUSERDEHIMAPP_DATAWAPDATABASE.MDF'. CREATE DATABASE is aborted.An attempt to attach an auto-named database for file D:LocalUserdehimApp_DataWapDatabase.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
How do I  downgrade the database to match server?
 

View 3 Replies View Related

Database X Cannot Be Opened

Feb 7, 2012

I'm working on a SQL Server 2005 mirroring database test.The idea is to stop main DB server and activate the standby being mirrored (pretendng that principal DB Server is down)

Mirror works fine.
But for the test I do the following:

- Stop the principal SQLSERVER
- Connect to the standby server and execute the followng:

sqlcmd -S <IP> -d master -U opmirror -P xxxxx -Q "ALTER DATABASE DB_NAME SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS;"

And it returns this error:
"Database 'DB_NAME' cannot be opened. It is in the middle of a restore"

Why can't the standby database be opened?

View 3 Replies View Related

Sqlncli.msi Could Not Be Opened

Mar 23, 2007

I was trying to update a named instance of SQL Express SP1.  I double clicked it and during extraction I get this error message:

The file C:Document and SettingsByersNLocal SettingsTempBSISQLEXP05TRACTsetupsqlcli.msi could not be opened. 

SQL Express came bundled with another porgram so I'm thining it could be a bad cd.  I also thought about reinstalling Windows Installer 3.1.  Anybody experience this error?

 

 

 

View 3 Replies View Related

Database 'dbname' Cannot Be Opened Because Its Ver

Apr 1, 2007

i have curputed mdf and ldf file for ms sql 2005

i have tried to put the db in standby mode and when i try to run dbcc checkdb or any other command i get this message

Database 'dbname' cannot be opened because its version (611) is later than the current server version (539).


but without standby mode i get this error

TITLE: Microsoft SQL Server Management Studio
------------------------------

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

Could not find row in sysindexes for database ID 40, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes. (Microsoft SQL Server, Error: 602)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=602&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

View 2 Replies View Related

Cannot Be Opened Due To Inaccessible Files

Dec 21, 2007

Hi All,

Does anyone knows what is the reason behind following error ? And resolution for that ?

Server: Msg 945, Level 14, State 2, Line 1Database 'Blaster' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.

Thanks in advance,

--kneel

View 1 Replies View Related

2005: Database Cannot Be Opened

Jun 12, 2006

Hello,Could you explain me please the following error:"Database 'DemoDotNET' cannot be opened due to inaccessible files orinsufficient memory or disk space. (Microsoft SQL Server, Error: 945)"I have checked: free disk space is large enough, I have much enoughmemory, other files in the directory are accessible.Here is tail of ERRORLOG:2006-06-12 21:19:55.68 Logon Error: 18456, Severity: 14, State:16.2006-06-12 21:19:55.68 Logon Login failed for user 'PCRobert'.[CLIENT: <local machine>]2006-06-12 21:20:43.39 Server Server resumed execution afterbeing idle 1 seconds: user activity awakened the server. This is aninformational message only. No user action is required.Please help to solve this.Thank you./RAM/

View 3 Replies View Related

Help - How Can I Keep A Javascript Opened Window On Top?

Oct 18, 2007

Hi All.



So what I'm trying to do is open a new report in a new window(which I can already do) and keep that new window above all other windows.



Here is the code I'm using to open the new window.



javascript:void window.open('http://reportserver2/ReportServer/Primavera/?%2fprimavera%2fcustom+reports%2fIT%2fUnder+Review+Rup+Commitment+IT+Artifacts+subreport&rc:Toolbar=False&rs:Command=Render&pickITDeliveryOID=" & Fields!OID.Value & "', 'Test', 'location=0, menubar=0, toolbar=0, resizable=0, width=450, height=200')



It works great. I'm able to open the window and target links back to the same open window. But what I can't do is keep that window on top above all of the other windows. That is without closing the newly opened window and reclicking another link.



Is there someway for me to set the focus to the newly opened window so it will always remain above all other windows? I know this can be done with javascript(Code below would do the trick) but I'm just not sure how to incorporate the scripts into reporting service.



var newwindow;
function windowopen(url)
{
newwindow=window.open(url,'name','height=400,width=200');
if (window.focus) {newwindow.focus()}

}


<a href="javascript:windowopen('poppedexample.html');">Pop it</a>



Any help would be greatly appreciated
Thanks

View 1 Replies View Related

Database 'msdb' Cannot Be Opened

Jun 6, 2006

Anyone help?

I opened SQL Server management studio and tried to connect with the local database and received the error message:

Database 'msdb' cannot be opened. It has been marked suspect.....

I have pasted the only error from the event log I could find below, but it doesn't mean much to me.

In the event I can't find what the problem is, and not being a database administrator, can anyone tell me what I can do to get back in working order without messing up all the databases in my SQL Server 2005. I'm afraid I only have a MASTER backup from several months ago, and am afraid if I use this, I will loose the latest data. I'm a novice, and do not understand the relationship of the master/msdb/model databases to my core custom databases. Can I do some sort of master rebuild without affecting the other databases I have?

I have tried sp_resetstatus but this didn't fix the problem, but it did enable me to actually connect to the SQL server instance so I could access all the other databases.

Many thanks
Gerard

Event log error detail:

The log scan number (152:284:1) passed to log scan in database 'msdb' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.

View 19 Replies View Related

Database 'ReportServer$SQLExpressTempDB' Cannot Be Opened

Jul 23, 2007

When I try the open the report file, I got the following error message. Database 'ReportServer$SQLExpressTempDB' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details. Anyony have ideas to fix this error?

View 3 Replies View Related

SQL 2012 :: Query Did Not Run / Or Database Table Could Not Be Opened

Dec 15, 2014

I have a view saved on server - mhsvi-datawarehousedatawarehouse.This view, in it's TSQL connects to a databasethat is set up as a linked server. That server is mhsvi-sql2008ainstance1.When I try to add the view to Excel in order to automatically refresh for users as a report - I get the following error - (I get it as well)

The query did not run, or the database table could not be opened.Check the database server or contact your database administrator. Make sure the external database is available and hasn't been moved or reorganized, then try the operation again.I have access to the database where the view is saved and the database that the TSQL calls.

View 6 Replies View Related

File Could Not Be Opened In Bulk Insert Task

Apr 2, 2007

hi



with my ssis-package i have to read several flatfiles. this files are stored in different folders on a unix machine. in my loop-task i have first a script, that checks whether the file exists. it does, so i set the path to a variable. in the connection-manager for the flat-file i have set source for the file to that variable. the bulk-insert-task starts, read the file and everithing is cool. but, sometimes, the package fails with this message:



[Bulk Insert Task] Error: An error occurred with the following error message:
"Cannot bulk load because the file "\Owpu0kas005
eceivedw000005.090"
could not be opened. Operating system error code 53(error not found)."



i stop the degugging-mode, restart debuging and what happens? it runs ... maybe for the next one, two or three files and the error comes again, but never on the same file. i'm going crazy, what can i do?



thanks for your help.

View 3 Replies View Related

Help: How Do I Change Database Within An Opened Cursor Block??

Dec 4, 2007

Hi All:

Can anyone point out what's wrong with the following script? I wanted to print all the LOGFILE names in all databases which are not in SIMPLE recovery model. Thanks in advance.

Jim



USE masterDECLARE @db_name nvarchar(100), @log_name nvarchar(100);DECLARE DB_Cursor CURSOR FORselect name from msdb.sys.databases where recovery_model_desc <> 'SIMPLE';OPEN DB_Cursor FETCH NEXT FROM DB_Cursor INTO @db_name WHILE @@FETCH_STATUS = 0 BEGIN USE @db_name -- Can I do this? GO select @log_name = name from sys.database_files where type_desc ='LOG'; print @log_name; ENDCLOSE DB_CursorDEALLOCATE DB_CursorI got the following error:Msg 102, Level 15, State 1, Line 13Incorrect syntax near '@db_name'.Msg 137, Level 15, State 1, Line 1Must declare the scalar variable "@log_name".Msg 137, Level 15, State 2, Line 2Must declare the scalar variable "@log_name".

View 3 Replies View Related

Problems With Merging Raw Files Opened As Variables

Aug 18, 2006

I have a group of parallel dataflow tasks that produce raw file outputs that I then want to merge together in a subsequent task. I use variable names for the raw file outputs because I want to the path to the files to be easy to configure for different deployment environments. Therefore, I've got a package scoped variable called pkgRawFileFolder and in each of my parallel tasks my raw file destination is derived from another variable scoped at the task level, called tskRawFileOutput which is evaluated as an expression equal to [User::pkgRawFileFolder]+"/RawFile_1" or similar (the name of the rawfile isn't important as long as each parallel task uses a different name).

In the container task that performs the merge, I want a Foreach loop that iterates [User::pkgRawFileFolder], finds each file and assigns it to another variable scoped to the merge task called tskRawFileInput. Inside the loop I want a dataflow task that uses the raw file defined by tskRawFileInput as input and just appends to another raw file or maybe a database table as output.

The problem I have is that designer wants the metadata for a raw file source before I can get much further. The usual trick, i.e. provide a "template" raw file, doesn't work here because my raw file source name has to come from a variable and I can't just plant a value in the variable to satisfy the designer because then I have to set the "Evaluate as Expression" property to false. As soon as I set it back to true again I get:
Raw File Source [1]: The file name is not properly specified. Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

Anyone else tried a similar thing or can suggest an alternative approach?

View 8 Replies View Related

SQL 2012 :: Query Toolbar Does Not Display For Files Opened From TFS

Feb 18, 2015

When I open a new query or a file that is not under source control, I get a tool bar like the first image below.

When I open a query from a TFS project (second image), the toolbar is not available, and I cannot find a way to turn it on.

How to control this feature?

View 4 Replies View Related

Read Only Permission To Reports When They Are Opened In Visula Studio

Feb 8, 2008



Hi,

I created some reports and save rdl files in a shared folder. Now some of managers want to view those reports using visual studio or BIDS(not from report manager). But they should not have access to modify the report and they can only open the rdl file and preview it.
so i'm trying to set up security level to this folder so that they can only view the rports. So I gave read, read attributes and read data permission to that folder. But still not only I can open the file but can change it too.
Does any one know how to set this security level so that when the rdl file is opened using VS, that perticular group can only preview reports?

Thanks

View 7 Replies View Related

Package Taking 100% Of The CPU When It Is Opened For Editing In Visual Studio

Jun 26, 2007

I have a package that I was able to edit a week before. But now it is consuming all CPU memory (100%) and not letting me to edit the package (When I try to edit that it says Visual Studio Is busy even after an hour waiting).

Even though I have not changed anything, the package is behaving like this.

I would appreciate any reply on this?

Thanks in advance

View 6 Replies View Related

SQL 2000 TO MS ACCESS DTS Error Message Opened Exclusively By Another User

Aug 8, 2006

I would like to password protect my MS Access Database which is being exported to from SQL 2000 using DTS, but when I password protect it, I get an error message stating "The workgroup information file is missing or opened exclusively by another user". The ACCESS file has to be opened exclusively to add password protection. Any suggestions?

View 1 Replies View Related

Flustered... A Database With The Same Name Exists, Or Specified File Cannot Be Opened, Or It Is Located On UNC Share.

Dec 5, 2006

Hello everyone,

I have been playing with a Standard Version of VS 2005 and SSE 2005 and I just cannot get these two to interact together well. I am sure it is a noob problem but I have seen this error addressed on this forum and I am just not getting it. Here is exactly what I am doing.

I want to create a database within SSE using the Management Studio. Then, I want to connect to it with VS2005. Both SSE and VS2005 are local. I just cant seem to get this to work.

I always seem to get this error "An attempt to attach an auto-named database for file C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataSecond.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

One thing... I create the website with Location: HTTP. I don't even know anymore why I do this.. I think because I like to be able to pull up a browser and get to my app. Other than that I am doing nothing special. However, I get the above error when I hit F5 to run the app inside VS2005.

Is there someplace where a complete noob can find a thorough and simple covering of this? Again, I have read through some of the previous posts on this and I don't understand too many of them and it seems as if there are at least 13 causes of which I don't know which one I have. Help!

Thanks.

View 30 Replies View Related

Meta Data Services SQL 2000 Msdb Database Could Not Be Opened

May 26, 2006



Hello anyone / everyone,

If you are having trouble accessing Meta Data Services on W2k3 and SQL 2000 and get the error that the "msdb database could not be opened" I found that hot fix 912812 on the operating system is the culprit. Remove it and Meta Data goes back to working, although I am being asked to approve the ActiveX control every time the page refreshes.

Hope this helps somebody, to took me long enough to track it down.

If anyone has a resolution to the ActiveX question I'd love to know the answer.

Thank you,

Uncle Davy


View 5 Replies View Related

Integration Services :: Check If Excel File Is Opened Or Not - SSIS Script Task

Nov 13, 2015

Now I'm trying to implement logic to check if excel file is opened or not if open send out email in Script task. Using c#

I'm using this one but it's not working fine. always give me file is opened

public void Main()
        {
            Boolean FileLocked = true;
                // Check if the file isn't locked by an other process    
                try

[Code] ....

View 4 Replies View Related

Cannot Start Your Application. The Workgroup Information File Is Missing Or Opened Exclusively By Another User.

Aug 24, 2007

hye everyone,
when i browse my web application the eror as below display..
what should i do..
any suggestion or tips...

"Cannot start your application. The workgroup information file is missing or opened exclusively by another user. 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.OleDb.OleDbException: Cannot start your application. The workgroup information file is missing or opened exclusively by another user. "


thanks in advance..
thank you very much..

View 1 Replies View Related

RDA Push Error Another User Has Opened The Database With Different Instance-level Initialization Properties. [ 32 ]

Mar 3, 2008



Hi all,

I'm using VS2005 + SQL Compact 3.1 and Enterprise Library 3.1 May 2007

I can successfully create a db using pull method, when I try to push back data I got the following SQLCE error:

"Another user has opened the database with different instance-level initialization properties. [ 32 ]"

Before calling the push method I did

SqlCeDatabase eCE = Helper.GetDB() as SqlCeDatabase;
eCE.CloseSharedConnection();
SqlCeConnectionPool.CloseSharedConnections();
SqlCeRemoteDataAccess rda = new SqlCeRemoteDataAccess();
rda.InternetUrl = webSynchronizationUrl;
rda.InternetLogin = webuser;
rda.InternetPassword = webpass;
rda.LocalConnectionString = eCE.ConnectionStringWithoutCredentials;


but after the assignment the LocalConnectionString is different from ConnectionStringWithoutCredentials, there are much more ssce parameters.

What I don't understand is:

why I'm getting this error even after closing the connection ?

Since the error report [32] the ssce conflicting parameters shoud be AUTO_SHRINK_THRESHOLD, FLUSH_INTERVAL and MAX_DATABASE_SIZE

I tried to cut & paste the same values from LocalConnectionString into app.config connection string, at first It seemed to work, but now I got the same error.

Any help will be greatly appreciated



Thanks

View 3 Replies View Related

Database (model) Cannot Be Opened Due To Inaccessible Files Or Insufficient Memory Or Disk Space

Aug 4, 2015

How to fix this SQL error event logg 17204 and 17207 ?

View 8 Replies View Related

Error While Establishing A Connection To The SQL Server 2005 - Could Not Open A Connection To SQL Server

Apr 12, 2007

Hi, I had an old web application created during asp.net 1.1 and it have a connection problem with the sql server 2005 when it is mirgrated to a new webserver with dotnet framework 2.0 platform. I have enabled the remote access(TCP/IP and named pipes) in sql server 2005, did all the neccessary things, check whether the TCP/IP is enabled, named pipe is enabled...  I created another web application using VS 2005. The database connection works perfectly well.This are the connectionString from the old web application.<appSettings>    <add key="ConnectionString" value="Server=127.0.0.1;Database=somedb;User id=user; Password=somepassword; Trusted_Connection=False; POOLING=FALSE"/></appSettings>  Thankyou in advance! 

View 4 Replies View Related

SQL Server 2008 :: Failed To Acquire Connection (Local Server Connection)

May 5, 2014

Occasionally I'm seeing the following error when tranlog or full backup maintenance plan is executing.

Failed-1073573396) Failed to acquire connection "Local server connection". Connection may not be configured correctly or you may not have the right permissions on this connection.

What is strange is that it goes away without any action from myself. We have a tranlog backup that is scheduled every hour. I had this error happen once in the middle of the night. It looks like the job was running fine because almost all the backups are there. I've searched and not found a resolution to this error. I checked the event log and don't see any issues and even tried rebuilding the maintenance plans.

View 7 Replies View Related

Error: Cannot Start Your Application. The Workgroup Information File Is Missing Or Opened Exclusively By Another User.

May 7, 2008

Hi all,
I'm kinda new at programming, and am currently attempting to create a web application.  I have an error when I try to insert information into a sql server database, and can't find how to fix it no matter how hard I try.
The error I get is: Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
I have it so a user is logged in and is shown a form to fill out, then submits it (which creates an insert statement and sends it to the database).
My connection string is as follows:
CnnString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "data source=serverdestination;" + "User id=user;" + "Password=pass;";
If you need any more information, just let me know.
Any help would be greatly appreciated!

View 2 Replies View Related

Cannot Bulk Load Because The File Could Not Be Opened. Operating System Error Code 5(Access Is Denied.).

Jan 23, 2007

I am facing a issue with bulk upload on Test Server.

Issue: When running Openrowset command from SQL server other that Test Server query runs fine when trying to run the same command from Test Server it gives error.

Msg 4861, Level 16, State 1, Line 1

Cannot bulk load because the file "\ServerNameinputFileName.csv" could not be opened. Operating system error code 5(Access is denied.).

For example: If the command is run from System A connecting to SQL Server instance on Test Server Test Server it gives this error. If the same command with same rights is run from any other SQL server instance say Dev1 its running fine.

If the command is run from Test Server connecting to any SQL Server instance including Test Server it is running fine.

Tried: 1) Given the read/write rights on shared folder, to user under which the SQL server service is running on Test Server

2) Given the read/write rights on shared folder to everyone.

Query:

SELECT DISTINCT * FROM OPENROWSET

(

BULK '\ServerNameinputFileName.csv',

FORMATFILE='\ServerNameFormat.xml'

)

AS FileList



Please provide me with some solution. What can be the reason for such behaviour?

View 22 Replies View Related







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