ldf

26.没有ldf的mdf附加数据库--2013-06-07

自作多情 提交于 2020-04-13 07:55:47
今天有个老数据库要查看下,想把它附加到sqlserver2005中,但是发现ldf不见了,一直出错。找了下别人的方法 只有一个mdf文件如Test.mdf,附加数据库 1.在SQL Server中新建一个数据库名为Test(注,文件名为Test.mdf真正的的数据库不一定是这个名,先在SQL Server中导入过程中看看是不是这个名,一定要和真正的数据库名称一致) 2.停止SQL Server,把Test.mdf替换掉 3.重新启动SQL Server,如果你点一下Test数据库会有错误提示,不用管它 4.打开一查询窗口,进行以下操作: ①alter database Test set emergency 设定Test状态为紧急模式 ②sp_dboption 'Test','single user','false' 设定数据库模式为"单一使用者" ③dbcc checkdb(Test,repair_allow_data_loss) 此句为关键语句,意为检查指定数据库所有数据的配置、结构和逻辑完整性。这一步操作会重新建立ldf日志文件 ④sp_dboption 'Test','single user','false' 还原Test数据库模式 ⑤alter database Test set online 设定Test数据库状态为online 注第③步很多人不会成功,原因在于

openGL into png

一个人想着一个人 提交于 2019-12-21 05:15:13
问题 I'm trying to convert an openGL [edit: "card that I drew"(?):) thx unwind]containing a lot of textures (nothing moving) into one PNG file that I can use in another part of the framework I'm working with. Is there a C++ library that does that? thanks! 回答1: If you simply mean "take a scene rendered by OpenGL and save it as an image," then it is fairly straightforward. You need to read the scene with glReadPixels(), and then convert that data to an image format such as PNG (http://www.opengl.org

how can i see data in mdf file

人盡茶涼 提交于 2019-12-10 13:38:24
问题 i have asp.net application. it has App_Data folder. this folder contain mdf and ldf file. how can i see data within these file. i want to see table structure. 回答1: Using SQL Server Management Studio Express you can attach that file. How to attach a file However, if you are viewing that in a project in Visual Studio, you can see that in the server explorer. Also, here is a similar question on the asp.net forums. 来源: https://stackoverflow.com/questions/1711152/how-can-i-see-data-in-mdf-file

how to convert Mdf/ldf database files to .bak file (db restore) using T-SQL or .net code

左心房为你撑大大i 提交于 2019-12-07 06:41:45
问题 I have sql server database files (Mdf/Ldf) and i want to convert them to backup file using T-SQL commands or .net Code (C# or Vb.net). any suggestions. thans 回答1: BACKUP DATABASE [NameOfDatabase] TO DISK = N'D:\path\filename.bak' WITH NOFORMAT, NOINIT, NAME = N'NameOfDatabase-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 Replace NameOfDatabase with name of your database. Replace D:\path\filename.bak with place you want to backup with Replace Name = N database name for cosmetic

how to convert Mdf/ldf database files to .bak file (db restore) using T-SQL or .net code

北城余情 提交于 2019-12-05 11:23:41
I have sql server database files (Mdf/Ldf) and i want to convert them to backup file using T-SQL commands or .net Code (C# or Vb.net). any suggestions. thans BACKUP DATABASE [NameOfDatabase] TO DISK = N'D:\path\filename.bak' WITH NOFORMAT, NOINIT, NAME = N'NameOfDatabase-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 Replace NameOfDatabase with name of your database. Replace D:\path\filename.bak with place you want to backup with Replace Name = N database name for cosmetic indexing reasons... Original source - http://forums.asp.net/p/1448416/3870094.aspx 来源: https://stackoverflow

How to rename the Physical Database Files

别说谁变了你拦得住时间么 提交于 2019-12-04 19:39:40
问题 I have used tsql to detach a database like this: EXEC sp_detach_db @dbname = 'my_db' I then made use of PHP to rename the physical files. I was able to rename the mdf file but not the ldf file! I even tried a dos command REN but that didn't work for the ldf file either! I wanted to ask, is there something special about the physical log files that allow it not to be renamed? Is there a better way of doing this? Thanks all 回答1: Detach the Database, Rename the files, Attach it again. 回答2: You

openGL into png

五迷三道 提交于 2019-12-03 16:43:42
I'm trying to convert an openGL [edit: "card that I drew"(?):) thx unwind]containing a lot of textures (nothing moving) into one PNG file that I can use in another part of the framework I'm working with. Is there a C++ library that does that? thanks! If you simply mean "take a scene rendered by OpenGL and save it as an image," then it is fairly straightforward. You need to read the scene with glReadPixels(), and then convert that data to an image format such as PNG ( http://www.opengl.org/resources/faq/technical/miscellaneous.htm ). There are also more efficient ways of achieving this, such as