SQL Server 2008 :: Unable To Create Folder If Present Already In A Share Path

Jun 1, 2015

I'm, using my script to many location to create folder to save output files and if the folder is removed/not present it can create it without any noise. But the problem is, while I use the same sort of script to check if a folder is present in the sharedpath it will not create it to copy all bkp files from local to remote path works good, but if you delete the folder or rename the exisitng folder and if the below script tries to create the folder it created as "fILE", very interesting. Per IT team they have given SQL Server account the full rights to create/delete/alter folder/files.

Do I need to use seperate script or way to create / alter folders in the sharepath?

SET NOCOUNT ON
Declare @len INT, @i INT, @Left varchar(max), @right varchar(max), @SERVERNAME sysname,@finalServer sysname
declare @rc int, @dir nvarchar(4000)
DECLARE @cmd1 sysname, @cmd2 sysname, @cmd sysname;
Declare @extPAth varchar(max)

[Code] ....

View 5 Replies


ADVERTISEMENT

SQL Server 2008 :: Count Number Of Files Deleted From Share Path?

Apr 23, 2015

SET NOCOUNT ON
Declare @daysOld int,@deletedate nvarchar(19) ,@strDir varchar(250)
declare @cmd11 nvarchar(2000)
declare @mainBackupDir varchar(2000),
@result1 nvarchar(max);

[Code] ....

View 1 Replies View Related

Reporting Services :: RDLs Present In SSRS Folder Path But Not Visible In Report Viewer URL?

Jun 9, 2015

I have an issue as to where only some reports are visible within Report Viewer url. But if I navigate to the path of the rdl's there are many more present that should be visible through Report Viewer. The client was recently upgraded, and I seem to have all out of box roles and permission levels yet can only see some of those reports, as if some were manually copied to this folder location at a later point and perhaps some user job needs to be run to reflect import those additional rdl's?

View 2 Replies View Related

SQL Server 2008 :: Checking Files In A Shared Path If Folder Or File?

Jun 3, 2015

I wrote the below script to print all folders and files located in the share path. How to extend my script to mention by adding another column whether the file is a folder/file , sort of 0 or 1.

declare @chkdirectory1 varchar(4000) = 'shared_pathfolder';
declare @finalserver3 varchar(4000);
create table #tmp (directory_name varchar(4000))
SET @finalserver3 = '''"DIR ' + @chkdirectory1 + ' /B"''';
--select @finalserver3
--SELECT @finalServer
DECLARE @ExecCmd varchar(100)
--SELECT @ExecCmd = 'EXEC master.dbo.xp_cmdshell ' + char(50) + 'mkdir D:'+ CONVERT(varchar(8), getdate(), 112) + '' + char(50)
SET @ExecCmd = 'EXEC master.dbo.xp_cmdshell ' + @finalserver3
--SELECT @ExecCmd
exec(@ExecCmd)
drop table #tmp

View 0 Replies View Related

Reporting Services :: Unable To Show Images From Folder By Reading Path From Database In SSRS Report

Apr 28, 2015

Basically i have 3 images capacity per record in my asp.net application. In there i am saving the image path with record id in database and image in my application folder.

Now i am creating SSRS Report in Report builder . In there i have taken one image control to show the images. In the Image properties in report builder i have chosen database under the select the image source field. then inside use this field i have chosen image url and in use this MIME Type i have selected image/jpeg. Now i have saved this report in report server folder.

Now while calling in .net web from through report viewer control. It is opening the report but wont showing the image.

View 2 Replies View Related

SQL Server 2008 :: Create All Procedures Located In A Folder One By One And Saving Output File

May 15, 2015

I am asked to create 100 procedures to a database. Any best way to create them in a database one by one by calling the files and saving the execution output files in a folder?

View 9 Replies View Related

Unable To Copy App_data Folder Databases On Production Server To A Different Folder Or Location

Sep 19, 2007

I dont alot about sql server 2005(Express edition). For debugging purposes i want to copy  the whole app_data folder(.mdf & .log files) on the production server to another folder on the same machine(or sometimes to a network folder).  So when i copy and try to paste this App_data folder to a new location, i get this error message
"cannot copy ASPNETDB: it is being used by another person or program. close any programs that might be using the file and try again."
After reading the above message, i close visual web developer, stop the website in IIS and stop the SQLExpress service on the server and try again but still get the same message.
So how can i make sure that all the programs accessing these database files are closed such that i'm able able to copy them to a different location.

View 2 Replies View Related

Unable To Create Database In App_data Folder

May 15, 2006

I am using visual web developer with sqlserver2005 express edition. When I try to create a database in the App_Data folder through solution explorer I get the following error message:
Failed to generate a user instance of Sql Server due to a failure in starting the process for the user instance. The connection will be closed.
I am unable to create the database. Can anyone help in solving this problem?
Regards, Sandy

View 1 Replies View Related

Fail To Deliver SSRS Report To A Share Folder In WINDOWS 2000 Server

Apr 29, 2008

SQL server 20005 SP2 is install in my WIN XP machine. I implement a SSRS report and try to deliver the report to a share folder in window 2000 server.

I create and set permissions on a shared folder as per the information in http://msdn2.microsoft.com/en-us/library/ms345228.aspx. The account that I use in subscription is local admin account in the target machine.

I have try path \<servername>c$XXX and \<servername>XXX. Both is not ok.

I find following error message in the log file of reporting service.

ReportingServicesService!library!d!04/29/2008-00:03:40:: e ERROR: Throwing Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider+NetworkErrorException: A logon error occurred when attempting to access the file share. The user account or password is not valid., A logon error occurred when attempting to access the file share. The user account or password is not valid.;
Info: Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider+NetworkErrorException: A logon error occurred when attempting to access the file share. The user account or password is not valid. ---> System.Runtime.InteropServices.COMException (0x8007052E): Logon failure: unknown user name or bad password. (Exception from HRESULT: 0x8007052E)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at RSRemoteRpcClient.RemoteLogon.GetRemoteImpToken(String pRPCEndpointName, Int32 type, Guid dataSourceId, String pUserName, String pDomain, String pPassword)
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.GetImpersonationToken(String userName, String domain, String userPwd)
--- End of inner exception stack trace ---



If I try to deliver same report to a share folder in WIN XP in the same way. It is ok.

View 7 Replies View Related

SQL Server Admin 2014 :: Cannot Access Path When Attaching Database With Data Files On SMB Share

Oct 1, 2014

I have a Windows Server 2012 R2 2 node cluster with SQL Server 2014 FCI installed. Data files are on a separate Windows Server 2012 R2 file server. Data files share has been permissioned to the SQL Server service and SQL Server Agent service accounts as Full Control. NTFS Permissions are Full Control.

When I try to attach a database
CREATE DATABASE AdventureWorksDW2012
ON (FILENAME = 'apricotmssql_VIOLETMSSQL12.MSSQLSERVERMSSQLDATAAdventureWorksDW2012_Data.mdf')
FOR ATTACHI get this error:
Msg 5120, Level 16, State 101, Line 4
Unable to open the physical file "apricotmssql_VIOLETMSSQL12.MSSQLSERVERMSSQLDATAAdventureWorksDW2012_Data.mdf". Operating system error 5: "5(Access is denied.)".

If I log into the file server (called APRICOT) and look at the NTFS permissions they all look good. I have also reapplied the NTFS permissions from the root folder down.

EDIT
If I log on to one of the nodes in the cluster as the SQL Server service account and navigate to apricotmssql_VIOLETMSSQL12.MSSQLSERVERMSSQLDATA and copy and paste the data file, it works fine.

EDIT2:
If I log on to the file server and Enable Inheritance at the root level, then Replace all child objects with inheritable permission entries from this object, I get this error:

User Account Control settings on all nodes and the file server are set to Never notify

View 0 Replies View Related

How To Uninstall Server 2008 Express Instance With Other Instances Present

May 15, 2015

This is probably easy for some who have done it, but I have an installed Instance of SQL Server 2008 Express or SQL Server 2008 R2 Express I'll call Instance CCC and need to remove it.  I have two other Express instances I'll call Instance AAA and Instance BBB.  I want to uninstall Instance CCC without affecting the other two instances or the software that uses them.  Instance CCC should have been installed as a SQL Server 2012 Express instance, so I need to remove the 2008 Instance of CCC and reinstall it as 2012.  In all cases, I'm talking about SQL Server Express.  Full SQL Server is not installed.  

The Instances are all installed on a Windows Server 2008 R2 Standard server.   

I have read that I can do this through Control Panel  >  Programs and Features, but that I can corrupt or mess up the other instances (AAA and BBB) if I don't do it right.  I'm uneasy about this, not having done it before, and do not want to affect the users of the AAA and BBB instances!  

View 6 Replies View Related

SQL Server Admin 2014 :: Check If UNC Path Exists (It Is Folder - Not File)

Oct 29, 2015

usual way to check if file exists

DECLARE @File_Exists INT
EXEC Master.dbo.xp_fileexist 'serverBSQL_Backupfile.bak', @File_Exists OUT
print @File_Exists
1

And if check folder, can use "nul", but it doesn't work for UNC path

DECLARE @File_Exists INT
EXEC Master.dbo.xp_fileexist 'serverBSQL_Backupul', @File_Exists OUT
print @File_Exists
0

If use xp_subdirs like:

EXEC master.dbo.xp_subdirs 'serverBSQL_Backups'

If the folder doesn't exists, Msg 22006, Level 16, State 1, Line 3 xp_subdirs could not access 'ServerBSQL_Backups*.*': FindFirstFile() returned error 67, 'The network name cannot be found.'

how to check if UNC folder exists in Backup? in my code I want to check if the unc folder exists before doing backup, the unc path is retrieved from other table or backup history.

View 6 Replies View Related

Permission Acess The Share Folder.

Jun 22, 2008

hi. i got a question regarding the permission on share folder.
i wonder i am able to do this as below..
if on runtime, after i export the data to xmlfile and i want it to auto save into the SHARE Folder in sql server. can i do that ?

** after press a button, auto export data to xml file, then auto save the xml file to share folder.

View 3 Replies View Related

Share A RSS File For Applying AD-USER To Folder SECURITY?

Mar 19, 2008

Has anyone written a RSS file that is used to add new Active Directory User/Group to SSRS, and applying security ROLES such as BROWSER?

I have new IT AD group that I need to apply to ALL folders on my PROD, QA and DEV servers. Way too many folders to do via SSMS or Web interface.

Would you be willing to share the RSS file?

View 1 Replies View Related

Error While Setting Reporting Service And Share Point Exclusion Path

Apr 14, 2008

I installed SQL Server 2005 Express Edition on my Laptop for use with IIS 7.0; Everything was working fine untill I opened the Report Server Site with WVD 2008, it asked me to Modify the web.config for debugging. After doing that the Report Server Site started showing an error page saying there was a rsInternal error. I tried fixing the Web.config by hand but it dident work, so I tried completly reinstalling the SQL Server 2005 Express Edition. It reinstalled perfectly excluding the Report Server. When it came time to install the Report Server; I got the error message.

The setup has encountered an unexpected error while Setting reporting service and share point exclusion path. The error is: Fatal error during installation.



--Actual Log--


Microsoft SQL Server 2005 9.00.3042.00
==============================
OS Version : Professional Service Pack 1 (Build 6001)
Time : Mon Apr 14 04:41:42 2008

Machine : JEOSYSTEMS-0002
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.3042.00
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0008_JEOSYSTEMS-0002_SQLSupport_1.log
-----------------------------------------------------------------------------
Machine : JEOSYSTEMS-0002
Product : Microsoft Office 2003 Web Components
Product Version : 11.0.6558.0
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0008_JEOSYSTEMS-0002_OWC11_1.log
-----------------------------------------------------------------------------
Machine : JEOSYSTEMS-0002
Product : Microsoft SQL Server 2005 Backward compatibility
Product Version : 8.05.2004
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0008_JEOSYSTEMS-0002_BackwardsCompat_1.log
-----------------------------------------------------------------------------
Machine : JEOSYSTEMS-0002
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.3042.00
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0008_JEOSYSTEMS-0002_SQLSupport_2.log
-----------------------------------------------------------------------------
Machine : JEOSYSTEMS-0002
Product : Microsoft SQL Server Native Client
Product Version : 9.00.3042.00
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0008_JEOSYSTEMS-0002_SQLNCLI_1.log
-----------------------------------------------------------------------------
Machine : JEOSYSTEMS-0002
Product : Microsoft SQL Server VSS Writer
Product Version : 9.00.3042.00
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0008_JEOSYSTEMS-0002_SqlWriter_1.log
-----------------------------------------------------------------------------
Machine : JEOSYSTEMS-0002
Product : Microsoft SQL Server 2005
Product Version : 9.2.3042.00
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0008_JEOSYSTEMS-0002_SQL.log
-----------------------------------------------------------------------------
Machine : JEOSYSTEMS-0002
Product : Reporting Services
Error : The setup has encountered an unexpected error while Setting reporting service and share point exclusion path. The error is: Fatal error during installation.
----------------------------------------------------------------------------
Machine : JEOSYSTEMS-0002
Product : Microsoft SQL Server 2005 Reporting Services
Product Version : 9.2.3042.00
Install : Failed
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0008_JEOSYSTEMS-0002_RS.log
Last Action : InstallFinalize
Error String : The setup has encountered an unexpected error while Setting reporting service and share point exclusion path. The error is: Fatal error during installation.
Error Number : 29528
-----------------------------------------------------------------------------



If anyone knows how to get Report Services to install after Error number 29528 occurs, Please let me know.
Thanks.

View 6 Replies View Related

Unable To Connect To Sql Server Express From Virtual Folder

Apr 11, 2008

My situation: I have one virtual folder on a customer's server that hosts a web service which connects to Sql Server Express. This has been working for months.

The connection string that i use is:
(obviously the names have been changed to protect the innocent)
User ID=auser;Password=apassword;Initial Catalog=acatalog;Data Source=0.0.0.0SQLEXPRESS

I have recently added another virtual folder to the server, and it needs to connect to the same sql server. In this case it is a "regular" web site. I have it set up to use the same connection string as the web services site ( I can't think of any reason why it wouldn't be the same), however when I try to open the connection ( when I call mySqlConnection.Open(); ), I get get this error:


"SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified"

I am stumped as to why code in one virtual folder has no problem, while the other does. Both virtual and physical folders are on the same machine, and the Sql Server Express is installed on that machine.

The server is a MS Windows Server 2003 machine.

More details as requested.

Thanks,
Kirk

View 11 Replies View Related

DB Engine :: Setup Backup Share Folder In Clustered Environment While Setting Up Logshipping?

Oct 25, 2015

I am trying to set up log shipping in a clustered server environment. I am pretty confused about the location of the shared folder to be created to put backup created by  log shipping job. Which drive should I use either local or clustered shared drive to store the backups in primary server and  to copy the same in secondary Server?

View 2 Replies View Related

SQL Server 2008 :: Extract Name From UNC Path

Feb 4, 2015

Running into some difficulty trying to extract a name from a UNC Path. The structure of the UNC Path is this:

server1-1shareusername hispartgoesonandon

I'm needing to extract "username" into a separate column.

View 2 Replies View Related

Get A SQL Backup Folder Path In Asp.net

Aug 2, 2007

 
Hi
 
Anyone knows , get a SQL Backup Folder Path in asp.net.Some Systems it displayed like D:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBackup and some Systems like E:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBackup and etc. i need to get a path for backup programmatically.Please help me.
 
Tamil

View 1 Replies View Related

Folder Path Configuration

Mar 19, 2008

i have created one package which contains flat file source and flat file destin and corres conneciton mgrs.

i created configuration using package configurations with name config.dtxconfig.(while creating it i selected connection string under source file and destination file).

config.dtxconfig contains path as config value for source c:folderfilesourc.txt.and for destination c:folderfiledest.txt





But my req is we have to create another xml named as folderpath.xml should contain the path up to c:folder.for every package execution ssis should access this xml where it should find the folder.

if i want to change the name of folder (or ) move the folder i should change in folderpath.xml only wihout changing folder name in all configuration files.



can i do that.

if not give me alternate solution.plz guide me with clear explanation since i am novice to this tool

View 1 Replies View Related

SQL Server 2008 :: How To Check A Path Existing

Apr 29, 2015

whenever I use the below script, it throws the below error.

declare @DbFilePath VARCHAR(max)
set @DbFilePath = ' c:mdndndmmnsn'
if object_id('tempdb.dbo.#fileExist') is not null
drop table #fileExist

[Code] ....

Msg 0, Level 11, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discarded.

View 2 Replies View Related

Server 2008 Instance Path Change

Jul 3, 2015

Currently we have SQL instance on C:  drive.We are now going to upgrade SQL Server 2008 RTM to SQL 2008 SP4.Can we change the path of SQL instance during upgrade?What services need to be stopped during upgrade.

View 2 Replies View Related

The Setup Has Encountered An Unexpected Error While Setting Reporting Service And Share Point Exclusion Path.

Oct 22, 2006

I got this error message during SQL Server Express install with no error code on Server 2003 SP1. I'm installing on an older development machine and although I do have a very large log file somewhere I wanted to post before I even dug into it. I noticed in IIS under my Webs that the MSSQLExpress webs were there at first but when I clicked on them to get any info or Properties... they dissapeared. So they were almost installed but they no longer exist. Also I do not have a SQL Service Manager icon down near the clock.

I almost took a step to fix this. After reading a few posts about similar problems I thought maybe this happened because the Default Web Sites IP # was not set to (All Unassigned). I was going to try a repair install from Add/Remove Programs but the temporary setup files are already gone. I really dont want to uninstall all 5 SQL components from Add/Remove Programs and start from scratch.

As good security practice we usually remove the Default Web or as in this development servers case we changed the IP from (All Unassigned) to an IP that is only accessible from certain machines on the internal network. I obviously should have read more pre setup guides. Anyway how can I fix this without reinstalling everything?

View 2 Replies View Related

How To Set The Path To The Reports Snapshots Folder?

Mar 15, 2007

We have a statutory requirement to keep 5 years of history, so I've checked the option in the Site Settings page in the Report Manager to "Keep an unlimited number of snapshots in report history". The drives are partitioned as follows:

C: -- OS; 20GB

D: -- Apps; 20GB

E: --Data: 160GB

I want to force the report history snapshots onto the data (E:) drive, but I can't figure out what setting will force them there. Can anyone tell me how to set the path to the reports snapshots folder?

View 1 Replies View Related

SQL Server 2008 :: Can Delete Contents Of Update-cache Folder

Sep 26, 2013

this directory is over 2gb

Program FilesMicrosoft SQL Server100Setup BootstrapUpdate Cache

can you delete the contents safely?

View 1 Replies View Related

SQL Server 2008 :: SSIS - Package To Zip Contents Of A Folder Into One ZIP File

Aug 12, 2015

I have a requirement to create a package that takes all files in a given folder and adds them to a single archive (.zip) file. I've tried several methods using 7zip and while I can create archives for every file in the directory I can't seem to get them into a single .zip file.

View 9 Replies View Related

SQL Server 2008 :: Hiding The Security Folder From Contractors Using SMSS?

Aug 19, 2015

I am setting up a database for one contractor who needs to access one of our databases but i need to remove the permission for them to view the security folder so he cant access the SA account and enable it. I was able to deny them the view permission to see all the other databases and hide the system objects but i can still see the security folder and the sa account there where i can disable and enable it.

View 9 Replies View Related

SQL Server 2008 :: Changing Alt Snapshot Folder For Merge Replication?

Sep 22, 2015

I have a merge replication. Currently works fine. Publisher & Distributor are on the same server. I need to change the location of the alternate folder for the snapshot files.

I’ll probably just change it through the GUI, but would I use sp_changedistpublisher or sp_changemergepublication if I were scripting everything?

My real concern is the subscribers. Do I have to ‘tell’ the subscribers where the alt folder has been changed to? Do I just run sp_changemergepullsubscription on the subscribers?

View 1 Replies View Related

SQL Server 2008 :: Export Images From Server To A Folder Using SSIS

May 26, 2015

I have table which consists of images. I am trying to export those images to a folder.

declare @path varchar(100)= 'c:images'
SELECT [PICTURE]
,@path+[PICTURE] AS Path
FROM [A].[dbo].[PICTURE]

I am getting this error: The data types varchar and varbinary(max) are incompatible in the add operator.

View 1 Replies View Related

Transact SQL :: Check If UNC Path Exists (It Is Folder Not File)

Oct 29, 2015

Usual way to check if file exists

DECLARE @File_Exists INT 
EXEC Master.dbo.xp_fileexist 'serverBSQL_Backupfile.bak', @File_Exists OUT 
print @File_Exists

1

And if check folder, can use "nul", but it doesn't work for UNC path

DECLARE @File_Exists INT 
EXEC Master.dbo.xp_fileexist 'serverBSQL_Backup
ul', @File_Exists OUT 

print @File_Exists
0

If use xp_subdirs like:

 EXEC master.dbo.xp_subdirs 'serverBSQL_Backups'

If the folder doesn't exists,

Msg 22006, Level 16, State 1, Line 3
xp_subdirs could not access 'ServerBSQL_Backups*.*': FindFirstFile() returned error 67, 'The network name cannot be found.'

How to check if UNC folder exists in Backup? in my code I want to check if the unc folder exists before doing backup, the unc path is retrieved from other table or backup history.

View 8 Replies View Related

SQL Server 2008 :: Use Folder Name As Database From Batch File To Execute Files

Jul 17, 2015

I've been struggling with this issue,

1) Test--FolderName (This Test folder name should use as a database name for below sub folders)

a)Create--Sub Foldername
i)create.sql
b)Alter---Sub FolderName
i)Alter.sql
c)Insert---Sub FolderName
i)Insert.sql

[Code] .....

The scripts need to be run in order. So script one needs to run first folder in that sub folders after that next second folders etc..

Is there a way to create a bat file that automatically runs all these scripts, in order against, the databases they need to?

The databases that they need to run against have the name of the database at the beginning of the name of the folder.

View 0 Replies View Related

Create New Database By The Help Of App_data Folder Without Sql Server Express

May 15, 2006

I am using sql server 2005 developer edition with service pack 1I have uninstalled sql express.How Could I create new database by the help of app_data folder without sql server express.That is when i right click on app_data folder and try to make a new database it give me the following error.Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URL:  http://go.microsoft.com/fwlink/?LinkId=49251I don't want's to install sql server express and want's the functinality of creating a new database via App_Data folder.What Can do ?

View 2 Replies View Related

Create SQL Server Developer Version Database In App_data Folder

May 30, 2007

Hi
I am trying to create a sql server database in the app_data folder of visual studio 2005. It keeps telling me I need the express version. Can I not use the developer version
 
Thanks

View 4 Replies View Related







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