Tuesday, March 27, 2012
Change image properties at runtime
I'm using Reporting Services for SQL2K. My report will need to dynamically
call a custom assembly for each row in a dataset, and then show the image
file that the custom assembly creates. I was thinking of using an Image
control in the report and then changing the path to the image file at
runtime. But I can not figure out how to access the image1.Value property.
Any tips on this or perhaps an alternative solution?
TIA
JonasI found the answer, and it was very easy ;-)
When the control is selected in the Report Designer, it it possible to edit
the properties as usual. The property for Value can also use an Expression,
and voila, this can point to a variable which contains a dynamically created
path.
Brgds
Jonas
"Jonas" <Jonas@.nospam.pl> wrote in message
news:%23z53z3cHGHA.240@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I'm using Reporting Services for SQL2K. My report will need to dynamically
> call a custom assembly for each row in a dataset, and then show the image
> file that the custom assembly creates. I was thinking of using an Image
> control in the report and then changing the path to the image file at
> runtime. But I can not figure out how to access the image1.Value property.
> Any tips on this or perhaps an alternative solution?
> TIA
> Jonas
>
>
Sunday, March 25, 2012
Change Email Task Properties
HI,
How can I programmatically change the properties of Send Mail task using Script Task. I want to change the From, To and Attachment parameters of the Send Mail task.
If the Script Task can't do it, Is there any alternative to do?
Thanks
All those questions are answered here: http://blogs.conchango.com/jamiethomson/archive/2006/06/28/4156.aspx
-Jamie
Thursday, March 22, 2012
Change default database/log location
you can point out new default location for databases and logs. I want to do
just that, but have two questions:
1) Shall I just point out the partition, or do I have to create a folder
structure similar to the one SQL creates itself? (sqldata\MSSQL\ etc).
2) How do I go about to move one existing database from, for instance, C: to
E:? (Strangely, I can't find any documentation on this.)
[Windows Server 2003 (SP1); SQL 2000 (SP4).]
Looking forward to any help.
> 1) Shall I just point out the partition, or do I have to create a folder
> structure similar to the one SQL creates itself? (sqldata\MSSQL\ etc).
The only requirement is that the paths you specify must exist in order for
databases files to be created in the specified location (e.g. E:\DBDataFiles
or F:\DBLogFiles). These don't need to match the default SQL Server folder
structure.
> 2) How do I go about to move one existing database from, for instance, C:
> to
> E:? (Strangely, I can't find any documentation on this.)
There are 2 methods commonly used to do this. One is to detach the
databases, move the files and then attach the files from the new location.
The other is backup and then restore WITH MOVE. See
http://support.microsoft.com/default...b;en-us;314546 for more
information. Since the target is the same SQL instance, you don't need to
be concerned with different collations or orphaned users.
Hope this helps.
Dan Guzman
SQL Server MVP
"JSL" <JSL@.discussions.microsoft.com> wrote in message
news:0020C5C3-A2C4-4DD3-B5F9-8DA9492CDA88@.microsoft.com...
> There's a setting in properties for SQL server in Enterprise Manager where
> you can point out new default location for databases and logs. I want to
> do
> just that, but have two questions:
> 1) Shall I just point out the partition, or do I have to create a folder
> structure similar to the one SQL creates itself? (sqldata\MSSQL\ etc).
> 2) How do I go about to move one existing database from, for instance, C:
> to
> E:? (Strangely, I can't find any documentation on this.)
> [Windows Server 2003 (SP1); SQL 2000 (SP4).]
> Looking forward to any help.
|||Thank you very much, Dan, for your quick and detailed answer.
/JSL
"Dan Guzman" wrote:
> The only requirement is that the paths you specify must exist in order for
> databases files to be created in the specified location (e.g. E:\DBDataFiles
> or F:\DBLogFiles). These don't need to match the default SQL Server folder
> structure.
>
> There are 2 methods commonly used to do this. One is to detach the
> databases, move the files and then attach the files from the new location.
> The other is backup and then restore WITH MOVE. See
> http://support.microsoft.com/default...b;en-us;314546 for more
> information. Since the target is the same SQL instance, you don't need to
> be concerned with different collations or orphaned users.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "JSL" <JSL@.discussions.microsoft.com> wrote in message
> news:0020C5C3-A2C4-4DD3-B5F9-8DA9492CDA88@.microsoft.com...
>
>
Change default database/log location
you can point out new default location for databases and logs. I want to do
just that, but have two questions:
1) Shall I just point out the partition, or do I have to create a folder
structure similar to the one SQL creates itself? (sqldata\MSSQL\ etc).
2) How do I go about to move one existing database from, for instance, C: to
E:? (Strangely, I can't find any documentation on this.)
[Windows Server 2003 (SP1); SQL 2000 (SP4).]
Looking forward to any help.> 1) Shall I just point out the partition, or do I have to create a folder
> structure similar to the one SQL creates itself? (sqldata\MSSQL\ etc).
The only requirement is that the paths you specify must exist in order for
databases files to be created in the specified location (e.g. E:\DBDataFiles
or F:\DBLogFiles). These don't need to match the default SQL Server folder
structure.
> 2) How do I go about to move one existing database from, for instance, C:
> to
> E:? (Strangely, I can't find any documentation on this.)
There are 2 methods commonly used to do this. One is to detach the
databases, move the files and then attach the files from the new location.
The other is backup and then restore WITH MOVE. See
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546 for more
information. Since the target is the same SQL instance, you don't need to
be concerned with different collations or orphaned users.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"JSL" <JSL@.discussions.microsoft.com> wrote in message
news:0020C5C3-A2C4-4DD3-B5F9-8DA9492CDA88@.microsoft.com...
> There's a setting in properties for SQL server in Enterprise Manager where
> you can point out new default location for databases and logs. I want to
> do
> just that, but have two questions:
> 1) Shall I just point out the partition, or do I have to create a folder
> structure similar to the one SQL creates itself? (sqldata\MSSQL\ etc).
> 2) How do I go about to move one existing database from, for instance, C:
> to
> E:? (Strangely, I can't find any documentation on this.)
> [Windows Server 2003 (SP1); SQL 2000 (SP4).]
> Looking forward to any help.|||Thank you very much, Dan, for your quick and detailed answer.
/JSL
"Dan Guzman" wrote:
> > 1) Shall I just point out the partition, or do I have to create a folder
> > structure similar to the one SQL creates itself? (sqldata\MSSQL\ etc).
> The only requirement is that the paths you specify must exist in order for
> databases files to be created in the specified location (e.g. E:\DBDataFiles
> or F:\DBLogFiles). These don't need to match the default SQL Server folder
> structure.
> > 2) How do I go about to move one existing database from, for instance, C:
> > to
> > E:? (Strangely, I can't find any documentation on this.)
> There are 2 methods commonly used to do this. One is to detach the
> databases, move the files and then attach the files from the new location.
> The other is backup and then restore WITH MOVE. See
> http://support.microsoft.com/default.aspx?scid=kb;en-us;314546 for more
> information. Since the target is the same SQL instance, you don't need to
> be concerned with different collations or orphaned users.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "JSL" <JSL@.discussions.microsoft.com> wrote in message
> news:0020C5C3-A2C4-4DD3-B5F9-8DA9492CDA88@.microsoft.com...
> > There's a setting in properties for SQL server in Enterprise Manager where
> > you can point out new default location for databases and logs. I want to
> > do
> > just that, but have two questions:
> >
> > 1) Shall I just point out the partition, or do I have to create a folder
> > structure similar to the one SQL creates itself? (sqldata\MSSQL\ etc).
> >
> > 2) How do I go about to move one existing database from, for instance, C:
> > to
> > E:? (Strangely, I can't find any documentation on this.)
> >
> > [Windows Server 2003 (SP1); SQL 2000 (SP4).]
> >
> > Looking forward to any help.
>
>
Change default database/log location
you can point out new default location for databases and logs. I want to do
just that, but have two questions:
1) Shall I just point out the partition, or do I have to create a folder
structure similar to the one SQL creates itself? (sqldata\MSSQL\ etc).
2) How do I go about to move one existing database from, for instance, C: to
E:? (Strangely, I can't find any documentation on this.)
[Windows Server 2003 (SP1); SQL 2000 (SP4).]
Looking forward to any help.> 1) Shall I just point out the partition, or do I have to create a folder
> structure similar to the one SQL creates itself? (sqldata\MSSQL\ etc).
The only requirement is that the paths you specify must exist in order for
databases files to be created in the specified location (e.g. E:\DBDataFiles
or F:\DBLogFiles). These don't need to match the default SQL Server folder
structure.
> 2) How do I go about to move one existing database from, for instance, C:
> to
> E:? (Strangely, I can't find any documentation on this.)
There are 2 methods commonly used to do this. One is to detach the
databases, move the files and then attach the files from the new location.
The other is backup and then restore WITH MOVE. See
http://support.microsoft.com/defaul...kb;en-us;314546 for more
information. Since the target is the same SQL instance, you don't need to
be concerned with different collations or orphaned users.
Hope this helps.
Dan Guzman
SQL Server MVP
"JSL" <JSL@.discussions.microsoft.com> wrote in message
news:0020C5C3-A2C4-4DD3-B5F9-8DA9492CDA88@.microsoft.com...
> There's a setting in properties for SQL server in Enterprise Manager where
> you can point out new default location for databases and logs. I want to
> do
> just that, but have two questions:
> 1) Shall I just point out the partition, or do I have to create a folder
> structure similar to the one SQL creates itself? (sqldata\MSSQL\ etc).
> 2) How do I go about to move one existing database from, for instance, C:
> to
> E:? (Strangely, I can't find any documentation on this.)
> [Windows Server 2003 (SP1); SQL 2000 (SP4).]
> Looking forward to any help.|||Thank you very much, Dan, for your quick and detailed answer.
/JSL
"Dan Guzman" wrote:
> The only requirement is that the paths you specify must exist in order for
> databases files to be created in the specified location (e.g. E:\DBDataFil
es
> or F:\DBLogFiles). These don't need to match the default SQL Server folde
r
> structure.
>
> There are 2 methods commonly used to do this. One is to detach the
> databases, move the files and then attach the files from the new location.
> The other is backup and then restore WITH MOVE. See
> http://support.microsoft.com/defaul...kb;en-us;314546 for more
> information. Since the target is the same SQL instance, you don't need to
> be concerned with different collations or orphaned users.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "JSL" <JSL@.discussions.microsoft.com> wrote in message
> news:0020C5C3-A2C4-4DD3-B5F9-8DA9492CDA88@.microsoft.com...
>
>
Monday, March 19, 2012
change data files name and transaction log name after restore
I have SQL Server database. Server name is DBServer. I have database A
in this server. If i click properties, the data files name show
"A_Data" and the transaction log name show "A_Log". I backup database A
to C:\ABackup.
After that, i create database B. I want to restore database A to
database B. I choose "from device" and select the location to
C:\ABackup. But when i tried to restore, in the Original File Name
(tab Option) show "A_Data" and "A_Log". If i click OK to restore, the
data files name and transaction log name will change into A_Data and
A_Log.
What i want is that in my database B the name of data files and
transaction log not change after i do restore from database A.
Does anybody know how to do that?
Thanks before.On the Restore Database window select your file using 'From device'.
Go to Options. On 'Restore As' update the directory path and file name. You
can not change the logical name here, only the physical name.
Finish the Restore
If you are using SQL Server 2005
Select Database Properties, select Files tab
You can change the Logical Name here.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"afang" wrote:
> Hi All,
>
> I have SQL Server database. Server name is DBServer. I have database A
> in this server. If i click properties, the data files name show
> "A_Data" and the transaction log name show "A_Log". I backup database A
> to C:\ABackup.
> After that, i create database B. I want to restore database A to
> database B. I choose "from device" and select the location to
> C:\ABackup. But when i tried to restore, in the Original File Name
> (tab Option) show "A_Data" and "A_Log". If i click OK to restore, the
> data files name and transaction log name will change into A_Data and
> A_Log.
> What i want is that in my database B the name of data files and
> transaction log not change after i do restore from database A.
> Does anybody know how to do that?
> Thanks before.
>|||Hi
You can restore a database with a different name ,so there is no need to
create a new database prior to restore operation
"afang" <khokimfang@.gmail.com> wrote in message
news:1147053596.925983.99420@.j33g2000cwa.googlegroups.com...
> Hi All,
>
> I have SQL Server database. Server name is DBServer. I have database A
> in this server. If i click properties, the data files name show
> "A_Data" and the transaction log name show "A_Log". I backup database A
> to C:\ABackup.
> After that, i create database B. I want to restore database A to
> database B. I choose "from device" and select the location to
> C:\ABackup. But when i tried to restore, in the Original File Name
> (tab Option) show "A_Data" and "A_Log". If i click OK to restore, the
> data files name and transaction log name will change into A_Data and
> A_Log.
> What i want is that in my database B the name of data files and
> transaction log not change after i do restore from database A.
> Does anybody know how to do that?
> Thanks before.
>|||Thanks Ben, for your information
change data files name and transaction log name after restore
I have SQL Server database. Server name is DBServer. I have database A
in this server. If i click properties, the data files name show
"A_Data" and the transaction log name show "A_Log". I backup database A
to C:\ABackup.
After that, i create database B. I want to restore database A to
database B. I choose "from device" and select the location to
C:\ABackup. But when i tried to restore, in the Original File Name
(tab Option) show "A_Data" and "A_Log". If i click OK to restore, the
data files name and transaction log name will change into A_Data and
A_Log.
What i want is that in my database B the name of data files and
transaction log not change after i do restore from database A.
Does anybody know how to do that?
Thanks before.On the Restore Database window select your file using 'From device'.
Go to Options. On 'Restore As' update the directory path and file name. You
can not change the logical name here, only the physical name.
Finish the Restore
If you are using SQL Server 2005
Select Database Properties, select Files tab
You can change the Logical Name here.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"afang" wrote:
> Hi All,
>
> I have SQL Server database. Server name is DBServer. I have database A
> in this server. If i click properties, the data files name show
> "A_Data" and the transaction log name show "A_Log". I backup database A
> to C:\ABackup.
> After that, i create database B. I want to restore database A to
> database B. I choose "from device" and select the location to
> C:\ABackup. But when i tried to restore, in the Original File Name
> (tab Option) show "A_Data" and "A_Log". If i click OK to restore, the
> data files name and transaction log name will change into A_Data and
> A_Log.
> What i want is that in my database B the name of data files and
> transaction log not change after i do restore from database A.
> Does anybody know how to do that?
> Thanks before.
>|||Hi
You can restore a database with a different name ,so there is no need to
create a new database prior to restore operation
"afang" <khokimfang@.gmail.com> wrote in message
news:1147053596.925983.99420@.j33g2000cwa.googlegroups.com...
> Hi All,
>
> I have SQL Server database. Server name is DBServer. I have database A
> in this server. If i click properties, the data files name show
> "A_Data" and the transaction log name show "A_Log". I backup database A
> to C:\ABackup.
> After that, i create database B. I want to restore database A to
> database B. I choose "from device" and select the location to
> C:\ABackup. But when i tried to restore, in the Original File Name
> (tab Option) show "A_Data" and "A_Log". If i click OK to restore, the
> data files name and transaction log name will change into A_Data and
> A_Log.
> What i want is that in my database B the name of data files and
> transaction log not change after i do restore from database A.
> Does anybody know how to do that?
> Thanks before.
>|||Thanks Ben, for your information
Friday, February 24, 2012
Cell Orientation
How do i format the Header cells to be oriented by 90 degrees like in Excel. I tried the WRITING MODE under INTERNATIONAL in properties, and choose "tb-rl". But it gives top to bottom. Is there any way to get it bottom to top?
Is there any example to write Expression in Writing Mode property to display in 30 degrees?
Thanks.
Girija, did you ever find a solution to this? I need to do the same thing, rotate headers by 90 degrees.
Thanks.
|||Unfortunately, this is not supported in the current version of Reporting Services. Arbitrary text rotation is something we would like to add in a future release.Cell Orientation
How do i format the Header cells to be oriented by 90 degrees like in Excel. I tried the WRITING MODE under INTERNATIONAL in properties, and choose "tb-rl". But it gives top to bottom. Is there any way to get it bottom to top?
Is there any example to write Expression in Writing Mode property to display in 30 degrees?
Thanks.
Girija, did you ever find a solution to this? I need to do the same thing, rotate headers by 90 degrees.
Thanks.
|||Unfortunately, this is not supported in the current version of Reporting Services. Arbitrary text rotation is something we would like to add in a future release.