If C:folder.. Contains Data Then Do..

Oct 10, 2001

hi, I am curious to know if I can do the following from within a store procedure.

If I have a folder under c drive c:clientand would like to check if there is any files inside the client folder, how can I write such code in sql into a store procedure. I want to do some actions like expoft table data (bcp) into the client folder if there is no text files..... I do appreciate your help

Ali

View 1 Replies


ADVERTISEMENT

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

Integration Services :: SSIS WMI Event Watcher Check For New Folder In Existing Folder

Jul 2, 2015

I know a WMI event watcher can be used to watch for a new file being added to a folder. However, I need to check for new folders being added to an existing folder. I haven't been able to find a post on doing this. Is there a way in WQL to check for a new folder being added instead of a new file? I've used SQL for years, but am new to SSIS.

View 2 Replies View Related

SSIS Or SQl Agent Job Moving From A Network Folder To A Sharepoint Folder - Errors...

Oct 31, 2007



Ok,

I have a network folder called A

I have a SharePoint (2007) Document Library site called B. Web Client is enabled on the server and B is mapped as a Drive (let's call it Y for this discussion)

I want to move documents in A to B. Easy enough, right? Not so....

I first started by creating a batch file that issues a COPY \A \Y /Y at the command prompt. Viola! Worked Great!

I then moved that command to a SQL Agent job as a CMDExec statement (exact same statement) and attempted to run it.....CRASH! It found the files in A but then said "The system cannot find the path specified"

Ok, so I tried it in SSIS. CRASH! Checked the error log. Same thing...

So I then checked the account under which the SQl Agent was running (special domain account for all our SQL Servers). Thinking it might mater I changed it to run under my name (I'm in Domain admin). I also ensured I had permissions to the SPS 2007 library as well. (I did).

Ran again! CRASH! Same error....

So, I created a batch file , placed thec ommand in the batch file and ran that from the command prompt! Viola! Worked Great.

So, I was thinking of how ingenious I was as I pasted my C:RootCopy.bat into my SQL Agent job. With a big grin on my face I right clicked and picked "Start Job at step".......CRASH! Same error.

Does anyone have any ideas on this ???????????????

Thanks,
Stephen

View 3 Replies View Related

Can I Use The Foreach Loop To Obtain The Sub Folder Names Within A Folder?

Sep 4, 2006

I have a set of folders with the following structure:

MainFolder

1999

SpreadsheetA.xls

SpreadsheetB.xls

SpreadsheetC.xls

2000

SpreadsheetA.xls

SpreadsheetB.xls

SpreadsheetC.xls

etc.

Is there a way that I can use the foreach loop container to loop the sub folders? My plan was to get the folder name and path into a variable, use this to build the connection string for each file in this folder, carry out the upload for that folder, then move onto the next folder and do the same thing, but I cannot see a way to do this.

Thanks,

Sam

View 2 Replies View Related

How To Use An Folder As Data Source

May 15, 2008

Hi

I need to use .txt files as data source, those files are in same folder. Now I connect to them with ODBC, and allow client select which file they want to view by input the name of file as a parameter.
The problem is all those file are tabdelimited and the default of ODBC driver is CSV delimited. So once new file is added in the folder, we must refresh the ODBC otherwise the drive will deal all the data as one column.

Are there any better solution for this case?

View 6 Replies View Related

MS SQL Server 2005 Data Folder

Sep 22, 2006

It seems SQL Server 2005 can store data in both C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData and C:Program FilesMicrosoft SQL ServerMSSQL.2MSSQLData. But what's the difference of the 2 folders? I accidentally found identical mdf files in the two folders and got confused. Thanks.

View 2 Replies View Related

Can't Restore To Custom Data Folder

Jun 3, 2008

I am having a problem with a client's MS SQL Server 2005. When doing a restore, SQL will not allow me to restore to the database mdf and ldf files outside the SQL root folder (C:Program FilesMicrosoft SQL Server). I want the data and log files to be on a separate disk with plenty of disk space. When I created the database, SQL allowed me to create the mdf and ldf files in the E:Data SQL ServerData folder. But when I perform the restore SQL reverts to the C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData folder. I am specifically redirecting the mdf and ldf files to the custom folder by clicking on the button (...) to change the folder.

I have tried creating a new SQL Server instance and uninstalling and reinstalling SQL Server to no avail.

How can I force the restore task to restore my database to the custom data folder location?

Thanks

View 10 Replies View Related

How To Specify The MSSQL.1 DATA Folder In SQL Express?

Aug 2, 2007

How do you determine the data folder during the SQL2005 Express install?
No matter what folder I start with it gets appended with MSSQL.1 or MSSQL.2
If another vendor has installed a different instance of SQL2005 how do I know whether mine is .1 or .2 ?

Basically I need to know the full folder in order to copy our MDF/LDF files into so we can attach them.

Or is there another way?

Thanks.

Graham

View 7 Replies View Related

Use Bcp To Output Data To A Compressed (zipped) Folder

Jan 25, 2007

Hi all,

I am trying to use bcp to output data to a compressed (zipped) folder.
The bcp command is called from a step in scheduled job in SQL 2005 (T-SQL) similar to:

SET@chvCommand =
'bcp [working_t] out D:EprojectsEdataCdata200701.dat'
+ ' -c -STPISQL -T'

EXECUTE master.dbo.xp_cmdshell @chvCommand, NO_OUTPUT

.... where Cdata is a compressed (zipped) folder.
The scheduled job seems to work without errors, but afterwards there is nothing in the compressed folder.
If Cdata is a regular folder everything works fine.


Thanks for you insight.

View 8 Replies View Related

Automatic SQL Queries To Dump Data To Folder

Nov 2, 2005

Hey everyone, trying to set up a SQL Query to run on a pre-determinedbatch cycle that will automatically dump out specific table data to a..csv file so that users can load the file into Excel right away, withno manipulation or modification.We are running SQL Server 2000. I am a novice SQL user. Anysuggestions?

View 2 Replies View Related

How To Automate Cleaning The Data In Repldata Folder

Feb 23, 2006

hi everyone,

can any one suggest me how to clean the 'REPLDATA' folder created during snapshot replication. i want to automate the process.

can anyone suggest any undocumented sp like

'sp_MSDelete_publisherdb_trans'

thanks



View 9 Replies View Related

Help Understanding .cer File Found In DATA Folder

Nov 5, 2007

What is the purpose of the .cer file found in MSSQL.1MSSQLData? Something to do with encryption, but what?


Why do I see as many as three .cer files on a server?


Thanks, Dave

View 1 Replies View Related

Data Driver Subscriptions At The Folder Level

Nov 1, 2007



HI All,

I have created around 150 reports using SSRS. I just made a new data drive subscription(file sharing) using report manager. Now I'm wondering is there any option to make subscription at the higher level? That means instead of subscribing one report by one report , can I do it at the folder lever using report manager without writting a programm?

Thanks

View 2 Replies View Related

Attach DB Fails If Not Located In Data Folder

Feb 4, 2008



Hi All:

Using SQL Express 2005.
I want to attach some *.mdf files that are located in a folder other than the SQL Server Data folder (for example, D:MyData). If I do so, then I get an error message that the files can not be updated because they are read only.
If I move the files to the SQL ServerData folder then they attach without errors and work fine.

Is there some way I can tell SQL Server to allow the attachments in my other folder as well?

View 7 Replies View Related

SSRS Missing/hidden Data Source Folder

Oct 19, 2007

I have inherited a SSRS setup and am trying to do some clean up. Problem is I cannot see the Data Sources Folder. I am setup as SA and SU on both the RS Server and SQL Server. When I go check the catalog in SQL db it does truly exist as well as a number of data sources in the folder that reports are currently using. How can I see this folder?

View 7 Replies View Related

Integration Services :: Data Folder Not Loading With New Project

Jun 30, 2015

When creating a new integration project, the data folder to create a new data source does not load. 

View 5 Replies View Related

Moving Csv File From One Folder To Another Folder

Mar 28, 2008

I am having problem with moving a file from one folder to another folder. Here is the detailed scenario:

I want to move a input.csv file from shared input folder to shared archive folder. i am using the below code to do this.
declare @inpath varchar(100)
SET @inpath = 'move "\abcdefINPUTinput*.csv" "\abcdefARCHIVEarchive.csv"'
EXEC @filestatus = master..xp_cmdshell @inpath
but the problem was it was cutting the input.csv file from INPUT folder but not pasting it in the ARCHIVE folder.
I really appreciate if anyone can help me to solve this or anyone can tell some workarounds.

Thanks,

View 20 Replies View Related

Reporting Services :: Data Source Account And Folder Access

Apr 28, 2015

I have a question about ssrs security. In report manager I have set a list of users as browsers, and the builtin administrators are content manager in the parent folder where reports are. A user that is not an administrator and neither a user I added, has access to reports.

I'm thinking this person is having access because the data source of the reports use a administrator account to connect to the analysis services  using the option Credentials stored securely in the report server with the 2 checkboxes marked (use as windows credentials when connecting to the data source and impersonate the authenticated user).

I simply marked this option because SSRS is in 1 server and SSAS in other and I think kerberos need to be configured and I haven't looked into it, but I think the report access is separated from the data source.

View 2 Replies View Related

Reporting Services :: Set Data Source In Report Manager For Whole Folder Rather Than Each Report?

Aug 28, 2015

I have few reports under different folders in Report Manager. Is there a way to set the data source for the whole folder rather than each report individually? There is also a folder where reports generate dynamically. Since the report project doesn't exist anymore, I can't set the data source through code. How can I set the data source for the whole folder?

View 7 Replies View Related

Run All .sql Files In A Given Folder?

Jun 4, 2008

Hi,

say I have th following in my post-deployment script:

:r ..ScriptsFolderScript1.sql
:r ..ScriptsFolderScript2.sql
:r ..ScriptsFolderScript3.sql
...

How can I do the equivalent of

:r ..ScriptsFolder*.sql
??

I've tried the above and the syntax is not supported.

Your help is much appreciated! =)

View 3 Replies View Related

Binn Folder

Mar 12, 2008

What would be the impact of replacing the SQL 2005 90 ToolsBinn folder with the SQL 2000 80 toolsinn folder?
A colleague of mine did this in a SQL 2005 production environment so that he could still use isql.exe. Unfortunately, users are getting kicked out of the database and I'm thinking the binn folder may be a factor.
Thoughts?

View 5 Replies View Related

Get Files In Different Folder Using Sql

Aug 9, 2006

Hi All,I have a multiple files, but they are store in different directory onthe server. I want open those files and insert it into the databaseusing bcp.Example files structure dir:\xyz123abc ext1.txt\xyz123abc ext2.txt\zyz123999 ext2.txtbcp "dabase" in \xyz123abc ext1.txt -c -S"servername' -Usa-Ppassword -T".is there away to loop througth each dir, get the files, excecute thebcp, then go to next folder.Please help. Thanks in advance.Ted Lee

View 2 Replies View Related

SSIS Bin Folder

Nov 16, 2007

Could I delete all packages from Bin Folder? Will it effect anything?

Best Regards,

View 7 Replies View Related

Query Log Folder

Mar 19, 2008



Hi Experts

Is there a way to find out programmatically using T-SQL where the current log folder is located for a SQL insatance? if for example the log folder is located under the C: as



C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLLOG

I need to find the path where the log folder is placed. If there is a way please share the trick.

Thank you

AK

View 8 Replies View Related

FTDATA Folder

Jul 27, 2007

What is the best way to move the FTDATA folder for SQL Server 2005 from drive "d" to "e"?

View 3 Replies View Related

Log Folder Creation

Jun 7, 2006

My Log file connection is set to "Create Folder". According to BOL, this seems to indicate that the folder(s) that the log file will reside in will be created if they do not already exist. Yet I am receiving a package validation error when I execute the package. The full error is:

The SSIS logging provider has failed to open the log. Error code: 0x80070003
The system cannot find the path specified.

As a side note, I thought that setting the connection to "Create File" would recreate the log file each time it ran but that does not seem be the case. Instead, the file gets appended.

View 3 Replies View Related

Uploading APP_Data Folder

Apr 27, 2007

Greetings, Salutations, and Howdy
I'm using VWD on the local box and WS 2003/SQL Express on the remote box.
The first time I upload the site, the upload works great. Later after uploading updates, new pages, etc. the upload still works great.
BUT.....when I try to upload anything in the App_Data folder, I get a copy error, access denied.
On a pre-existing site with App_Data ....How do you upload the App_Data folder or it's contents to the remote server?
Thanks^2

View 6 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

When And How To Use Database In App_Data Folder

Nov 10, 2007

HI,
I found that we can keep .mdf file in App_Data folder and use the same database in our application.
so my questions are .
1.the database which is kept in app_code will work only with Sql Server Express Edition.
2.what will be my connection string in web.config.
 If any one can help out that will be appreciate and put some more light about using the data base in this way.
or any article link will also appreciated.
 
Thanks in Advance.
 
Rafeeq
 

View 1 Replies View Related

Security && Pemissions Folder

Dec 9, 2007

Hiiiiiiiiiiii,
Why my program can't access data base, if i'm not set permission & security to All User (Everyone)..??
FYI, my IIS setting for directory security is Basic Authentication.
Pls advise how my program can access the program, if permission & security are not set to Everyone ??
Thanks

View 3 Replies View Related

Storing Images In Folder Or DB

Dec 31, 2007

Hi
We are building a portal internal to our org. Here, For one of the option on the portal, we have given each user in our organization an option to upload three images. Iam storing these images in Sql server table columns with datatype image.So, the question is:
1. Is it ok to store the images in sqlserver? Will it add any performance degradation?
2. Is it ok to store the images in folder and store the respective urls in the DB?
Please let us know.
Thanks!
Santhosh

View 3 Replies View Related

What Is The System Tables Folder For?

Mar 19, 2008

In SQL mngt studio...what is the system tables folder in the tables folder supposed to be used for?  Do I need to use it for anything?
 Gater

View 5 Replies View Related







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