Sunday, March 11, 2012
AutoMatic Configuration Differential Backup
i am using Microsoft SQL Server 2000
Enterprise Edition and running four data bases on
server.All on Local Areal Network the size of every data
bases is 1 GB and changing occour every Second and minute
so i want to implement Differential Backup after every One
Hours using SQL Server agent and schedule task can any
body guide me properly and any tutorial like web site that
help me step by step ......Documentation etc...
Second i also want replicated to another machine on LAN
thank
IrfanIn SQL Enterprise Manager, select SQL Agent->jobs, New job
Give the job a name and go to steps -> new Step... Choose t-sql step...
The command should be
backup database yourdbname to disk =
'\\servername\sharename\backupfilename.bkp' with init,differential
OK this and add similar steps for each of the other databases.
Then go to schedule and choose a schedule for this to run...
Save it and see if it works...
More details can be found in SQL Server Books On Line...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Irfan" <mirfanaslam@.hotmail.com> wrote in message
news:0ca401c48b8c$9c5f9a90$a301280a@.phx.gbl...
> hello every one
> i am using Microsoft SQL Server 2000
> Enterprise Edition and running four data bases on
> server.All on Local Areal Network the size of every data
> bases is 1 GB and changing occour every Second and minute
> so i want to implement Differential Backup after every One
> Hours using SQL Server agent and schedule task can any
> body guide me properly and any tutorial like web site that
> help me step by step ......Documentation etc...
> Second i also want replicated to another machine on LAN
> thank
> Irfan
>
AutoMatic Configuration Differential Backup
i am using Microsoft SQL Server 2000
Enterprise Edition and running four data bases on
server.All on Local Areal Network the size of every data
bases is 1 GB and changing occour every Second and minute
so i want to implement Differential Backup after every One
Hours using SQL Server agent and schedule task can any
body guide me properly and any tutorial like web site that
help me step by step ......Documentation etc...
Second i also want replicated to another machine on LAN
thank
Irfan
In SQL Enterprise Manager, select SQL Agent->jobs, New job
Give the job a name and go to steps -> new Step... Choose t-sql step...
The command should be
backup database yourdbname to disk =
'\\servername\sharename\backupfilename.bkp' with init,differential
OK this and add similar steps for each of the other databases.
Then go to schedule and choose a schedule for this to run...
Save it and see if it works...
More details can be found in SQL Server Books On Line...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Irfan" <mirfanaslam@.hotmail.com> wrote in message
news:0ca401c48b8c$9c5f9a90$a301280a@.phx.gbl...
> hello every one
> i am using Microsoft SQL Server 2000
> Enterprise Edition and running four data bases on
> server.All on Local Areal Network the size of every data
> bases is 1 GB and changing occour every Second and minute
> so i want to implement Differential Backup after every One
> Hours using SQL Server agent and schedule task can any
> body guide me properly and any tutorial like web site that
> help me step by step ......Documentation etc...
> Second i also want replicated to another machine on LAN
> thank
> Irfan
>
AutoMatic Configuration Differential Backup
i am using Microsoft SQL Server 2000
Enterprise Edition and running four data bases on
server.All on Local Areal Network the size of every data
bases is 1 GB and changing occour every Second and minute
so i want to implement Differential Backup after every One
Hours using SQL Server agent and schedule task can any
body guide me properly and any tutorial like web site that
help me step by step ......Documentation etc...
Second i also want replicated to another machine on LAN
thank
IrfanIn SQL Enterprise Manager, select SQL Agent->jobs, New job
Give the job a name and go to steps -> new Step... Choose t-sql step...
The command should be
backup database yourdbname to disk ='\\servername\sharename\backupfilename.bkp' with init,differential
OK this and add similar steps for each of the other databases.
Then go to schedule and choose a schedule for this to run...
Save it and see if it works...
More details can be found in SQL Server Books On Line...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Irfan" <mirfanaslam@.hotmail.com> wrote in message
news:0ca401c48b8c$9c5f9a90$a301280a@.phx.gbl...
> hello every one
> i am using Microsoft SQL Server 2000
> Enterprise Edition and running four data bases on
> server.All on Local Areal Network the size of every data
> bases is 1 GB and changing occour every Second and minute
> so i want to implement Differential Backup after every One
> Hours using SQL Server agent and schedule task can any
> body guide me properly and any tutorial like web site that
> help me step by step ......Documentation etc...
> Second i also want replicated to another machine on LAN
> thank
> Irfan
>
Thursday, March 8, 2012
Automated restart of Analysis Services
Hello,
I need to put the Analysis server in local mode only while my jobs process cubes on Saturday morning.
I can script the property but I do not know how to automatically restart the service.
Any idea?
Thanks
Philippe
<Alter AllowCreate="true" ObjectExpansion="ObjectProperties" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<Object />
<ObjectDefinition>
<Server xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2">
<ID>SMDEV</ID>
<Name>SMDEV</Name>
<ServerProperties>
<ServerProperty>
<Name>Network\ListenOnlyOnLocalConnections</Name>
<Value>true</Value>
</ServerProperty>
</ServerProperties>
</Server>
</ObjectDefinition>
</Alter>
You can create a simple batch file and use there commands "net start MSSQLSErverOlapservice"
and "net stop MSSQLSErverOlapservice".
Another way, you can write a simple C# application using ServiceController inteface. Take a look here; http://msdn2.microsoft.com/en-us/library/sywbez17.aspx
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Monday, February 13, 2012
Auto Print
I am using Visual studio 2005. This may be a vb question but it deals with reporting services.
I have a local report using the reportviewer control. (rdcl 2005 fmt)
It displays perfectly, and when i click the print button it prints flawlessly.
How do i print the document to the default printer automatically?
This seems like a basic function that i can't seem to find the answer to.
Thanx
Jerry Cicierega
I found the answer. Its not as bad as it looks. Thois is a form called "slip.vb" I am printing to a slip printer. The form has a rpt viewer on it. The form nevers shows. It is just used as a containor for the report. I created the report as an RDL report. I coppied it into the program folder and re-named it to a RDCL extension. I then established the datasource. and it worked interactivly. I then added the following code and presto. Auto Print. I also asume the default printer is the printer of choice.
Imports System.IO
Imports System.Data
Imports System.Text
Imports System.Drawing.Imaging
Imports System.Drawing.Printing
Imports System.Collections.Generic
Imports Microsoft.Reporting.WinForms
Public Class Slip
Private m_currentPageIndex As Integer
Private m_streams As IList(Of Stream)
Public Sub Print_Slip()
Me.TxnHistoryTableAdapter.Connection.ConnectionString = My.Utilities.ConnectionString
Me.TxnHistoryTableAdapter.FillBy(Me.PCZonDataSet.TxnHistory, My.GlobalVariables.ComputerData.ComputerName, My.GlobalVariables.ComputerData.Sequencenumber)
Export(Me.ReportViewer1.LocalReport)
m_currentPageIndex = 0
Print()
End Sub
Private Function CreateStream(ByVal name As String, _
ByVal fileNameExtension As String, _
ByVal encoding As Encoding, ByVal mimeType As String, _
ByVal willSeek As Boolean) As Stream
Dim stream As Stream = New FileStream(name + "." + fileNameExtension, FileMode.Create)
m_streams.Add(stream)
Return stream
End Function
Private Sub Export(ByVal report As LocalReport)
Dim deviceInfo As String = _
"<DeviceInfo>" + _
" <OutputFormat>EMF</OutputFormat>" + _
" <PageWidth>9in</PageWidth>" + _
" <PageHeight>11in</PageHeight>" + _
" <MarginTop>0.0in</MarginTop>" + _
" <MarginLeft>0.0in</MarginLeft>" + _
" <MarginRight>0.25in</MarginRight>" + _
" <MarginBottom>0.25in</MarginBottom>" + _
"</DeviceInfo>"
Dim warnings() As Warning = Nothing
m_streams = New List(Of Stream)()
report.Render("Image", deviceInfo, _
AddressOf CreateStream, warnings)
Dim stream As Stream
For Each stream In m_streams
stream.Position = 0
Next
End Sub
Private Sub Print()
If m_streams Is Nothing Or m_streams.Count = 0 Then
Return
End If
Dim printDoc As New PrintDocument()
AddHandler printDoc.PrintPage, AddressOf PrintPage
printDoc.Print()
If Not (m_streams Is Nothing) Then
Dim stream As Stream
For Each stream In m_streams
stream.Close()
Next
m_streams = Nothing
End If
End Sub
Private Sub PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
Dim pageImage As New Metafile(m_streams(m_currentPageIndex))
ev.Graphics.DrawImage(pageImage, ev.PageBounds)
m_currentPageIndex += 1
ev.HasMorePages = (m_currentPageIndex < m_streams.Count)
End Sub
End Class