I want to manage my sql express .mdf database file (e.g. set Roles) but I seem to only be working with a temporary instance of my database when I attach to .sqlexpress and manage in SQL Server Management Studio Express (SSMSE). The Role I set is gone when I detach and re-attach.
If I try to manage my file in Visual Studio under Server Explorer, I do not see the "Roles" folder to modify roles.
Hi experts, I have sql express installed on my machine and i'm using visual studio to create database files. After i've build a connection to my database file thru Server Explorer (choose Add attach files) i opened Management Studio Express and found that the new database has been attached to sqlexpress database engine----technically speaking it's under the user instance which i use to run my visual studio. right?? that's totally fine.My question is, after i'v closed the connection in visual studio, that attached database file still exist.I want it to be detached immediately after i've closed the connection in visual studio.How can i do that? I've searched through internet and was told that sp_config can solve this problem by setting the user instance time out. I ran sp_config against my database but did not find that item. Could anybody give me some directions? thanks in advance.
At our facility, we have a > 350 gigs database and the DB is breaking into 2 files. One file is our Image table with the size of 300 gigs. The other file contains all of the other tables. The image file is getting bigger and bigger everyday, I am worry that eventually when a data file getting too big it could lead into problem. - DB fragmentatio, hard to manage etc
My question is anyone has run into this problem, and how do you solve it?
I am pretty new in SSIS 2005, and I have some problems... I want to add logging and error management in my package. I found how to made logging. But for errors managing i have some difficulties.
In my package I have only a flat file source and an ole db destination. I want add errors management for both of them. So I create a connection manager for errors on a file. For both element i add redirect row for all available error type and then i add 2 flat file destination. I branch red arrows of flat file source and ole db destination to the flat file destination.
When i run packge i have an error which indicate me that file error is already take by another process... I don't understand why. And i don't want to create on file for each element on package. Have you any idea on why i have this error? Or how can i made what i want do?
I am trying to connect to a database on a Windows Mobile device using the Management Studio. I am able to select server type "SQl Server Mobile" and navigate to the file on the device. When I try to connect I recieve the following error. Should this work? If so what must I do to allow the registry access?
Thanks,
Ron
Requested registry access is not allowed. (SQL Server Mobile Edition ADO.NET Data Provider)
------------------------------ Program Location:
at Microsoft.SqlServerCe.Client.TdsParser.ThrowExceptionAndWarning() at Microsoft.SqlServerCe.Client.TdsParser.Connect(String host, SqlCeInternalConnection connHandler, Int32 timeout) at Microsoft.SqlServerCe.Client.SqlCeEngine.FileExists(String filename) at Microsoft.SqlServerCe.ManagementUI.Utilities.GetUniqueFilename(String path) at Microsoft.SqlServerCe.ManagementUI.BrowseForFiles.OnBtnNewDatabaseClick(Object sender, EventArgs e)
Hello, I need to be able to view and save reports using Report Manager. However, I do not want some users the ability to upload files (need to prevent virus or bad files). It appears I need to select manage reports from the role definition in order for a user to save reports. but then i get the upload file link as well. Is there a way to manage reports but prevent upload file link?
Today we turned off SQL Server 7, copied the MDF file (a five-month, 245MB project) to the network, reformatted and installed Windows 2000 SBS with SQL Server 2000.
Lo and behold, SQL Server 2000 refuses to attach the MDF file, claiming it cannot find the accompanying LDF (no longer in existence). Using sp_attach_single_file_db did not help, nor did creating a database of the same name on the server, detaching it, and trying to swap the old MDF file for it.
Please help... if I have to get out a hex editor to get this database attached, I'm ready, but nothing I've tried works so far, and this is very important data--I can't believe the log file is THAT important, especially after committing anything left while shutting down the service.
I feel that I have done something stupid here.I used SSMSE to detach my database so that I could create a copy - no problem here.But then in SSMSE I right-clicked Databases, chose attach and expected to see my original database. But there are no databases shown in the attach window!I have tried to find the original database in SSMSE but nothing I do allows me to see it. However, Windows Explorer shows me that the files are still where they were when I detached them.Please help - this is driving me crazy.ThanksChris
I used SSMSE to detach my database so that I could create a copy - no problem here.
But then in SSMSE I right-clicked Databases, chose attach and expected to see my original database. But there are no databases shown in the attach window!
I have tried to find the original database in SSMSE but nothing I do allows me to see it. However, Windows Explorer shows me that the files are still where they were when I detached them.
I currently have an application that uses a Access/JET database for a desktop application. The application is single-user and outside of a few corrupt MDBs occasionally, the setup is working fine.
I am thinking about switching out from using the Access database to using a SQL Server Express detached database. I'm not sure if this is a "proper" usage of a detached database, but I've verified that I can access and query a detached one...
Is this something that is recommended? Are there any performance issues associated with it (I believe the detached would be faster than the JET database.) What kind of maintainence would be needed for the SQL Server file? (I currently have a "Repair and Compact" option for the Access file...anything along those lines needed?) Is there anything else I should be aware of?
I had to detach a databse for a project. I am now having trouble trying to find this database. It is no longer listed in the Sql Server management studio with the other databases that haven't been detached.
Is the database moved to some other folder when it is detached? Where is this database now?
Hello all, I'm using SQL 2005 Express edition. I'm currently connecting to the database file directrly (from ASP.NET) and that db file is not attached to the server. My question is this: What is the difference ? Will the performance improve if the db is attached and I connect to it throught the server ? I'm really not sure what the difference is. Thanks
Hello all, I'm using SQL 2005 Express edition. I'm currently connecting to the database file directrly (from ASP.NET) and that db file is not attached to the server. My question is this: What is the difference ? Will the performance improve if the db is attached and I connect to it throught the server ? I'm really not sure what the difference is. Thanks
I have a database consisting of multiple files on a remote server.
Both servers have the same user (bob) which is in the administrator group.
The directory that the mdf/ndf files exist on is shared as "nas" with full rights given to the user bob.
They are both in the same workgroup.
SQL server is running as this user (not ideal I know but server and services will be locked down later)
The script I used to create the database uses the following line to enable remote database files:
-- Enable the use of network drive for DB files
DBCC TRACEON(1807)
GO
I used SSMS to detatch the database and then modified my create script by removing database sizes and adding "FOR ATTACH" at the end. (I have also tried using sp_attach_db but no use)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Msg 5120, Level 16, State 101, Line 5
Unable to open the physical file "\123.45.67.89asDBName_FG.mdf". Operating system error 5: "5(error not found)".
I know the permissions are ok as I can map a drive without being prompted.
SQL server is running as the user bob which is the same user I log onto the server as.
I am running Windows 2003 Server R2 Standard Edition on server with SQL Server 2005 SP2.
The NAS box is running SQL Server R2 Storage Edition.
One thing I noticed was that the mdf/ndf files on the NAS box are locked as if SQL is still using them, i.e. I cannot rename them, move them, alter any properties etc. I just get "Access Denied".
I've tried rebooting both servers but still no luck. I've also tried stopping SQL server then renaming the files, but again "Access Denied".
I know there has been a problem in the past detaching and attaching db files on a NAS, but the Hotfix is included in SP2, which I am using.
I hope I have included enough info but if I've missed anything, it can be provided.
(Event Log basically replicates what the error message says.)
I have a T-SQL script which deataches and attaches the database. Now here is what I want to do: I want to create a SQL Server Job and schedule it to run at a particular time of the month to Detach all the databases on my local machine and *Copy all the deatched databases over a network machine* and then Attach those Database.
All this should be done in T-SQL. I already have the T-SQLs for Attaching and Detaching. All I need is to know the T-SQL (example) which will copy the *Detached Databases* from mu local computer to my Network Computer. How do I achieve that?
I have detached the database via sp_detach_db in a job, (I was trying to use a job to detach the database, then make copies of the mdf file, then attach the databases as different copies, somehow the job failed due to file locked) I tried to delete the physical files, but they were still locked. I tried several times, two of them I was able to delete the mdf files, but not the ldf file. The other one both mdf file and ldf file can not be deleted. I was not able to see the database via Management studio.
I ran into a problem today where I had to pull a backup file from an older tape. The file was originally is a backup that was stored in a device like :
EXEC sp_addumpdevice 'disk', --type 'c2000_BackupDevice', --logical name '\UNCPathackupFile.bak' --physical location
I put the file from the tape on a File Server and then tried to create a new backup device pointing to the file. That's easy enough, but when I try to restore from it I get an device error saying it's offline.
How can I get that device attached to my server and then extract the backup files stored inside it?
Please advise b/c this is an interesting problem I hadn't anticipated and it argues that I should change my backup strategy .
I am using SQL 2012 SE. I am trying to move .mdf and .ndf files after a database is detached. Here is my code that is just to copy the mdf file. I am testing it against this file now and if it worked then I would do the move ldf file the same way.
EXEC master.dbo.sp_configure 'show advanced options', 1 RECONFIGURE WITH OVERRIDE GO EXEC master.dbo.sp_configure 'xp_cmdshell', 1 RECONFIGURE WITH OVERRIDE DECLARE @cmd nvarchar(4000)
[Code] ...
The only message is I see while the query is executing is :Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.
If I manually copy over the file it takes 30 seconds since the file is only 2GB and the script takes 45 minutes and still executing.
I have an ASP.NET 2.0 website running on a windows server 2003 - sql express management studio installed. Today I had to make some changes in my database, add some columns, and so on...
So I put the app_offline.htm into the root of the web application, so the IIS unloaded the application domain, attached it in the sql management studio, made the changes I had to do and detached the db. Ok - then I removed the app_offline.html from the root of the application and looked at my internet explorer telling me that the user NT_network... cannot login...
What did I do wrong? I attached it, detached it, and at once something went wrong...
I tried everything, at least I copied the whole application to another directory and.... It worked fine again!
So, can anybody help me, I don`t know what I did wrong or rather how to make changes in my sql express for the future, not having trouble with any security issues...
Hey EveryoneI have a desktop machine and a laptop machine. Both have XP Pro. I prefer to code on my laptop, but I want to use my desktop machine as a home server/development environment because its always on. I have IIS (HTTP and FTP), .NET 2.0, my mp3 server, etc up and running just fine on my desktop.When I'm working on an application, I access the site with VWD through a network share. It's worked great so far. What I haven't been able to do, however, is connect to the database with VWD or Management Studio Express. I don't even really know where to begin with this one. What I don't want to do is open this up to the internet. I'd like to just keep it accessible from the LAN (the database, not the website)I'm new to database stuff, and I don't really know where to look to figure out how to do this. Basically, I want to have the same functionality with VWD or Management Studio that I would have if I was physically on the machine with the SQL Express server.If anyone can provide some advice, I'd really appreciate it.Thanks!Brandon
Hello,I am working on an ASP.NET web site using an SQL database. Is there a way to Insert/Delete and Update data in the database without creating all the forms in ASP.NET?Since I am the only person to work with the database it would be easier for me than creating all ASP.NET forms.Thanks,Miguel
I have worked with mysql for sometimes now and everywhere there was a mysql there was phpmyadmin for managing it but now on my new windows hosting with plesk I don't see such program. The only thing I see is a pothetic program called ASP.NET enterprise manager that doesn't allow uploading data.
In a previous application i stored about 100.000 actions ( coming from an external system )in an access database for each day. Therefore i created everyday a new accessdatabase to have enough performance. Each month i copied automatically all databases in a new 'month' map as a backup.
The goal of the application is the view all actions of one day of week in one grid. This is a kind of history of the external system.
I'm afraid the application will become to slow if i save all actions in one database. ( after 1 month i will have 3.000.000 actions.
How this is done in an sql server ? Do i have to use a different kind of method ?
Say for example I have the following 2 database tables, the first one contains the old employee data, and has the fields shown below: oldEmployeeID FirstName LastName DateOfBirth HiringDate TerminationDate and another one containing the new employee data with similar fields but instead of oldEmployeeID, it is showing the newEmployeeID. During the conversion process, something were messed up and instead of putting in the original hiring date of the workers into the new employee database, the conversion date was put in, which, depending on the mood of HR ladies, could be any date, and at the same time, of course, new employee join the company, and we assume their hiring dates were entered correctly. On top of that, there are some employee who were terminated before the conversion took place but we still need to keep a record of that. And I created a third table, say, emplyeeAll with similar fields to the employee data tables. So here is what I need to do: if the firstName, lastName and DateOfBirth in the old employee data table and the new employee data table matches, I would assume they are the same employee, hence I would put the information for the employee obtained from the new employee data table to the employeeAll table, with the Hiring Date changed to the Hiring Date of the old employee data table (and do not copy the record from the old employee table to prevent duplicates), otherwise, I would simply copy and paste the data in new and old employee table to my employeeAll table. I know this is really confusing, but...well...hope you know what I am saying... Is it possible to have a SQL statement for all these? If so, how should the statement looks like?
Hi, I'm currently migrating to Sql 2005 from 2000 and have a quick question about indexes. In 2000 i used to click on Table > All Tasks > Manage Indexes... to view and create all my table indexes. There doesn't seem to be anything similar in 2005 Management Studio. I thought it was under Table > Modify but there's nothing there for indexes. I've had to create all my indexes manually through t-sql but this doesn't help when needing to view and manage current indexes. Can anyone help me on this?