Master File Not Accessible For Copying

Sep 23, 2006

Re SQL Server 2005 Express

When I attempt to copy the master file for backing up, it is being used by
another application, even after shutting down the PC completely and powering
it up again. What can I do to make back-ups?

Zach

View 2 Replies


ADVERTISEMENT

SQL Server Admin 2014 :: OST File Is Not Accessible

Feb 26, 2015

my 4 GB .OST file is corrupted and i am not able to access my mails and contacts.

View 2 Replies View Related

Copying XML File Into SQL

Aug 17, 2006

Hi, I have been having fun and games for well over a week now trying to get an xml file copied into an sql file, but still have no joy. I and using the bulk copy to do this and think I am close to solving it but just need a final push in the write direction.
In green below is the full source code, I think that the trouble is with the try statement part here:

 
            Try
                bulk.WriteToServer(xd)
 
This comes up with the error :
Unable to cast object of type 'System.Xml.XmlDocument' to type 'System.Data.IDataReader'
 
Basically how do I get the XML data into a reader (or IDataReader) format so that the writetoserver command can interpret it
 
I would be so greatful if someone could help resolve this it is becoming increasingly more frustrating
  Protected Sub Button1_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim objXML
Dim objXSL
' destination table

Dim connectionString As String = ConfigurationManager.ConnectionStrings("Database1ConnectionString").ConnectionString
Dim myNewConnection As Data.SqlClient.SqlConnection = New Data.SqlClient.SqlConnection(connectionString)
myNewConnection.Open()

Dim productreader As XmlReader
Dim bulk As Data.SqlClient.SqlBulkCopy = New Data.SqlClient.SqlBulkCopy(myNewConnection)
bulk.DestinationTableName = "Product"
Dim productcount As Integer = 0

Dim settings As New System.Xml.XmlReaderSettings()
settings.IgnoreWhitespace = True
settings.IgnoreComments = True

Dim xs As String = (Server.MapPath("~/App_Data/XMLfile.xml"))
Using reader As XmlReader = XmlReader.Create(xs, settings)
While (reader.Read())
If (reader.NodeType = XmlNodeType.Element And "product" = reader.LocalName) Then
productcount += 1
End If
End While
End Using
Response.Write(String.Format("found {0} products!", productcount))

Using bulk
bulk.DestinationTableName = "Product"

Dim xd As New System.Xml.XmlDocument()
xd.Load("C:Documents and SettingsSimonMy DocumentsVisual Studio 2005WebSitesWebSite1App_Dataxmlfile.xml")
Dim xr As New System.Xml.XmlTextReader(Server.MapPath("~/App_Data/xmlfile.xml"))

bulk.ColumnMappings.Add("TDProductId", "TDProductId") ' map First to first_name

bulk.ColumnMappings.Add("name", "name") ' map Last to last_name

bulk.ColumnMappings.Add("description", "description") ' map Date to first_sale

bulk.ColumnMappings.Add("imageUrl", "imageUrl") ' map Amount to sale_amount

bulk.ColumnMappings.Add("productUrl", "productUrl") ' map UserID from Session to user_id

bulk.ColumnMappings.Add("price", "price")
bulk.ColumnMappings.Add("currency", "currency")
bulk.DestinationTableName = "Affilaite_Product_new"

Try
bulk.WriteToServer(xd)
Catch ex As Exception
Response.Write(ex.Message)
Finally
myNewConnection.Close()
bulk.Close()
xd = Nothing

End Try

End Using


End Sub
 

View 2 Replies View Related

Copying SQL, Mdf File / Please Help

Nov 27, 2004

I have a SQL db on my server in internet
the server and my DB is online
I want to copy mdf file to my computer via FTP but I get an error
that file is in use and I can`t copy it

I wanted to know is there any way that i copy information in that MDF fle
to another DB on my computer

Its very important please help me

thanks all

View 5 Replies View Related

Bcp Copying,but No File

Jun 1, 2004

DECLARE @query NVARCHAR(2000)
SELECT @query = 'bcp "SELECT * from dbname..tablename" queryout c: est.txt -c -Slocalhost -Usa -Ppassword'
EXEC master.dbo.xp_cmdshell @query

I have tried doing this with a test table and this is the output
NULL
Starting copy...
NULL
3 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.): total 16
NULL

and I did have 3 row,but file is still not created, I have put the server name,login,pasword inside "" and without it,no error,no file.

Could somebody please help me

View 1 Replies View Related

Copying File From URL

Oct 5, 2007



Hi,

How can we copy a file, which is located at an URL like


http://www.siv.org/offi/download/Animfile/Anim.zip ?


I just need to copy this to my network.

Thanks,
Siva.

View 11 Replies View Related

Problem Copying SQL DB File

Nov 2, 2006

Hi,

I have a VB project which uses SQL Server 2005 Express. When the project first runs, it copies its DB files from the data directory to a directory created on the C: drive. This works fine.

In a later part of the application, it is necessary to copy the DB file to another location e.g. memory stick so that it can be used to merge data onto another PC running the same application.

The data merging works too.

My problem is, despite the fact that it worked okay this morning, I am now unable to copy the DB into a second location (memory stick or location on local disc). I get an exception stating that the file is in use.

I have no other applications running (I shut down Visual Studio and was running the installed version).

What is more, the form that implements the file copying, first closes down all other forms in the application to ensure that nothing is connected to the DB.

Furthermore, the form that performs this task has no DB connections whatsoever - it simply allows the user to select a location, then creates a directory and copies the DB files to it.

If I copy/paste the code plus the FolderBrowserDialog into the first form that copies the original database out of the data directory - it works!

The code for the whole form is below - I would be hugely grateful for any ideas ...

 

Public Class Export

Private Sub Export_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub NextBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextBtn.Click

'Close all other windows to ensure that the databases are not in use.

Dim Counter As Integer = My.Application.OpenForms.Count

Do While Counter > 1

For Each f As Form In My.Application.OpenForms

If Not (f.GetType Is GetType(Export)) Then

f.Close()

Exit For

End If

Next

Counter -= 1

Loop

 

' Set the Help text description for the FolderBrowserDialog.

Me.FolderBrowserDialog.Description = _

"Select a location to export the data to e.g. a memory stick. Or, you can export to a local directory and then burn to CD or e-mail to another user."

' Do not allow the user to create New files via the FolderBrowserDialog.

Me.FolderBrowserDialog.ShowNewFolderButton = False

' Default to the My Documents folder.

Me.FolderBrowserDialog.RootFolder = Environment.SpecialFolder.MyComputer

 

Dim result As DialogResult = FolderBrowserDialog.ShowDialog()

Dim foldername As String

If result = DialogResult.OK Then

foldername = FolderBrowserDialog.SelectedPath

Try

If Not My.Computer.FileSystem.DirectoryExists(foldername & "ClubSecExportMerge") Then

My.Computer.FileSystem.CreateDirectory(foldername & "ClubSecExportMerge")

MsgBox("Merge Directory created.")

End If

My.Computer.FileSystem.CopyFile("C:ClubsecClubSecDB.mdf", foldername & "ClubsecExportMergeMergeDB.mdf", True)

My.Computer.FileSystem.CopyFile("C:ClubsecClubSecDB_log.ldf", foldername & "ClubsecExportMergeMergeDB_log.ldf", True)

MsgBox("Database merge files successfully copied to " & foldername & " ClubSecExportMerge.", MsgBoxStyle.OkOnly, "Operation successful")

 

Catch ex As Exception

MsgBox("There was an error." & Chr(13) & "Export of database was not achieved." & Chr(13) & ex.ToString, MsgBoxStyle.OkOnly, "Operation failed.")

Exit Sub

End Try

Else ' Cancel button pressed

MsgBox("No path selected. Data not exported", MsgBoxStyle.OkOnly, "Operation cancelled.")

End If

Dim home As New HomeScreen

home.Show()

Me.Close()

End Sub



End Class

View 5 Replies View Related

Copying Database Backup File

Nov 6, 2003

This is a pretty basic question, but I've generated a backup file for one of my SQL 2000 databases, and I need to copy the backup file to another computer so I can burn it on CD. Whenever I try to copy the file, I get an error message saying that the file is in use by another process and can't be copied. I have tried detaching the database, shutting down Enterprise Manager, stopping the MSSQL service, but all to no avail. There must be a way to do this, but I can't get it to work. Does anyone have any ideas?

View 3 Replies View Related

Copying A Sql Server Database File

Mar 12, 2008

I am developing a .NET 2.0 application that uses Sql Express as its backend.
I use OleDb Provider to connect to Sql express.

One of the options in the app allows the Admin to create a Backup of the database. As part of this process, I write a log entry to one of the tables in the database, commit & close the connection, and then copy the physical database(.mdf) file to some pre-determined location using the following instruction (in VB):
My.Computer.FileSystem.CopyFile("Path to Database File", "Destination Path")

It throws an exception saying that the file is in use. Upon checking, I found that the file has been locked-up by the Sql process.
I ensured that my app closes all connections to the database, that there is none other trying to connect to it, and then again tried to execute the above instruction in my app, again raising the same error.

However, when the app terminates, then I can easily copy the databse using explorer. I also used the OleDb method ReleaseObjectPool(), but the problem persisted.

So, how can I copy the database in such a situation from within my app??

View 3 Replies View Related

Backup Master Key, Cannot Write Into File 'c: Empmaster'. Verify That You Have Write Permissions, That The File Path Is Valid.

Jul 12, 2006

Hi,



I tried to backup the master key by the following syntax :

OPEN MASTER KEY DECRYPTION BY PASSWORD = 'mypassword'

BACKUP MASTER KEY TO FILE = 'c: empmaster' ENCRYPTION BY PASSWORD = 'mypassword'

but it failed and i got the following message:

Cannot write into file 'c: empmaster'. Verify that you have write permissions, that the file path is valid, and that the file does not already exist.

NB: I am using the "sa" user to execute this command.

I know that we have a security permission issue , but where and how ?



Regards,

Tarek Ghazali

SQL Server MVP

View 12 Replies View Related

Integration Services :: SSIS Copying Populated Excel File?

Jul 9, 2015

I am experiencing unexpected behaviour when copying an Excel file.

An Excel file from TemplateDir to WorkingDir.

Excel file is then populated in WorkingDir, ok Copy File task copies Excel File from WorkingDir  to FinalDir, however non populated version of file is copied.

However, if I stop SSIS and and execute Copy Task only,  the populated version of file is copied.

It seems SSIS has a kind of lock on Excel file in WorkingDir.

how lock can be released to enable Copy of populated file.

View 6 Replies View Related

SQL Server 2005 Agent - Error Copying A File Onto The Network...

Jan 10, 2008

Hi,

I have an SSIS package designed to copy across a file from local machine to a location on the network.

The SSIS package works fine when I run it directly run it in the Designer, ie, it copies over the file to the network.

But when I run the package through the Job server agent, it fails giving me a validation error on the network path..

Does it have to do with the permissions of the User account used here? Could anyone please provide any information on this....


Thanks

View 14 Replies View Related

DTS Load Master File To Different Tables

Feb 24, 2004

We need to load a "master" flat file to SQL Server tables. The file is a dump from mainframe. Based on a field called "record_type", each record in the file has different columns. I would use the following as an example (the real file is much more complicated than this, but you get the idea):

For instance, my file has:

20M02221984PAPepsi1000
23F11121987MD1000
01M09182003TXCocacola1100
34F03041970DC900

If "M", the fields are "age", "gender", "birthdate", "state", "salary"

If "F", the fields are "age", "gender", "birthdate", "state", "company", "salary"

We need to load the file (only one file) into two different tables, M_table, and F_table. But I have researched and discovered in DTS the source (TEXT file) can not be queried against to filter on the gender field.

Since each record may have different number of fields, I cannot really load the flat file into a "staging" table.

Does anyone has any idea on how to achieve this? Thanks in advance!!!

View 3 Replies View Related

Master DB Backup File Issue

May 21, 2004

I have my master database with 10 MB datafile and 4 MB log file,But my backup file for the master DB is 11 GB in size.How could it possible.
Can i delete that backup and create a newone...
Thanks.

View 1 Replies View Related

Restore SQL Master Database From A File

Jul 23, 2005

Hello,I need to restore the Master DB in my SQL 2k server (with sp3). Theproblem is that i don't have SQL backups of this file I only havegeneral backup of the entire c: drive i made using NTBackup. So itried all I know and succesfully run the rebuildm utility. Now when Itry to restore it from the general backup (not SQL backup) using"restore database master from gen_backup" i got error: "The file ondevice 'gen_backup' is not a valid Microsoft Tape Format backup set."RESTORE DATABASE is terminating abnormally.Any ideas how I can restore it?

View 2 Replies View Related

Loading In .txt File W/ Master/detail Recs

Feb 19, 2004

SQL Server 2000

Help! Surely this has happened to others before me. A new customer wants to send updates in a fixed-width txt file in which master and detail rows alternate.

How do you do this?

Do you:
1) Painfully muck around with 100,000 rows in the .txt file first--split it into 2 files, one for master records and one for detail records and then process? If so, what do you use? I'd probably hack at it with a VB Script module in a DTS package.

or

2) Is there a way to feed it into 2 tables where rows starting with x go to one table and rows starting with y go to another?

The plan was to use a fast and dirty DTS package to shove this stuff into a table (probably 2 but we might just toss the stuff we don't need and put in in one) but I'd like some advice on how to proceed.

Thanks for any suggestions!

View 14 Replies View Related

Recover Master Database Fron Only MDF File

Jul 20, 2005

I have SQL server 2000 which recently crashed. I try to recover it andfound out that the Master database is corrupt. I never backup myserver using inline sql backup nor any third party backup program thataware to SQL server. But I have full system backup of volume c on tape(using NTBackup), which includes old version of Master database. Myquestions are:1. How can I recover this file into SQL server?2. If so, it is not risky to recover Master database from two weeksago?Thanks in advance!

View 1 Replies View Related

Loading Sql Files From A Master File Oracle Equivalent

May 19, 2006

Hi.I need to give my customer an sql file that they can run in query analyzer.All the stuff they need to run is in a set of existing files.I'd like to just tell them to load this file (this is oracle syntax):@file1.sql@file2.sql@file3.sqlis there some way of calling these files (that are in the same dir) from amaster sql file?ThanksJeff Kish

View 2 Replies View Related

Could Not Locate File 'xxx_Log' For Database 'master' In Sys.database_files

Nov 12, 2007

Hi All,

I am truncating Transactionlog€¦ following the steps mentioned in MSKB.. what is the problem?



Use master
Go

Backup log xxx with truncate_only
go
Dbcc shrinkfile(xxx_Log)
Go

Msg 8985, Level 16, State 1, Line 1
Could not locate file 'xxx_Log' for database 'master' in sys.database_files.
The file either does not exist, or was dropped.


Please help me.

Thanks in advance

View 31 Replies View Related

DB Design :: Specifying Table Types - Master Or Transaction File

Jul 17, 2015

Is it possible to categorize a table by "type"; for example "Master file" or "Transaction file"?

If yes, then:

Where is this specification made on the table, and how can I interrogate the table to determine the "type" ....

View 8 Replies View Related

Setup Was Unable To Load The Master Information File (ERROR)

Jan 17, 2008



I receive this error "Setup was unable to load the master information file' when I lanch Control Panel, Add/Remove Programs, Add/Remove Windows Components.

I was going to add ISS but recieved this error.


Running Windows XP Professional SP2

View 3 Replies View Related

SQL Security :: File Size And Space Used Is Not Displaying For All Database Other Than Master

Aug 26, 2015

I executed the below query and getting the capacity values only for master database.All other DB shows NULL values for spaceused. I'm actually looking for a query to get all the capacity information other than using temp table and the procedures. Is there any way using SQL query ONLY.

select
db.[dbid] as 'DB ID',
db.[name] as 'Database Name',
af.[name] as 'Logical Name',
convert(decimal(12,2),round(size/128.000,2)) as FileSizeMB, 
convert(decimal(12,2),round(fileproperty(db.name,'SpaceUsed')/128.000,2)) as SpaceUsedMB
from sys.sysdatabases db
inner join sys.sysaltfiles af
on db.dbid = af.dbid

Below is the output

DB ID Database Name
Logical Name FileSizeMB
SpaceUsedMB
1 master
master 4.00
3.44
1 master
mastlog 2.00

[Code] ....

View 5 Replies View Related

SA Is Not Accessible

Jun 30, 1998

We some how is not able to entre to sql executive with the sa name and password and so not able to see the context of the database. we are not able to access the databeses either. We want a solution whereby I can change the SA login or give him the administrator right to do everything with the database.

Anindya Mukherjee

View 1 Replies View Related

Database Is Not Accessible

Dec 20, 2007

Hi,
i use sql server express 2005. There are several databases which all works fine.
My problem is: when i try to expand one database in Management Studio express, i get for that database (not for others):
"the database 'mydb' is not accessible (microsoft.sqlserver.objectexplorer)" and that's it. I can't see tables nor any objects of that db, while the application still can insert records into tables of that db.
When i run this query: select * from master..sysdatabases
i see all the databases (also 'mydb') with the same mode, status ...
Thanks
Tartuffe

View 3 Replies View Related

SQL Server Not Accessible

Mar 8, 2004

I changed the Administrator Password on our Server. I also changed the sa password for the SQL Server to match. Ever since then, if one of my web pages attempts to retrieve data, the user get the error:

SQL Server does not exist or access denied.

This is strange because my pages do not use the sa account in order to retrieve data. I have a copy of MS Access installed locally on the server. Using it I can access the SQL Server data with linked tables. So the SQL Server is obviously servicing internal requests.

I tried changing the passwords back again, but the problem still persists.

Anybody any ideas?

View 2 Replies View Related

Datatype Nvarchar(max) Not Accessible

Mar 20, 2007

Hi,

trying to input

create table T (c1 nvarchar(max));

in MS SQL Server Manangement Studio Express results in an error :

Fehler beim Analysieren der Abfrage. [ Token line number = 1,Token line offset = 30,Token in error = max ]

create table T (c1 nvarchar(4000));

is processed w/o errors.

I´ve installed SQL Server 2005 Express Ed. SP2

Microsoft SQL Server Management Studio Express 9.00.3042.00

Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)

Microsoft MSXML 2.6 3.0 4.0 5.0 6.0

Microsoft .NET Framework 2.0.50727.42

Betriebssystem 5.1.2600

Any ideas?

Thanks in advance

Werner

View 2 Replies View Related

Service EndPoints Not Accessible

Dec 20, 2006

I am trying to expose a stored procedure on SQL Server 2005 as a web service. So I just have an end point created with the procedure as my web method. Now when I try to reference this web service in my C# windows application, I am only able to see the procedure definition by requesting for the WSDL http://servername/path?wsdl. But when I try to reference it, I get the error 501/505 - Not Implemented or not supported. Any ideas what the issue here could be? Would really appreciate the help here as I am kinda stuck! - Thanks, Manmeet

View 2 Replies View Related

RS Not Accessible From A Remote Client

Apr 4, 2008

Hi all,
We installed RS on a non default website on our IIS server. When targeting the Reports page from the server itself (http://site:8015/Reports) we can see the welcome page. However if we try to access that same page from another machine we get a generic IE message: IE cannot open the specified page check your internet connection etc. Because the error is so generic I have no idea as to what can be the cause: IIS or RS config ? I suspect IIS because no RS error is raised but then I don't see what I could've missed on that level...
Any ideas of what could be the cause of this ?
thanks a lot

Notes:
- the DB and the RS instance are on the same server
- other sites hosted on the same server are accessible from the client machine
- Anonymous access is enabled on the site level, and on the Reports / ReportServer level. I tried unsetting it but it didn't change anything for the remote client.
- I tried changing the account RS is running under: it used to be LocalSystem, I now set it to NT AuthorityNetworkService but no difference.

Environment: SQL Express Advanced & Windows Server 2003

View 3 Replies View Related

How To Make Database Accessible To User

Apr 12, 2008

I am setting up a web application, where the application needs to access a database. I have created the user (for the application) and it can log in to the SQL 2005 Sp2 server, but when I try to open the required database using Server Management Studio, it says "The database [name] is not accessible. (ObjectExplorer)"How do I make a database accessible to a login, using Server Management Studio?

View 2 Replies View Related

Named Sql Instance Not Accessible Remotly

Apr 10, 2008

Hi All,

We have two Baan erp servers 1) SQL2005 on windows 2003 server 2) SQL2000 on windows 200 server.

SQL 2005 server has two database instances, one being the default and the other one as a named instance.

We have been trying to access the data in these two database instances from the second server for our baan erp application on it. Now, we are able to see the data for default instance, but if we try to fetch the data from named instance we end up getting dberror 17.

We tried to register the named instance on the second server using "new sql server registration wizard" in sql 2000 enterprise manager, but there also the list only shows the default instance from sql 2005 server. I tried to type in the named instance and register (both windows and sql server authentication), but end up getting error "Database instance doesn't exist or access denied".

So, for some reason, the named instance from sql 2005 server is not getting published on the network. Please suggest some ways to get around this issue.

thanks,

Jatin

View 1 Replies View Related

Error: The Database Model Is Not Accessible

Dec 4, 2007

Last week we reset the Model datable to autogrow. Now I get an error when I try to go into it. (I discovered this since I can no longer go into the interface of the program). I wasn't here when the changes were made to the Database Model, but the change was made because the transaction log was filled up.

Help.. I'm such a newbie.
anke

View 9 Replies View Related

Setup SQL Server 2000 Db To Be Accessible From 2 Networked PCs

May 18, 2006

Ain't sure if this is the right place. but anyway, here is the situation. I have 2 PCs and both are running Windows XP (A is using SP 2 and B is using SP 1) which are connected via a router and A can ping B and vice versa. I have SQL 2000 installed on A, so how do i go about setting up B so that B can access the database and tables of SQK 2000?Thanks.

View 3 Replies View Related

Custom Error Message, When Database Is Not Accessible

Apr 22, 2000

Hi everybody,
There are times when the database (SQL 7.0) cannot be accessed ( backup, routine maintenance, etc....) from asp page.
In those cases i am getting an ugly asp error message.
Is there a way ( code ) which will trap that error and return a nicer custom message for user or something like that.
Thanks a lot,

View 1 Replies View Related







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