|
Unfortunately you have to configure parallelism for the whole SQL Server. However you can configure parallel query so that it will not happen so often:
1. set cost threshold for parallelism for a higher value. For example if the value for this is 5, it means that if the operation is expected to take more than 5 seconds, parallelism shall be used. You can increase this value so that only 'long' operations use parallelism (say set theshold to 30 seconds or whatever is suitable).
2. don't let the database use all processors. If you have 4 processors, you can set max degree of parallelism to 2 which means that only 2 processors are used simultaneously. Value 0 means that all processors are used
To list your configuration use either Management studio or by T-SQL by configuring to see advanced options and then listing all option:
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure;
GO
Hope that this helps,
Mika
|
|
|
|
|
Thanks a mil,
I'll give it a bash and hopefully it sorts the problem
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
You're welcome
Mika
|
|
|
|
|
I am using SQL Server 2000 on back end and .Net C sharp on front end. Server is connected with more than 30 users.
On user’s computers there are different files having different formats like MS Word, Excel, Visio, PDF etc with more than 4 MB size.
I want to see these files through database, correct them and resend to users through database on LAN.
How Can I Do All This without sharing any directory?
Best Regards for your kind Help
|
|
|
|
|
hi
we are Talking about Different Storages, So why would you think SQL would help you to save word,excell documents.Firstly you must first understand what is a Database before you can start storing data on it.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
|
Hi,
I want to know whts Integral Accounting Enterprise?and why do we use Integral Accounting Enterprise?Am new to this topic,so any details regarding this topic will be helpful for my project..
Regards,
Priya
|
|
|
|
|
Try Google.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Has anyone managed to deploy an SSIS package using SQL server to store the configuration values.
I have created the package in VS and successfully run it. It is a basic ETL process.
I have 3 connections
SourceDB - connection is hard coded into the package
DestinationDB - connection is to come from the configuration DB
LoaderDB - Harcoded in the package supplies the configuration values.
Validation fails when trying to connect to the loaderdb - with invalid login credentials.
I found this article and got to the point where the package is actually looking for LoaderDB
http://www.dotnetjunkies.com/WebLog/appeng/archive/2006/05/30/indirectconfigpackagessis.aspx
When inspecting the package in Management Studio I noted that the connection manager does not have the password so I edited the connection string to include the password which still fails (tested the connection string from VS - no problems).
I cannot use XML config files as I need to expose the configs to the users for modification. Therefore storing them in SQL is the best solution, if I can get it to work.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Create a user defined variable to store the password. Build your connection string using an expression and extract the password from the UDV. And when you run your package, you can set the value for any user defined variable.
|
|
|
|
|
Thanks for the hint - i had it in front of me in the article but didn't put it together.
What a freakin nightmare, imagine having to put the connection string in clear in a bloody environment variable - is that a scream of anguish from my security person.....
It looks like the connection HAS to live in a variable. I had the idea that I could put the bits (server, UID and password) in the config table and have the package build the connection based on the config values, seems the package is ingnoring those and using the connection string in the deployment (no password).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I am trying to call one dll inside pl/sql, which I have prepared though vc++. The dll works fine when I call it from any other vc++ applciation and hence tested but it's not working in the pl/sql Although I tried to test my pl/sql procedure with some windows default dll calling them from the procedure, in that case it worked fine.
Can you please help me with any hint. I have not used lib file of my dll any where. Could this be the reason?
Thank you
With Regards
Neeraj Sinha
|
|
|
|
|
Disclaimer: I'm no expert on Oracle.
Generally, when you can't call a function in a DLL from another programming language, it's due to decorated function names, also called 'name-mangling'. The C++ compiler encodes the types of the function's parameters in the name it records in the DLL, because the linker and OS loader match functions by name only, there is no space for parameter types. The types are needed to support overloading.
If you open a Visual Studio command prompt (2003 and later; for VC6 open a command prompt and run C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat) and run dumpbin /exports on your DLL, you will probably see that the names start with a ? and end with @@ and a bunch of letters and @ symbols. That means they're decorated names.
To force undecorated names, the simplest thing to do is to tell the C++ compiler that you want C compatibility. You do this by adding extern "C" to the start of the function declaration.
You should also check which calling convention Oracle requires, to ensure that the stack is set up correctly for calling the function, and cleaned up correctly when it returns.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
Workflow in short:
- create the procedure in vc++
- remember to export the procedure explicitly using DLLEXPORT
- build the dll
- place it in oracle_home/bin folder
- connect to oracle
- create a library XYZ pointing dll using CREATE LIBRARY statement
- create PL/SQL front end using CREATE FUNCTION and defining EXTERNAL LIBRARY XYZ
For more information refer to Oracle Database Platform Guide
Hope this helps,
Mika
|
|
|
|
|
I have problems on quering or better numerating all items from a specified table.
Here are my tables (Third normal form):
MailTable: Id, Created, Subject
AddressTable: Id, Name
SenderTable: MailTableId, AddressTableId
RecipientTable: MailTableId, AddressTableId, State
Now i want to make a query to numerate alle senders and recipients for one mail.
My query:
select m.Id, m.Created, m.Subject, sender.Name, recipient.Name
from MailTable as m
join SenderTable as s on s.MailTableId = m.Id
join AddressTable as sender on sender.Id = s.AddressTableId
join RecipientTable as r on s.MailTableId = m.Id
join AddressTable as recipient on recipient.Id = r.AddressTableId
The result:
1 | 2008-01-01 | Test | sender1@domain.tld | recipient1@domain.tld
1 | 2008-01-01 | Test | sender1@domain.tld | recipient2@domain.tld
2 | 2008-01-02 | Test | sender3@domain.tld | recipient3@domain.tld
etc.
My target:
1 | 2008-01-01 | Test | sender1@domain.tld | recipient1@domain.tld,recipient2@domain.tld
2 | 2008-01-02 | Test | sender3@domain.tld | recipient3@domain.tld
How do I achive this, whithout using time-consuming queries?
The bad way is to lookup for every mail all recipients, but this is not the best way!
Should I compare all records and extract my desired information?
Please Help me. Thanks!
modified on Tuesday, July 22, 2008 5:09 AM
|
|
|
|
|
shouteye wrote: whithout using time-consuming queries?
You can't
You are attempting to concat multiple records into 1, it will take at least 2 queries to achieve this.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thank you!
It's a major problem, or my database design?
I've decided to use this but limiting to 100 records
select top(100) m.Id, m.Created, m.Subject,
(
SELECT ai.Name + ';' AS [text()]
FROM SenderTable as s
JOIN AddressTable AS at ON at.Id = s.AddressTableId
WHERE s.MailTableId = m.Id
FOR XML PATH('')
)
as senders,
(
SELECT ai.Name + ';' AS [text()]
FROM RecipientTable as r
JOIN AddressTable AS ai ON ai.Id = r.AddressTableId
WHERE r.MailTableId = m.Id
FOR XML PATH('')
)
AS recipients
FROM MailTable AS m
Is this method better as using cursors?
modified on Tuesday, July 22, 2008 8:24 AM
|
|
|
|
|
( You are using SQL2005, right? )
Try this:
;WITH RecipientsByMail (MailId, RecipientList) AS (
select mx.Id AS MailId ,
( select AddressTable.Name+','
from MailTable
join RecipientTable on RecipientTable.MailTableId = MailTable.Id
join AddressTable on AddressTable.Id = RecipientTable.AddressTableId
WHERE MailTable.Id = mx.Id
FOR XML PATH('')
) AS RecipientList
from MailTable as mx
)
select m.Id, m.Created, m.Subject, sender.Name, r.RecipientList
from MailTable as m
join SenderTable as s on s.MailTableId = m.Id
join AddressTable as sender on sender.Id = s.AddressTableId
join RecipientsByMail as r on r.MailId = m.Id ;
Please... SAVE my time by rating the posts that you read!
There are 10 kinds of people in the world: those who understand binary and those who don't.
|
|
|
|
|
Cute - you may be able to drop the xml, I often concat fields into CSV strings as variables, I had not thought of using a subselect. I will have to play with htis in the morning.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I wonder why everyone runs away from XML...
Let me know if you find a more elegant way.
Maybe you have also time to run some performance tests
Please... SAVE my time by rating the posts that you read!
There are 10 kinds of people in the world: those who understand binary and those who don't.
|
|
|
|
|
I don't object to xml - just the removal/simplification of any script.
I ran across an article using XML to pass recordsets into a function - what an excellent use of a technology. So for mae at least it is whatever does the job.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Nope - the idea I had didn't work, the only other way I could get at this was to use a function which is even uglier!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hii..i have sqldatabase from which the data is being displayed in gridview fields and i am performing edit delete operations using the link buttons.and finally i want to dispaly the record of a single row in color format but i am unable to do so.and gridview fields are boun ddata fields.plz help me out.
santosh
|
|
|
|
|
look into the oncellformat event. There are a number of articles here about formatting cells in a gridview.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
HI Frens,
Am using a user defined function which returns a Table.Meanwhile in the function am checking the condition with 2 if loops and inserting the error in to another tables table1 and table2, but after satisfying these 2 conditions, i will get final output table3,
as of now am getting only table1 irresepective of conditions status(Pass/Fail)
Is there any suggestable scenario?
Have a Nice Day Dudes
|
|
|
|