Using Sqldmo To Read Transaction Log
May 11, 2004Hi,
I need to access and read the transaction log and run an update according to the log....is it possible through sqldmo....is there any other methods through which i can do the same
Hi,
I need to access and read the transaction log and run an update according to the log....is it possible through sqldmo....is there any other methods through which i can do the same
Hi,
I am looking for a way to read a transaction log in an Excel format, does anyone know how I can do this? I have already looked at the dbcc log(mydb), and its not documented, doesnt give enough info. I am more looking for an open source/free tool or a way to do it in SQL Server.
Thanks much.
Hi there,
I need to recover certain transactions that I made on the server.
Those transactions were in scripts and I lost the files.
Is there a way to read the transaction log so that I can see what transactions were executed?
TIA
Hi,
I wanted to read the transaction log...is there a way??? I want to know the command executed from the transaction logs.
DBCC TRACEON (3604)
select * from ::fn_dblog(1,null)
DBCC LOG (test,-1)
Anything else apart from these??
Regards,
Asha
Hello,
I have following situation:
1st thread: start transaction, update some values in table (with (rowlock))
2nd thread: starts select for this record.
I have tried some possibilities with SET TRANSACTION ISOLATION LEVEL but noone is suitable for me. I would like during such running transaction to have possibility to read but the OLD values (last commited).
Am I able to reach this behaviour with some setting of locks, transaction level?
How can I read the content of transaction log?
View 2 Replies View RelatedI still have transactions in use mainly to set isolation levels. There are obviously no update/delete statements in them. I'm pretty sure this will still add rows to the transaction log even though there won't be any writes to the db data files. Is it still a critical best practice to use RAID 1/0 instead of RAID 5 for the logs? Looking to re-use some existing storage rather than buy new ones. Thoughts?
View 1 Replies View RelatedDoes anyone know of a utility to read SQL 7 Transaction Log Backups and present them in a meaningful format?
View 2 Replies View RelatedHi!
The purpose is to se history of which user updated, inserted or deleted a row in the database.
Can't seem to find any publications from microsoft on how to parse and interpret the log file.
Any documentation on how the log file is structured?
Is it possible to obtain this information through the system views
I don't want to use triggers.
Thanks
our users believe that we lost some valid data, but no one knows who did it,
I thought I can find it from the transaction dumps I take every hour
so ,Can I read Transaction Dumps (*.TRN) file in SQL server 7.0 or Can I get this information through other means.
Thanks for your help
DP
We have poor performance spikes on a drive containing our log file but this is only for reads and seems to be at a time when we run a re-index job. If this is a likely correlation as to poor performance in reading the log file, and what reads are done from a log file.
View 2 Replies View Related
Hello,
how can i view the content of a archived (backed up) transaction log?
DBCC LOG only works with online logs.
Thx for your answer
Best regards,
Stefan Ridinger
I actually am just looking for some supporting documentation on some facets of SQL Server.As far as I have always known, when anyone does a READ from a SQL Server database (SELCT * from <TABLE>), SQL Server does not create a log record...since there's no data or database structure being modified. A colleague is under the impression READ's are logged operations.
View 5 Replies View RelatedHello, everyone:
I have a local transaction,
BEGIN TRAN
INSERT Z_Test SELECT STATE_CODE FROM View_STATE_CODE
COMMIT
View_STATE_CODE points to remote SQL server named PROD. There is error when I run this query:
Server: Msg 8501, Level 16, State 1, Line 12
MSDTC on server 'PROD' is unavailable.
Server: Msg 7391, Level 16, State 1, Line 12
The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction.
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned 0x8004d01c].
It looks like remote server is not available inside the local transaction. How to handle that?
Thanks
ZYT
I had a databases running on SQL Server (EVALUATION VERSION).I moved it to another system running:-Windows 2000 Server-IIS 5.0-BlueDragon Server-MSDEI applied all of the latest service packs, security updates, etc...Intalled SQL Server Web Data Administrator and .NET framework.I attached the database using sp_attach_db:[color=blue]>osql –U sa>password>Sp_attach_db ‘whatever',>@filename1 = ‘C:Program FilesMicrosoft SQL[/color]ServerMSSQLDataCollaborationTools.mdf',[color=blue]>@filename2 = ‘C:Program FilesMicrosoft SQL[/color]ServerMSSQLDataCollaborationTools.ldf'[color=blue]>go[/color]I added my datasource using the ODBC Admin Tool...Verified it using the BlueDragon Admin Datasources page....But now I'm getting the error message:'Could not run BEGIN TRANSACTION in database 'whatever' because thedatabase is read-only.'Any help/guidance would be appreciated.Thanks very much.Shaun
View 3 Replies View RelatedI am trying to write a database compare application for our SQL Server databases using VB and SQLDMO.
I find SQLDMO to be rather slow but on large databases with about 800+ tables, this loop eats up all of my abundant memory until everything crashes. On smaller db's it works fine but is a slower than I expected.
Dim Tbl as SQLDMO.Table
Dim Col as SQLDMO.Column
For Each Tbl in DB.Tables 'DB was previously set
For Each Col in Tbl.Columns
Debug.Print Tbl.Name & "." & Col.Name
Next Col
Next Tbl
Here's a pic of what the app looks like so far. If it looks useful to you, let me know, I'll give you a copy if I can get it working better!
Chad
I am using SQLDMO.DLL for Backup & restore utility in C# application.
Following is the code :
SQLDMO._SQLServer srv = new SQLDMO.SQLServerClass();
srv.Connect("IBM0505d-040","sa","");
SQLDMO.Restore res = new SQLDMO.RestoreClass();
res.Devices = res.Files;
res.Files = this.txtRestorefrom.Text;
res.Database = "abc";
res.ReplaceDatabase = true;
res.SQLRestore(srv);
While running above code it gives following exception :
"[Microsoft][ODBC SQL Server Driver][SQL Server]Database in use. The system administrator must have exclusive use of the database to run the restore operation.[Microsoft][ODBC SQL Server Driver][SQL Server]Backup or restore operation terminating abnormally."
Can somebody suggest solution for this.
Thanks,
Jitendra C.
Hi,
I am using SQLDMO for database backup and restore.
While taking a backup if I specify existing backup file name then I think it appends to existing file because its size increases almost by double.
And when I restore from that file the it restores data which I take back up very first time. It doest dont restores latest data.
If user specify existing file name then it should overwrite.
How to specify this using SQLDMO
Thanks
Hi all
Could anyone tell me from where i can find complete Documentation for SQLDMO Object and how can i initialize
and use it in my programms?
Kind Regards.
I have a program using SQLDMO object.When I use it on my computer and I have install sqlserverit works OK,but when I move the program to another computer without sqlserverthe program runs error the error message is com exception 80040154can the proram using SQLDMO running on computer without installing sqlserver?BTW: my System is win2003,and the other is windows xp
View 2 Replies View RelatedHi
Are there sqldmo for server 6.5 ?, This is , the Sql server 6.5 has SQLDMO ?
Hi
I need to install sqldmo.dll and related files - so I can use SQL Objects. I've been searching the Internet and trying for hours to register the file on XP Client machines - but not go.
I have put the following files in the locations below:
sqldmo.dll Program FilesMicrosoft SQL Server80ToolBinn
sqldmo.rll Program FilesMicrosoft SQL Server80ToolBinnResources1033
sqlresld.dll Program FilesMicrosoft SQL Server80ToolBinn
sqlsvc.dll Program FilesMicrosoft SQL Server80ToolBinn
sqlsvc.rll Program FilesMicrosoft SQL
Server80ToolBinnResources1033
sqlunirl.dll System32
w95scm.dll Program FilesMicrosoft SQL Server80ToolBinn
I have also tried putting the files in System32 with the appropriate subdirectories - still not go. I cannot seem to get this to work.
If anybody has successfully installed sqldmo.dll for use on SQL Server 2000 client machines running XP, I'd be really grateful for a few pointers.
Thanks
Paul
can anyone give the registry key for sqldmo.dll?
View 1 Replies View Relatedjess writes "Hi,
IS there a component/way of retrieving a list of SQL Servers or databases on your local network for SQL 2005/Express. The same way sqldmo worked for a .net project.
thanks"
Hi,how to create an SQL DMO object in .net and use it to enumerate theproperties of Sql server. Can we use this object to list propertieswithout logging in to the server?
View 3 Replies View RelatedUsing InstallShield Developer 7.04.Does anyone know of a good way to detect if SQLDMO is installed?TIAmcpoo
View 2 Replies View RelatedHi all I am trying to do a Bulk Copy from a "tab delmimited" text file to atable in my database. I have it almost working except when the file hastoo few columns for the table (table has 421 columns).Some of my the files will have 419 columns some others files will have 421columns.When my bulk insert script encounters a file with 419 colums it will putsome of the data from the next line in the last 2 columns.I tried creating a DTS package with a bulk insert and I get the same outcome.Here is my test script can anyone help'--------------------------------------------------------------<%Dim objServer: Set objServer = Server.CreateObject("SQLDMO.SQLServer")Dim objBCP: Set objBCP = Server.CreateObject("SQLDMO.BulkCopy")Dim objDB: Set objDB = Server.CreateObject("SQLDMO.Database")dim BulkCopydim objTabledim itemdim g_strUploadPath: g_strUploadPath =Server.MapPath("../DOC2/")&"upload"dim strFileName: strFileName = g_strUploadPath & "ex_test.txt"'if file doesn't exist and it's an import,'don't waste time (too be add later)'If Import = True And Dir(FileName) = "" Then Exit Function'On Error GoTo ErrorHandlerobjServer.Connect "XXX.XXX.XX.XX", "XXX", "XX"objServer.EnableBcp = 1Set objDB = objServer.Databases("Advia120v2_dev")With objBCP.DataFilePath = strFileName.UseBulkCopyOption = True'tab delmitted, carriage return line feed ends row.DataFileType = 2'.ColumnDelimiter = chr(9)'.RowDelimiter = chr(13) & chr(10).IncludeIdentityValues = FalseEnd WithobjDB.Tables("Hemo_193_39552_39").ImportData objBCP'BCP = True'ErrorHandler:'Set objBCP = Nothing'Set objServer = Nothing%>'--------------------------------------------------------------thanks
View 3 Replies View RelatedHi All
I'm getting this when executing the code below. Going from W2K/SQL2k SP4 to XP/SQL2k SP4 over a dial-up link.
If I take away the begin tran and commit it works, but of course, if one statement fails I want a rollback. I'm executing this from a Delphi app, but I get the same from Qry Analyser.
I've tried both with and without the Set XACT . . ., and also tried with Set Implicit_Transactions off.
set XACT_ABORT ON
Begin distributed Tran
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TRANSACTIONMAIN
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.TRANSACTIONMAIN
set REPFLAG = 0 where REPFLAG = 1 and DONE = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.WBENTRY
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.WBENTRY
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.FIXED
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.FIXED
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.ALTCHARGE
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.ALTCHARGE
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TSAUDIT
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.TSAUDIT
set REPFLAG = 0 where REPFLAG = 1
COMMIT TRAN
It's got me stumped, so any ideas gratefully received.Thx
Hello all,
has anyone had the opportunity to try the sql web admin tool? if so, i have one question.
How can i use this to connect to a remote sql/msde server?
in the server textbox on the login screen i try 'machine name''instance name', along with the sa username and password. This does not work however.
am i just entering the wrong value , or do i need to change the code of the .connect method to allow for remote connections?
TIA.
-C-
Problem is: "I am trying to attach a database through SQLDMO using VB6 In MSDE (Microsoft Sql Server Desktop Engine). If my '.mdf' and '.ldf' files are placed in a folder with Spaces then it give me error because it is picking up the folder name up to first space."
In VS 2003 I used SQLDMO (Com Object) to list all available SQL Servers. Is in SQL Server 2005 a managed .net Component that can do that task?Thanks,Rainer.
View 2 Replies View RelatedI have a question regarding using SQLDMO.Backup.
I am finding that if the Files property specifies a folder for the path & filename that contains a space, the SQLDMO object appends a path of C:Program FilesMicrosoft SQL ServerMSSQLBackup and then my path.
If I use a path like C:TempBackup all works ok.
How do I get SQLDMO to accept a path with a space in the definition.
Thanks
Hello,
Does anyone know how I add the SQLDMO library to enable me to reference it in DTS Active X scripts? I do not want to install VB on the server to do this.
Regards,
John Thorpe