Showing posts with label written. Show all posts
Showing posts with label written. Show all posts

Tuesday, March 27, 2012

Automating Data Extension Deployment

Hi,

I have written a Data Processing extension for my application and can deploy it on my development machine no problems. My question is: what is the "correct" way of deploying an extension to an end user's machine? Do I have to write a special program to find and modify the Reporting Server config files and copy the extension over. Surely many developers have the same need so there must be a generic solution to this problem, however, I haven't managed to find one.

I first came across this issue in SQL2000 and I thought/hoped it would be rectified with SQL2005 but it appears not to be (unless I'm missing something).

Any ideas would be greatly appreciated.

Thanks in advance,

Tim

Hi Tim,

I don't have an answer for you, but I share your situation. I'll let you know if I find anything, and would appreciate the same.

TIA, Mike.

sql

Automating Data Extension Deployment

Hi,

I have written a Data Processing extension for my application and can deploy it on my development machine no problems. My question is: what is the "correct" way of deploying an extension to an end user's machine? Do I have to write a special program to find and modify the Reporting Server config files and copy the extension over. Surely many developers have the same need so there must be a generic solution to this problem, however, I haven't managed to find one.

I first came across this issue in SQL2000 and I thought/hoped it would be rectified with SQL2005 but it appears not to be (unless I'm missing something).

Any ideas would be greatly appreciated.

Thanks in advance,

Tim

Hi Tim,

I don't have an answer for you, but I share your situation. I'll let you know if I find anything, and would appreciate the same.

TIA, Mike.

Monday, March 19, 2012

Automatic printing from ReportViewer control

Hi,
I've got a WinForm app written in .NET 2.0 (C#). We have a series of SQL
Reporting Services reports which are on a remote server - not RDLCs. I've
got a ReportViewer control on one of the forms, and am able to render the
reports in the ReportViewer just fine. However, I would like to be able to
print these reports, preferably without displaying any UI at all, through
this app. Does anybody have any suggestions? I realize that RDLCs would
work in this case, but that's not an option, unfortunately.
Thanks, JimOn Jan 4, 6:34 pm, "LiveCycle" <livecy...@.sandbox.etech.adobe.com>
wrote:
> Hi,
> I've got a WinForm app written in .NET 2.0 (C#). We have a series of SQL
> Reporting Services reports which are on a remote server - not RDLCs. I've
> got a ReportViewer control on one of the forms, and am able to render the
> reports in the ReportViewer just fine. However, I would like to be able to
> print these reports, preferably without displaying any UI at all, through
> this app. Does anybody have any suggestions? I realize that RDLCs would
> work in this case, but that's not an option, unfortunately.
> Thanks, Jim
This link should be helpful.
http://forums.asp.net/p/516455/533549.aspx
Regards,
Enrique Martinez
Sr. Software Consultant

Sunday, March 11, 2012

Automatic Database Backup

Hi all,

I have written an application in C# .NET which will run on another PC. The database required for the application will be created during the installation. How can I provide that the application backups the database periodically? Can I generate an SQL script which will run at installation and then backup the database automatically?

I really need advices.
Thank you...
BurcuIn Enterprise Manager you can set up automated maintenance procedures for backing up, re indexing, and repairing databases.|||

Quote:

Originally Posted by Motoma

In Enterprise Manager you can set up automated maintenance procedures for backing up, re indexing, and repairing databases.


Thank you. But, what I want to do is to realize it programmatically. I don't want that the user has to set up anything in Enterprise Manager. All the back up procedure must be organized during the installation of my application program.

An idea is to define a scheduled job on server agent by using SQL-DMO library. So, the job will back up the database periodically. But I am not sure if it is the best choice.
Any other ideas?|||

Quote:

Originally Posted by eflatunn

Thank you. But, what I want to do is to realize it programmatically. I don't want that the user has to set up anything in Enterprise Manager. All the back up procedure must be organized during the installation of my application program.

An idea is to define a scheduled job on server agent by using SQL-DMO library. So, the job will back up the database periodically. But I am not sure if it is the best choice.
Any other ideas?


I am sure there is a way to set up SQL Server maintenance plans without the Enterprise Manager IDE. I am sorry, but I do not know how exactly to do this. Your best bet, if you wanted to pursue this, would be to check out the MSDN and look through all of the system stored procedures. After that, you could try the setting up a Schedule with the SQL Profiler running to see if you could find out what the IDE is calling on the server.|||I just found something while digging through the help files. There are four stored procedures that you may be able to use: sp_add_jobschedule sp_delete_jobshedule sp_help_jobschedule and sp_update_jobschedule.|||hai
I also want to know how can i get the backup of a database programmatically
If any one know this please help me|||I included SQL-DMO library in my application. Using SQL-DMO objects, I create a job in SQL Server Agent and assign a schedule so that back up can be done periodically.|||Hope the following helps

backupDir = Directory.GetCurrentDirectory() + "\\DBBackup";
if (!Directory.Exists(backupDir))
{
Directory.CreateDirectory(backupDir);
}
datePart = DateTime.Now.ToString(dateFormat);

backupFileName = backupDir + "\\DBName_" + datePart + "_" + "backup.log";

backupQuery = "use master; if exists ( select 1 from sysdevices where name = 'DBName') exec sp_dropdevice 'DBName'; " +
"exec sp_addumpdevice 'disk', 'DBName', '" + backupFileName + "' ; backup database DBName to DBName";

try
{
//gets osql and runs osql tool to execute the DB scripts
ProcessStartInfo procInfo = new ProcessStartInfo("osql.exe");
// specifies the window style
procInfo.WindowStyle = ProcessWindowStyle.Hidden;
//specifies the arguments for the process
procInfo.Arguments = Common.GetCommonProcessArguments(backupQuery);
//starts the process
Process osql = Process.Start(procInfo);

//waits for all the dbscripts to run.
osql.WaitForExit();
osql.Dispose();
}

private static string GetCommonProcessArguments(string fileName)
{
// string to be passed to osql tool
string result = " -S " + Environment.MachineName + @." -E "+ "-n" + " -Q " + Char.ToString('"') +
fileName + Char.ToString('"') + " -o " + Char.ToString('"') + CurrentPath + "\\DBScriptsLog.txt";

return result;

}

Sunday, February 12, 2012

Auto Increment Starting 1 after deleting records

Hi,
How can I make the auto increment number start from 1 again after deleting
records in the table? I should have written it down somewhere when I knew
it last year.
YontaekYou can use DBCC CHECKIDENT or TRUNCATE TABLE. See Books Online for more
details.
"Asp Psa" <asppsa@.hotmail.com> wrote in message
news:uqVv5akjGHA.4044@.TK2MSFTNGP03.phx.gbl...
> Hi,
> How can I make the auto increment number start from 1 again after deleting
> records in the table? I should have written it down somewhere when I knew
> it last year.
> Yontaek
>