Friday, March 30, 2012
Is there a repository for expressions
I was wondering if there was the facility to save expressions that
you would use in multiple reports. The ones we're looking at
specifically
create a value in a detail line by doing arithmetic on other detail
column values.The simplest way is to write a simple assembly and put the logic there.
Then you reference this assemby from your reports and use a
=myAssembly.myFunction(param1, param2) type syntax in the textbox.
If your assembly only performs calculations or other simple procedures,
you don't have to worry about code access security. There is
docmentation on this in MSDN.
jensisql
Wednesday, March 28, 2012
Is there a Query Analyzer
multiple servers? Without having to manually connect to each server?
If so, can anyone provide a link for it.
Thanks"it depends"
I might be able to write you a custom program for free to do it if you give me
more details.
There's ways to send a query to an sql server via script; but it's not pretty.
Tell us more about what you need to do; or email me off the NG if you want a
mini app
-j
On 20 Feb 2007 14:04:44 -0800, click37@.gmail.com wrote:
Quote:
Originally Posted by
>in the market place that will run a query on multiple DBs across
>multiple servers? Without having to manually connect to each server?
>If so, can anyone provide a link for it.
>
>Thanks
-- AntiSpam/harvest --
Remove X's to send email to me.|||Say I want to run this script:
Select * from company
I need it to run on DB1, DB2, DB3, DB4 and DB5
DB1 and DB2 are located on Server1
DB3 is on Server2
DB4 and DB5 is on Server3
The long and manual way I would have to do it, is copy the SQL smt.
Connect to Server1, paste and run it on DB1, then DB2. Connect to
Server 2, run it on DB3 and so on.
Is there a way to configure the script that will allow me to run the
query once, and it'll give me the results from all the DBs I want it
to hit ?
Thanks for helping.
On Feb 20, 8:57 pm, Josh Assing <Xjo...@.jAssing.comwrote:
Quote:
Originally Posted by
"it depends"
>
I might be able to write you a custom program for free to do it if you give me
more details.
>
There'sways to send aqueryto an sql server via script; but it's not pretty.
>
Tell us more about what you need to do; or email me off the NG if you want a
mini app
>
-j
>
On 20 Feb 2007 14:04:44 -0800, clic...@.gmail.com wrote:
>
Quote:
Originally Posted by
in the market place that will run aqueryon multiple DBs across
multiple servers? Without having to manually connect to each server?
If so, can anyone provide a link for it.
>
Quote:
Originally Posted by
Thanks
>
-- AntiSpam/harvest --
Remove X's to send email to me.|||On 22.02.2007 16:04, click37@.gmail.com wrote:
Quote:
Originally Posted by
Say I want to run this script:
>
Select * from company
>
I need it to run on DB1, DB2, DB3, DB4 and DB5
>
DB1 and DB2 are located on Server1
DB3 is on Server2
DB4 and DB5 is on Server3
>
The long and manual way I would have to do it, is copy the SQL smt.
Connect to Server1, paste and run it on DB1, then DB2. Connect to
Server 2, run it on DB3 and so on.
>
Is there a way to configure the script that will allow me to run the
query once, and it'll give me the results from all the DBs I want it
to hit ?
Whatever you do, you will have to at least once authenticate to each
machine. With SQL 2005 Management Studio you can store credentials - or
you use Windows authentication. Then no additional login is required.
HTH
robert
Wednesday, March 21, 2012
Is the problem multiple cubes?
in a new folder.
I created a database source that connects to AS. I created a report
through the wizard, and when it finished I saved everything, and it
worked correctly from the preview. Everything looked fine.
But when I clicked on the data tab, everything in the designer was
wiped clean. This has happened a number of times.
Could this be because there are two cubes in the database? I'm using
the second one alphabetically, and when I go to the data tab the first
one is displayed as a default.
TIA,
JimNever mind. It's a known issue.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=174156&SiteID=1
Monday, March 19, 2012
Is SQl Service broker what I need?
Hi,
I am looking at the Service Broker as a way to notify multiple clients that there has been data changed on a table in the shared database. These clients may or may not be online. When there is a change, the notification should fire off a query to refresh the clients local cache. Is this a situation where Service Broker would help me? Can multiple clients recieve the notification at different times ( some recieve while online, some recieve when they come back online)? Any help on this would be appreciated. It seems from what I read that the messages are pulled off the queue when a notification has taken place. Is this correct? If so, can I set it to behave differently?
Thanks,
-paul
Service Broker could be used here, but I don't know if you necessarily need to use it here. It sounds like you just need to update some data for a client(s) to have available when they need it. In this case, just write some stored procedures or use a job to to make sure the data gets updated. The benefits of Service Broker is that it allows you to perform actions asynchronously and reliably, which leads to allowing you to build really scalable applications. Have you looked at some type of merge or transactional replication as an option for what you are doing? How many clients are you trying to alert? Why are you updating a local set of data for them rather than having them connect to the central database?
tim
Friday, March 9, 2012
Is running SQL on VMWare supported by MS ?
dev/test environments can be hosted on one single server
But is it supported when used in production ? Will MS support it ?I would think that poor performance would be enough to deter anyone
from using VMWare or VirtualPC for anything but demos or dev
environments. From what I remember, MS will support the individual
products, but not the system as a whole - not much different from their
regular support IMO.
To really run well made virtual environment, you'll spend as much as
you would on separete servers and get about 1/3 of the performance.
Hassan wrote:
> I know virtualization helps when ones cutting costs so that multiple
> dev/test environments can be hosted on one single server
> But is it supported when used in production ? Will MS support it ?|||Hassan wrote:
> I know virtualization helps when ones cutting costs so that multiple
> dev/test environments can be hosted on one single server
> But is it supported when used in production ? Will MS support it ?
Yes. Your virtual servers must be properly licensed of course. See:
http://www.microsoft.com/sql/howtobuy/virtualization.mspx
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Hi
Fully supported by Microsoft
:
VMWare, No.
Microsoft Virtual PC and Virtual Server, Yes.
http://www.support.microsoft.com/kb/897615/
http://www.support.microsoft.com/kb/897613
http://www.support.microsoft.com/kb/897614
--
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1149512310.263776.52780@.f6g2000cwb.googlegroups.com...
> Hassan wrote:
>> I know virtualization helps when ones cutting costs so that multiple
>> dev/test environments can be hosted on one single server
>> But is it supported when used in production ? Will MS support it ?
> Yes. Your virtual servers must be properly licensed of course. See:
> http://www.microsoft.com/sql/howtobuy/virtualization.mspx
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
>|||Michael Epprecht [MSFT] wrote:
> Hi
> Fully supported by Microsoft
> :
> VMWare, No.
> Microsoft Virtual PC and Virtual Server, Yes.
> http://www.support.microsoft.com/kb/897615/
> http://www.support.microsoft.com/kb/897613
> http://www.support.microsoft.com/kb/897614
> --
> Mike
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
Thanks for the clarification. I hadn't seen that before.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
Monday, February 20, 2012
Is multiple action trigger possible
Hello
Is it possible to create a trigger with multiple actions?
I would like to create a trigger with INSERT, DELETE, UPDATE funtions but I have not been above to find a clear syntax example
Below I have created a statement of my trigger. Could somebody please confirm if the syntac in this multiple action trigger is ok.multple actions on a single trigger
Is this syntax correct?
CREATE TRIGGER [dbo].[trig_AddDomCatA]
ON DomainNames
For INSERT, DELETE, UPDATE
AS
INSERT INTO Domain_CatA (DomainName)
SELECT DomainName FROM INSERTED
AS
DELETE FROM Domain_CatA (DomainName)
SELECT DomainName FROM DELETED
AS
UPDATE INTO Domain_CatA (DomainName)
SELECT DomainName FROM UPDATED
Thanks
Lynn
Why do you need triggers?
Is it possible to add the required actions to the insert, update and delete stored procedures?
|||you have to split the insert/update from the delete trigger.
CREATE TRIGGER [dbo].[trig_AddDomCatA]
ON DomainNames
For INSERT, UPDATE
AS
INSERT INTO Domain_CatA (DomainName)
SELECT DomainName FROM INSERTED
GO
CREATE TRIGGER [dbo].[trig_AddDomCatA]
ON DomainNames
For DELETE
AS
DELETE FROM Domain_CatA (DomainName)
SELECT DomainName FROM DELETED
Hello TATWORTH
Thanks for the reply.
Yes it is possible to use, insert, update and delete stored procedures, which is the current method I am using. However, as I have the same list of data on 26 categories tabes from A-Z, I thought it would be a more speedier and efficient method instead of using stored procedures.
Is there a good reason not to use triggers instead of stored procedures?
Thanks
Lynn
|||Hello khtan
Thanks for the reply and detailed explanation.
Lynn
|||>>Is there a good reason not to use triggers instead of stored procedures?
Stored procedures will give you better and more consistent performance. It has been known for triggers that function well during development, bring a production system to its knees. Stored procedures are better for another reason - all the components of an action is brought into one place thus they can be designed as a whole, reviewed as a whole and maintained as a whole.
I fully realise that many DBAs get excellant milage out of triggers, however in 10+ years of designing some 20 SQL server database, I have used triggers once and that was because I though a fellow DBA might enter some data by hand.
Hello TATWORTH
Thanks for the information. I thought that a trigger would save me the task of entering the same stored procedure 26 times. Now repetitive stored procedures do not seem like too much of a chore.
Thanks
|||Just open up all the s.p. in SQL Management Studio and copy and paste ... copy and paste .. copy and paste!