Showing posts with label implement. Show all posts
Showing posts with label implement. Show all posts

Wednesday, March 21, 2012

Help with Reportviewer.

Hi ,
I'm using the ReportViewer control on my web site .
I need to implement the report bar : forward, back, refresh, pagecount,
print.
1) How can I know how many page are in the report, the standard report bar
display the pagecount but how can I get it ?
2) How can I implement the Print button, the standard report bar display the
Print button but how can I implement it ?
Help me.Can't you just tell the viewer to display its bar? (I believe there is a
command to do that).
José.
"Liz Matyas" <lizmts@.mail.com> wrote in message
news:%23bve6wSxFHA.3152@.TK2MSFTNGP10.phx.gbl...
> Hi ,
> I'm using the ReportViewer control on my web site .
> I need to implement the report bar : forward, back, refresh, pagecount,
> print.
> 1) How can I know how many page are in the report, the standard report bar
> display the pagecount but how can I get it ?
> 2) How can I implement the Print button, the standard report bar display
> the
> Print button but how can I implement it ?
> Help me.
>
>|||Are you using the Report Viewer web part that comes with RS SP2? If you
select the Full toolbar, you should be able to see everything. In the Short
toolbar, you can add print and other functions by editing the apprpriate
style sheet.
"Liz Matyas" <lizmts@.mail.com> wrote in message
news:%23bve6wSxFHA.3152@.TK2MSFTNGP10.phx.gbl...
> Hi ,
> I'm using the ReportViewer control on my web site .
> I need to implement the report bar : forward, back, refresh, pagecount,
> print.
> 1) How can I know how many page are in the report, the standard report bar
> display the pagecount but how can I get it ?
> 2) How can I implement the Print button, the standard report bar display
> the
> Print button but how can I implement it ?
> Help me.
>
>|||We arwe using RS2005 and we need to develop a toolbar with the llok and fill
of our product this is the resone we nned to implement it using code .
"Liz Matyas" <lizmts@.mail.com> wrote in message
news:%23bve6wSxFHA.3152@.TK2MSFTNGP10.phx.gbl...
> Hi ,
> I'm using the ReportViewer control on my web site .
> I need to implement the report bar : forward, back, refresh, pagecount,
> print.
> 1) How can I know how many page are in the report, the standard report bar
> display the pagecount but how can I get it ?
> 2) How can I implement the Print button, the standard report bar display
the
> Print button but how can I implement it ?
> Help me.
>
>sql

Friday, February 24, 2012

Help with manual Log shipping in SQL Server 2000

I am trying to implement a manual log shipping method in SQL server
2000 (standard edition) but I cannot seem to get the transaction logs
applied. There is a strong chance that I might be doing something
basic wrong. The solution involves two jobs setup in Enterprise
Manager and two stored procedures.
If I do the following:
(a) Database backup as per job (1)
(b) Change the database (via Query Analyser)
(c) Restore logs as per job (2)
I was hoping that the change in the source database would get
refelected in the DR database but to no avail? There are no errors,
just no change in the DR database.
I have two jobs setup in Enterprise Manager:
(1) Database Backup
Checkpoint
backup log Suppliers with truncate_only
backup database Suppliers to disk = '\\drsql\g$\DRSuppliers.BAK' with
init
exec DRSQL.master.dbo.restore_icps_database_backups
(2) Restore logs
backup log suppliers to disk='\\drsql\g$\DRSuppliers_log2.LDF' with
init, no_truncate -- I am not convinced that this step is right?
Note the difference in log file name. If it is the same, then I get
errors.
exec DRSQL.master.dbo.restore_icps_database_logs
The two procs are as follows:
CREATE PROCEDURE dbo.restore_icps_database_backups AS
restore database Suppliers
from disk = 'G:\DRSuppliers.bak'
with
replace
,dbo_only
,standby = 'G:\DRSuppliers_log.ldf'
,move 'Suppliers_data' to 'E:\SQLDATA\MSSQL\Data\Suppliers_Data.mdf'
,move 'Suppliers_Log' to 'F:\SQLDATA\MSSQL\data\Suppiers_Log.ldf'
GO
CREATE PROCEDURE dbo.restore_icps_database_logs AS
restore log Suppliers
from disk = 'G:\DRSuppliers.bak'
with
standby = 'G:\DRSuppliers_log.ldf'
GO
Hi
http://www.sql-server-performance.com/sql_server_log_shipping.asp
"PromisedOyster" <PromisedOyster@.hotmail.com> wrote in message
news:1174892030.962292.33520@.p77g2000hsh.googlegro ups.com...
>I am trying to implement a manual log shipping method in SQL server
> 2000 (standard edition) but I cannot seem to get the transaction logs
> applied. There is a strong chance that I might be doing something
> basic wrong. The solution involves two jobs setup in Enterprise
> Manager and two stored procedures.
> If I do the following:
> (a) Database backup as per job (1)
> (b) Change the database (via Query Analyser)
> (c) Restore logs as per job (2)
> I was hoping that the change in the source database would get
> refelected in the DR database but to no avail? There are no errors,
> just no change in the DR database.
>
> I have two jobs setup in Enterprise Manager:
> (1) Database Backup
> Checkpoint
> backup log Suppliers with truncate_only
> backup database Suppliers to disk = '\\drsql\g$\DRSuppliers.BAK' with
> init
> exec DRSQL.master.dbo.restore_icps_database_backups
> (2) Restore logs
> backup log suppliers to disk='\\drsql\g$\DRSuppliers_log2.LDF' with
> init, no_truncate -- I am not convinced that this step is right?
> Note the difference in log file name. If it is the same, then I get
> errors.
> exec DRSQL.master.dbo.restore_icps_database_logs
> The two procs are as follows:
> CREATE PROCEDURE dbo.restore_icps_database_backups AS
> restore database Suppliers
> from disk = 'G:\DRSuppliers.bak'
> with
> replace
> ,dbo_only
> ,standby = 'G:\DRSuppliers_log.ldf'
> ,move 'Suppliers_data' to 'E:\SQLDATA\MSSQL\Data\Suppliers_Data.mdf'
> ,move 'Suppliers_Log' to 'F:\SQLDATA\MSSQL\data\Suppiers_Log.ldf'
> GO
>
> CREATE PROCEDURE dbo.restore_icps_database_logs AS
> restore log Suppliers
> from disk = 'G:\DRSuppliers.bak'
> with
> standby = 'G:\DRSuppliers_log.ldf'
> GO
>
|||On Mar 26, 5:50 pm, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Hihttp://www.sql-server-performance.com/sql_server_log_shipping.asp
> "PromisedOyster" <PromisedOys...@.hotmail.com> wrote in message
> news:1174892030.962292.33520@.p77g2000hsh.googlegro ups.com...
>
>
>
>
>
>
>
>
> - Show quoted text -
Hi
Thats the article I am using, but I think I am having problems with
the backup log stage. I think I may have sussed it out though.
I was not setting log backup device name properly in the proc/job
|||Hi
Have you checked out
http://www.sql-server-performance.com/sql_server_log_shipping.asp which shows
the steps you need to do for this?
"PromisedOyster" wrote:

> I am trying to implement a manual log shipping method in SQL server
> 2000 (standard edition) but I cannot seem to get the transaction logs
> applied. There is a strong chance that I might be doing something
> basic wrong. The solution involves two jobs setup in Enterprise
> Manager and two stored procedures.
> If I do the following:
> (a) Database backup as per job (1)
> (b) Change the database (via Query Analyser)
> (c) Restore logs as per job (2)
If you have not backed up the log after b abd restored it, then it will not
be reflected on your restored database.

> I was hoping that the change in the source database would get
> refelected in the DR database but to no avail? There are no errors,
> just no change in the DR database.
>
John

Help with manual Log shipping in SQL Server 2000

I am trying to implement a manual log shipping method in SQL server
2000 (standard edition) but I cannot seem to get the transaction logs
applied. There is a strong chance that I might be doing something
basic wrong. The solution involves two jobs setup in Enterprise
Manager and two stored procedures.
If I do the following:
(a) Database backup as per job (1)
(b) Change the database (via Query Analyser)
(c) Restore logs as per job (2)
I was hoping that the change in the source database would get
refelected in the DR database but to no avail? There are no errors,
just no change in the DR database.
I have two jobs setup in Enterprise Manager:
(1) Database Backup
Checkpoint
backup log Suppliers with truncate_only
backup database Suppliers to disk = '\\drsql\g$\DRSuppliers.BAK' with
init
exec DRSQL.master.dbo.restore_icps_database_backups
(2) Restore logs
backup log suppliers to disk='\\drsql\g$\DRSuppliers_log2.LDF' with
init, no_truncate -- I am not convinced that this step is right'
Note the difference in log file name. If it is the same, then I get
errors.
exec DRSQL.master.dbo.restore_icps_database_logs
The two procs are as follows:
CREATE PROCEDURE dbo.restore_icps_database_backups AS
restore database Suppliers
from disk = 'G:\DRSuppliers.bak'
with
replace
,dbo_only
,standby = 'G:\DRSuppliers_log.ldf'
,move 'Suppliers_data' to 'E:\SQLDATA\MSSQL\Data\Suppliers_Data.mdf'
,move 'Suppliers_Log' to 'F:\SQLDATA\MSSQL\data\Suppiers_Log.ldf'
GO
CREATE PROCEDURE dbo.restore_icps_database_logs AS
restore log Suppliers
from disk = 'G:\DRSuppliers.bak'
with
standby = 'G:\DRSuppliers_log.ldf'
GOHi
http://www.sql-server-performance.c...og_shipping.asp
"PromisedOyster" <PromisedOyster@.hotmail.com> wrote in message
news:1174892030.962292.33520@.p77g2000hsh.googlegroups.com...
>I am trying to implement a manual log shipping method in SQL server
> 2000 (standard edition) but I cannot seem to get the transaction logs
> applied. There is a strong chance that I might be doing something
> basic wrong. The solution involves two jobs setup in Enterprise
> Manager and two stored procedures.
> If I do the following:
> (a) Database backup as per job (1)
> (b) Change the database (via Query Analyser)
> (c) Restore logs as per job (2)
> I was hoping that the change in the source database would get
> refelected in the DR database but to no avail? There are no errors,
> just no change in the DR database.
>
> I have two jobs setup in Enterprise Manager:
> (1) Database Backup
> Checkpoint
> backup log Suppliers with truncate_only
> backup database Suppliers to disk = '\\drsql\g$\DRSuppliers.BAK' with
> init
> exec DRSQL.master.dbo.restore_icps_database_backups
> (2) Restore logs
> backup log suppliers to disk='\\drsql\g$\DRSuppliers_log2.LDF' with
> init, no_truncate -- I am not convinced that this step is right'
> Note the difference in log file name. If it is the same, then I get
> errors.
> exec DRSQL.master.dbo.restore_icps_database_logs
> The two procs are as follows:
> CREATE PROCEDURE dbo.restore_icps_database_backups AS
> restore database Suppliers
> from disk = 'G:\DRSuppliers.bak'
> with
> replace
> ,dbo_only
> ,standby = 'G:\DRSuppliers_log.ldf'
> ,move 'Suppliers_data' to 'E:\SQLDATA\MSSQL\Data\Suppliers_Data.mdf'
> ,move 'Suppliers_Log' to 'F:\SQLDATA\MSSQL\data\Suppiers_Log.ldf'
> GO
>
> CREATE PROCEDURE dbo.restore_icps_database_logs AS
> restore log Suppliers
> from disk = 'G:\DRSuppliers.bak'
> with
> standby = 'G:\DRSuppliers_log.ldf'
> GO
>|||On Mar 26, 5:50 pm, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Hihttp://www.sql-server-performance.com/sql_server_log_shipping.asp
> "PromisedOyster" <PromisedOys...@.hotmail.com> wrote in message
> news:1174892030.962292.33520@.p77g2000hsh.googlegroups.com...
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> - Show quoted text -
Hi
Thats the article I am using, but I think I am having problems with
the backup log stage. I think I may have sussed it out though.
I was not setting log backup device name properly in the proc/job|||Hi
Have you checked out
http://www.sql-server-performance.c...og_shipping.asp which show
s
the steps you need to do for this?
"PromisedOyster" wrote:

> I am trying to implement a manual log shipping method in SQL server
> 2000 (standard edition) but I cannot seem to get the transaction logs
> applied. There is a strong chance that I might be doing something
> basic wrong. The solution involves two jobs setup in Enterprise
> Manager and two stored procedures.
> If I do the following:
> (a) Database backup as per job (1)
> (b) Change the database (via Query Analyser)
> (c) Restore logs as per job (2)
If you have not backed up the log after b abd restored it, then it will not
be reflected on your restored database.

> I was hoping that the change in the source database would get
> refelected in the DR database but to no avail? There are no errors,
> just no change in the DR database.
>
John

Help with manual Log shipping in SQL Server 2000

I am trying to implement a manual log shipping method in SQL server
2000 (standard edition) but I cannot seem to get the transaction logs
applied. There is a strong chance that I might be doing something
basic wrong. The solution involves two jobs setup in Enterprise
Manager and two stored procedures.
If I do the following:
(a) Database backup as per job (1)
(b) Change the database (via Query Analyser)
(c) Restore logs as per job (2)
I was hoping that the change in the source database would get
refelected in the DR database but to no avail? There are no errors,
just no change in the DR database.
I have two jobs setup in Enterprise Manager:
(1) Database Backup
Checkpoint
backup log Suppliers with truncate_only
backup database Suppliers to disk = '\\drsql\g$\DRSuppliers.BAK' with
init
exec DRSQL.master.dbo.restore_icps_database_backups
(2) Restore logs
backup log suppliers to disk='\\drsql\g$\DRSuppliers_log2.LDF' with
init, no_truncate -- I am not convinced that this step is right'
Note the difference in log file name. If it is the same, then I get
errors.
exec DRSQL.master.dbo.restore_icps_database_logs
The two procs are as follows:
CREATE PROCEDURE dbo.restore_icps_database_backups AS
restore database Suppliers
from disk = 'G:\DRSuppliers.bak'
with
replace
,dbo_only
,standby = 'G:\DRSuppliers_log.ldf'
,move 'Suppliers_data' to 'E:\SQLDATA\MSSQL\Data\Suppliers_Data.mdf'
,move 'Suppliers_Log' to 'F:\SQLDATA\MSSQL\data\Suppiers_Log.ldf'
GO
CREATE PROCEDURE dbo.restore_icps_database_logs AS
restore log Suppliers
from disk = 'G:\DRSuppliers.bak'
with
standby = 'G:\DRSuppliers_log.ldf'
GOHi
http://www.sql-server-performance.com/sql_server_log_shipping.asp
"PromisedOyster" <PromisedOyster@.hotmail.com> wrote in message
news:1174892030.962292.33520@.p77g2000hsh.googlegroups.com...
>I am trying to implement a manual log shipping method in SQL server
> 2000 (standard edition) but I cannot seem to get the transaction logs
> applied. There is a strong chance that I might be doing something
> basic wrong. The solution involves two jobs setup in Enterprise
> Manager and two stored procedures.
> If I do the following:
> (a) Database backup as per job (1)
> (b) Change the database (via Query Analyser)
> (c) Restore logs as per job (2)
> I was hoping that the change in the source database would get
> refelected in the DR database but to no avail? There are no errors,
> just no change in the DR database.
>
> I have two jobs setup in Enterprise Manager:
> (1) Database Backup
> Checkpoint
> backup log Suppliers with truncate_only
> backup database Suppliers to disk = '\\drsql\g$\DRSuppliers.BAK' with
> init
> exec DRSQL.master.dbo.restore_icps_database_backups
> (2) Restore logs
> backup log suppliers to disk='\\drsql\g$\DRSuppliers_log2.LDF' with
> init, no_truncate -- I am not convinced that this step is right'
> Note the difference in log file name. If it is the same, then I get
> errors.
> exec DRSQL.master.dbo.restore_icps_database_logs
> The two procs are as follows:
> CREATE PROCEDURE dbo.restore_icps_database_backups AS
> restore database Suppliers
> from disk = 'G:\DRSuppliers.bak'
> with
> replace
> ,dbo_only
> ,standby = 'G:\DRSuppliers_log.ldf'
> ,move 'Suppliers_data' to 'E:\SQLDATA\MSSQL\Data\Suppliers_Data.mdf'
> ,move 'Suppliers_Log' to 'F:\SQLDATA\MSSQL\data\Suppiers_Log.ldf'
> GO
>
> CREATE PROCEDURE dbo.restore_icps_database_logs AS
> restore log Suppliers
> from disk = 'G:\DRSuppliers.bak'
> with
> standby = 'G:\DRSuppliers_log.ldf'
> GO
>|||On Mar 26, 5:50 pm, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Hihttp://www.sql-server-performance.com/sql_server_log_shipping.asp
> "PromisedOyster" <PromisedOys...@.hotmail.com> wrote in message
> news:1174892030.962292.33520@.p77g2000hsh.googlegroups.com...
>
> >I am trying to implement a manual log shipping method in SQL server
> > 2000 (standard edition) but I cannot seem to get the transaction logs
> > applied. There is a strong chance that I might be doing something
> > basic wrong. The solution involves two jobs setup in Enterprise
> > Manager and two stored procedures.
> > If I do the following:
> > (a) Database backup as per job (1)
> > (b) Change the database (via Query Analyser)
> > (c) Restore logs as per job (2)
> > I was hoping that the change in the source database would get
> > refelected in the DR database but to no avail? There are no errors,
> > just no change in the DR database.
> > I have two jobs setup in Enterprise Manager:
> > (1) Database Backup
> > Checkpoint
> > backup log Suppliers with truncate_only
> > backup database Suppliers to disk = '\\drsql\g$\DRSuppliers.BAK' with
> > init
> > exec DRSQL.master.dbo.restore_icps_database_backups
> > (2) Restore logs
> > backup log suppliers to disk='\\drsql\g$\DRSuppliers_log2.LDF' with
> > init, no_truncate -- I am not convinced that this step is right'
> > Note the difference in log file name. If it is the same, then I get
> > errors.
> > exec DRSQL.master.dbo.restore_icps_database_logs
> > The two procs are as follows:
> > CREATE PROCEDURE dbo.restore_icps_database_backups AS
> > restore database Suppliers
> > from disk = 'G:\DRSuppliers.bak'
> > with
> > replace
> > ,dbo_only
> > ,standby = 'G:\DRSuppliers_log.ldf'
> > ,move 'Suppliers_data' to 'E:\SQLDATA\MSSQL\Data\Suppliers_Data.mdf'
> > ,move 'Suppliers_Log' to 'F:\SQLDATA\MSSQL\data\Suppiers_Log.ldf'
> > GO
> > CREATE PROCEDURE dbo.restore_icps_database_logs AS
> > restore log Suppliers
> > from disk = 'G:\DRSuppliers.bak'
> > with
> > standby = 'G:\DRSuppliers_log.ldf'
> > GO- Hide quoted text -
> - Show quoted text -
Hi
Thats the article I am using, but I think I am having problems with
the backup log stage. I think I may have sussed it out though.
I was not setting log backup device name properly in the proc/job|||Hi
Have you checked out
http://www.sql-server-performance.com/sql_server_log_shipping.asp which shows
the steps you need to do for this?
"PromisedOyster" wrote:
> I am trying to implement a manual log shipping method in SQL server
> 2000 (standard edition) but I cannot seem to get the transaction logs
> applied. There is a strong chance that I might be doing something
> basic wrong. The solution involves two jobs setup in Enterprise
> Manager and two stored procedures.
> If I do the following:
> (a) Database backup as per job (1)
> (b) Change the database (via Query Analyser)
> (c) Restore logs as per job (2)
If you have not backed up the log after b abd restored it, then it will not
be reflected on your restored database.
> I was hoping that the change in the source database would get
> refelected in the DR database but to no avail? There are no errors,
> just no change in the DR database.
>
John

Sunday, February 19, 2012

help with Insert SQL Query

i want to implement something like let say i have 2 table...customer table and order table...order table has a foreign key of customer table (maybe the customer_id)...is there any way that let say, i want to insert a particular customer_id in the customer table. Then, it will insert the particular customer_id in the order table also. I want to makeone statement query that can solve that situation?

Hello,

if you create the id yourself then you can insert it into the second table. With SQL Server you can send two queries in one command, separated by a;. But if you have the first table set up with an auto incrementing identity then you will first have to find out the id that the database has created for you. This can be done with the SCOPE_IDENTITY() function in SQL Server.

Good luck!

|||

i create the id yourself...thanx for your helpBig Smile...anyway, is there any other way? Because actually i have to add the id from 1st table to many other tables...maybe 5 6 tables...i think a lot of sql query i have to execute if i have to add so many ids from 1st table...

|||

Hi,

As far as I know, there is no other ways. Multiple SQL Statement can be wrapped in a single SqlCommand. However, these muliple statements have to be written manually. The SQL Server itself will not do this for you. In this case, you may need to write 5-6 queries and wrap them in one SqlCommand.

HTH.

|||

I think that you have to look on the structure of your database if you have to insert the same ID to multiple data tables. Other tables should have it as foreign key so it should be inserted only when you add new data to table linked to you main table, and in this case you have to get your ID and insert it together with record data. The best way to do this is stored procedure with included transaction if you need it.

If it is true that you create ID yourself maybe you can use identity column in your main table to do it automatically?

Thanks

JPazgier