Tuesday, March 27, 2012
Archiving Data
whilst maintaining it's availability... ...the current data takes 90% of the
queries, but grows very large and puts pressure on the disks... ...I wanted
to explore using a "sliding window" on a partitioned view across a federated
database and have two initial questions I can't find an answer to...
1. Does the data move between partitions when partitions are located on
different federated servers?
2. Assuming a good horizontal partition is chosen, is an automated sliding
window practical in a production environment?
Thanks in advance BenUKPersonally, I'd revise your strategy to use Partioned Tables in SQL2K5.
Awesome feature.
"Ben UK" <BenUK@.discussions.microsoft.com> wrote in message
news:843C5511-A7D1-4323-83A9-7D7B17BA7639@.microsoft.com...
> I was exploring ways of archiving old data in our production environment
> whilst maintaining it's availability... ...the current data takes 90% of
the
> queries, but grows very large and puts pressure on the disks... ...I
wanted
> to explore using a "sliding window" on a partitioned view across a
federated
> database and have two initial questions I can't find an answer to...
> 1. Does the data move between partitions when partitions are located on
> different federated servers?
> 2. Assuming a good horizontal partition is chosen, is an automated sliding
> window practical in a production environment?
> Thanks in advance BenUK
Sunday, March 25, 2012
Archive SQL Server Logs..?
is anyone knows that how can i archive(delete) log file for current date or
specific date'?
Thanx in advance
regards
--
Message posted via http://www.sqlmonster.comHi,
Did you mean SQL Server error logs or Tranasction log backups?
If it is Error log, sql server by itself keep only 6+1 (current) copies by
default. The old files will be deleted automatically.
If it is Transaction log backup files, then use database maintenance plan to
fix a archival day. So as old file(s) will be deleted automatically.
Thanks
Hari
SQL Server MVP
"sonny singh via SQLMonster.com" <forum@.nospam.SQLMonster.com> wrote in
message news:fa2cf9e684d741419c1094db51a9fea5@.SQLMonster.com...
> Hi Folks
> is anyone knows that how can i archive(delete) log file for current date
> or
> specific date'?
> Thanx in advance
> regards
> --
> Message posted via http://www.sqlmonster.com|||Hi Hari
You can change the number of error logs maintained by editing the Registry
for any instance. For the default instance, find the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer and edit it by
adding a new value. Define the value with the name NumErrorLogs, and the
type REG_DWORD. Supply any initial value desired, but keep in mind that the
value you enter when editing the Registry will be in hexadecimal format.
For a named instance, you need to find the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<SQL Server
Instance Name>\MSSQLServer. Again, use the Edit feature of the Registry to
add a new value with the name NumErrorLogs of type REG_DWORD, and supply an
initial value in hexadecimal format.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:Os1pMt2bFHA.3712@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Did you mean SQL Server error logs or Tranasction log backups?
> If it is Error log, sql server by itself keep only 6+1 (current) copies by
> default. The old files will be deleted automatically.
> If it is Transaction log backup files, then use database maintenance plan
> to fix a archival day. So as old file(s) will be deleted automatically.
> Thanks
> Hari
> SQL Server MVP
> "sonny singh via SQLMonster.com" <forum@.nospam.SQLMonster.com> wrote in
> message news:fa2cf9e684d741419c1094db51a9fea5@.SQLMonster.com...
>> Hi Folks
>> is anyone knows that how can i archive(delete) log file for current date
>> or
>> specific date'?
>> Thanx in advance
>> regards
>> --
>> Message posted via http://www.sqlmonster.com
>
Archive SQL Server Logs..?
is anyone knows that how can i archive(delete) log file for current date or
specific date??
Thanx in advance
regards
Message posted via http://www.droptable.com
Hi,
Did you mean SQL Server error logs or Tranasction log backups?
If it is Error log, sql server by itself keep only 6+1 (current) copies by
default. The old files will be deleted automatically.
If it is Transaction log backup files, then use database maintenance plan to
fix a archival day. So as old file(s) will be deleted automatically.
Thanks
Hari
SQL Server MVP
"sonny singh via droptable.com" <forum@.nospam.droptable.com> wrote in
message news:fa2cf9e684d741419c1094db51a9fea5@.droptable.co m...
> Hi Folks
> is anyone knows that how can i archive(delete) log file for current date
> or
> specific date??
> Thanx in advance
> regards
> --
> Message posted via http://www.droptable.com
|||Hi Hari
You can change the number of error logs maintained by editing the Registry
for any instance. For the default instance, find the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ MSSQLServer and edit it by
adding a new value. Define the value with the name NumErrorLogs, and the
type REG_DWORD. Supply any initial value desired, but keep in mind that the
value you enter when editing the Registry will be in hexadecimal format.
For a named instance, you need to find the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<SQL Server
Instance Name>\MSSQLServer. Again, use the Edit feature of the Registry to
add a new value with the name NumErrorLogs of type REG_DWORD, and supply an
initial value in hexadecimal format.
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:Os1pMt2bFHA.3712@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Did you mean SQL Server error logs or Tranasction log backups?
> If it is Error log, sql server by itself keep only 6+1 (current) copies by
> default. The old files will be deleted automatically.
> If it is Transaction log backup files, then use database maintenance plan
> to fix a archival day. So as old file(s) will be deleted automatically.
> Thanks
> Hari
> SQL Server MVP
> "sonny singh via droptable.com" <forum@.nospam.droptable.com> wrote in
> message news:fa2cf9e684d741419c1094db51a9fea5@.droptable.co m...
>
Archive SQL Server Logs..?
is anyone knows that how can i archive(delete) log file for current date or
specific date'?
Thanx in advance
regards
Message posted via http://www.droptable.comHi,
Did you mean SQL Server error logs or Tranasction log backups?
If it is Error log, sql server by itself keep only 6+1 (current) copies by
default. The old files will be deleted automatically.
If it is Transaction log backup files, then use database maintenance plan to
fix a archival day. So as old file(s) will be deleted automatically.
Thanks
Hari
SQL Server MVP
"sonny singh via droptable.com" <forum@.nospam.droptable.com> wrote in
message news:fa2cf9e684d741419c1094db51a9fea5@.SQ
droptable.com...
> Hi Folks
> is anyone knows that how can i archive(delete) log file for current date
> or
> specific date'?
> Thanx in advance
> regards
> --
> Message posted via http://www.droptable.com|||Hi Hari
You can change the number of error logs maintained by editing the Registry
for any instance. For the default instance, find the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MS
SQLServer\MSSQLServer and edit it by
adding a new value. Define the value with the name NumErrorLogs, and the
type REG_DWORD. Supply any initial value desired, but keep in mind that the
value you enter when editing the Registry will be in hexadecimal format.
For a named instance, you need to find the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mi
crosoft SQL Server\<SQL Server
Instance Name>\MSSQLServer. Again, use the Edit feature of the Registry to
add a new value with the name NumErrorLogs of type REG_DWORD, and supply an
initial value in hexadecimal format.
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:Os1pMt2bFHA.3712@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Did you mean SQL Server error logs or Tranasction log backups?
> If it is Error log, sql server by itself keep only 6+1 (current) copies by
> default. The old files will be deleted automatically.
> If it is Transaction log backup files, then use database maintenance plan
> to fix a archival day. So as old file(s) will be deleted automatically.
> Thanks
> Hari
> SQL Server MVP
> "sonny singh via droptable.com" <forum@.nospam.droptable.com> wrote in
> message news:fa2cf9e684d741419c1094db51a9fea5@.SQ
droptable.com...
>
Tuesday, March 20, 2012
applying transaction logs from a crashed server
server crashes. I can install the server with the same service pack level,
then restore the system databases and then the User databases from the
backups on the new server.
How do we bring in and apply the Transaction logs from the crashed server to
the new server?You mean "the last" log backup? I.e., the log records produced since you produced your most recent
log backup?
It depends on how the server crashed. If the SQL Server is still available, then you just do
BACKUP LOG crashedDb TO .. WITH NO_TRUNCATE
If that SQL Server isn't accessible, then you do the following:
On a working server, create a new database.
Stop that SQL Server.
Delete the database files.
Copy the ldf file from the crashed server in place of the ldf file which you deleted in above step.
Start this SQL Server
BACKUP LOG dbname to ... WITH NO_TRUNCATE
You now have a chain of log backups up until the crash which you can use for your restore. Of
course, all this assumes that you do log backups in the first place and that you can access the ldf
file for your crashed database.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"sharman" <sharman@.discussions.microsoft.com> wrote in message
news:F4187089-40A8-420B-B912-77F1B5A79834@.microsoft.com...
>I would like to know the process to rebuilt a new server if the current
> server crashes. I can install the server with the same service pack level,
> then restore the system databases and then the User databases from the
> backups on the new server.
> How do we bring in and apply the Transaction logs from the crashed server to
> the new server?
Wednesday, March 7, 2012
Application Roles with IIS
lication.
When I run the ASP app and look at SQL Server Current Activity Process Info
, the column Application is showing "Internet Information Services". How do
I align SQL Server and IIS so that Application Security can be utilised?
regards
Greg
PS I have already set the Application Name for this site in IIS.If you are using ASP to connect to SQL Server then the application is IIS
so that is what is diplayed. What application would you prefer it to
display?
Rand
This posting is provided "as is" with no warranties and confers no rights.
Friday, February 24, 2012
appending to the end of current file
ThanksDarren Green suggested in earlier posts that :
The text file provider does not support this. The simplest thing to do is to export to a new file, then use the DOS copy command to merge the files.
This can be done with the Execute Process Task, and any dynamic filename stuff can be handled with an ActiveX Script Task to change the connection and the Exec Proc Task at the same time.
copy FileOriginal.txt+FileNew.txt FileResult.txt
HTH|||That is what I am currently doing. I was hoping for something within the dts package. Thanks for you help.
val|||As suggested its not available using TEXT provider with DTS.
May be this is also other way around, is to export to an excel sheet and save that as text file.:)
Sunday, February 19, 2012
appending current Row ID
Listings.UpdateDB AddNewListing = new Listings.UpdateDB();
AddNewListing.InsertListing (Bathrooms.Text, Bedrooms.Text,Description.Text, Features.ToString(), Address.Text, Price.Text, FN);
I would like to add the current row ID to "FN" like:
Listings.UpdateDB AddNewListing = new Listings.UpdateDB();
AddNewListing.InsertListing(Bathrooms.Text, Bedrooms.Text,Description.Text, Features.ToString(), Address.Text, Price.Text, FN +ID);
Thanks in advance,
Justin.
Why wouldn't your UpdateDB() return the new ID (or set a property)?
Thursday, February 16, 2012
append current date to file name
Easy when you know how ![]()
Hopefully this post will give you some pointers:
Dynamically set a logfile name
(http://blogs.conchango.com/jamiethomson/archive/2006/10/05/SSIS-Nugget_3A00_-Dynamically-set-a-logfile-name.aspx)
-Jamie
|||That was easy. Thanks.|||Perfect timing. Thanks for your post.
Append current date in exported report file name in PDF format in sql report server 2000
HI All
I want to append current date in exported reported file name.
I am using report viewer to diplay report . when i exported report in pdf format it ask me to save file at this time file name is same what ever i uploaded in report server.
when it ask me to save i want append current date to the file name.
like report file name is "testingdetail" then i want "testingdetail-November-27-2006.pdf"
Please help me in this
Thanks
Alpesh
It appears you can only alter the filename when using subscriptions. (link to related post)
If you find another way to achieve that behavior please let me know.
|||
Hi All
I found another way to append current date to Expoting report file name.
We have to overide the Reder method of reporting service
first we have to add web reference of reporting service then
put below code in button click event
private void lnkexport_Click(object sender, System.EventArgs e)
{
ReportingService rs = new ReportingService();
string reportPath=/SampleDetail/TestingDetail;
// TestingDetail report must uploded in SampleDetail folder in ReportManager
TestingDetailReport testingDetailParams =this.reportParams as TestingDetailReport;
ParameterValue[] parameters = new ParameterValue[1];
parameters[0] = new ParameterValue();
parameters[0].Name="parameterName";
parameters[0].Value=parameterValue;
Byte[] result = this.LoadReport(reportPath,parameters);
string fname = "TestingDetail" + " - " +DateTime.Today.ToString("MMMM-dd-yyyy");
Response.ClearContent();
Response.AddHeader("Content-Disposition","attachment; filename=" + fname);
Response.AddHeader("Content-Length", result.LongLength.ToString());
Response.ContentType="Application/pdf";
Response.BinaryWrite(result);
Response.Flush();
Response.Close();
}
private Byte[] LoadReport(string reportPath,ParameterValue[] parameter )
{
ReportingService rs = new ReportingService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
string[] streamIDs;
string optionalString = null;
ParameterValue[]optionalparams =null;
Warning[] warning = null;
Byte[] output= rs.Render(reportPath,"PDF",null,null,parameter,null,null,out optionalString,out optionalString,out optionalparams,out warning,out streamIDs);
return output;
}
Thanks
Alpesh