|
hi
thanks for your response
IS there any way to optimize a stored procedure for quick data retrival..
please help me
thanks in advance..
i m pradip kishore
|
|
|
|
|
Pradip Kishore wrote: IS there any way to optimize a stored procedure for quick data retrival..
In short, you need to look at where bottlenecks are. Without having any idea how your database is set up, I can't really help.
Any queries you have in the stored proc, analyze it through query analyzer...
Paul
|
|
|
|
|
Pradip Kishore wrote: but when i pass the parameters from a vb.net page page,it z showing an error:{"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."}
The default CommandTimeout for an SqlCommand object is 30 seconds. If your query doesn't return a result set in that time, you get this error.
Either you have to optimize the stored procedure and/or table structures (indexes!), and/or up the timeout in the SqlCommand object.
If it's taking 2.5 minutes to return a set, are you sure that this is as fast as your query can execute?
|
|
|
|
|
Hi
thanks for your response..
but can you show me some sample code or any links by which i can be able to do this..?
thanks in advance..
pradip kishore
|
|
|
|
|
I already gave it to you. The CommandTimeout property of your SqlCommand objects you created!
As far as optimization goes. That's done with experience and trial and error. There is no code that will just "do it for you". You have to understand precisely how SQL Server works, how Indexes work and why. What are the consequences of using them and overusing them. And on and on and on...
|
|
|
|
|
We have a table which is a self referencing. The childs may go up to any level.
For eg: PID SubPID
1 3
3 4
We are using cursors to get the ProjectIDs and loop through to 'n' level. Is there any optimized way to improve the performance or is there any keyword like connect by prior as in Oracle
Thanks,
K.P.Kannan
|
|
|
|
|
|
Thanks. The link was quiet useful. I am trying to implement that
|
|
|
|
|
Hello everyone,
Lately i'm working on a SSIS Package that downloads some data from one database to anohter.
Their is one problem, when i run the package their is nothing wrong. When i try to put it in an job it fails. I've checked the logs but they don't give me some usefull information, the only thin that i've got is: Job failed at step 'my package name'.
I've also checked the permissions, their good (i think) and when i do a connection test in visual studio their is nothing wrong with both connections. When i execute the package in visual studio, nothing fails and the data is pumped over.
Does anyone have an idea about this?
Stef
|
|
|
|
|
Hi,
I want to open SQL Enterprise Manager from RUN command in Start Menu. I can open it by creating short cut and then after giving a name i can put it in system32 folder. But i want to know that is there any command to open it from from Run command.
Can some one tell the command to open it.?
Thank you.
Ahmed
|
|
|
|
|
If you can create a shortcut, then do Right Click -> Properties on the shortcut icon. Inside the target textbox you'll find the path to the exe file.
|
|
|
|
|
Hi,
Thank you for replying. I can do it. But i want to know is there any shortcut command for that. like we have inetmgr to open IIS.
Please help me.
Thank you,
Regards,
Ahmed
|
|
|
|
|
type the exe name in run like ssmsee.exe
|
|
|
|
|
how to prepare and execute any statemaent in sqlserver2000
i tried following but it is not working
DECLARE @mak varchar(50)
set @mak ='select * from authors'
EXEC SQL PREPARE @mak;
EXEC SQL EXECUTE @mak;
***but in mysql my this statement is working fine*******
set @sql='select * from brands'
prepare stmt from @sql;
execute stmt;
-- modified at 3:12 Monday 21st May, 2007
|
|
|
|
|
Spot the difference:
kuwl_mark wrote: set @mak ='makarand * from employee'
kuwl_mark wrote: set @sql='select * from brands'
In your SQL Server version you don't seem to have written a SELECT in your statement.
|
|
|
|
|
DECLARE @mak varchar(50)
set @mak ='select * from authors'
EXEC SQL PREPARE @mak;
EXEC SQL EXECUTE @mak;
I am using database as pubs but still it is not working
|
|
|
|
|
|
Hi
Prepared sql statements must be give within opening and closing brackets as given below:
DECLARE @mak varchar(50)<br />
set @mak ='select * from categories'<br />
exec (@mak)
Harini
|
|
|
|
|
|
Hello everyone,
I have a program which connects to an internet database(MySQL) using MyODBC. I am using the following code to write to "imagestorage" table in the "test" database. When I run this I get an Error message saying:
ERROR [HY000] [MySQL][MyODBC 5.00.11][MySQL] 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FileName, NULL,
ConStr = "DRIVER={MySQL Connector/ODBC v5};SERVER= XXXXXXXX; PORT=3306; DATABASE=; UID=XXXXXXX; PWD= XXXXXXXX; OPTION=3"; <br />
OdbcCon = new System.Data.Odbc.OdbcConnection(ConStr);<br />
OdbcCon.Open();<br />
<br />
OdbcCom = new System.Data.Odbc.OdbcCommand("USE test;", OdbcCon);<br />
OdbcCom.ExecuteNonQuery();<br />
<br />
OdbcCom.CommandText = "INSERT INTO imagestorage VALUES(NULL, ?FileName, NULL, NULL);";<br />
OdbcCom.Parameters.Clear();<br />
OdbcCom.Prepare();<br />
<br />
OdbcCom.Parameters.Add("?FileName", System.Data.Odbc.OdbcType.VarChar);<br />
OdbcCom.Parameters["?FileName"].Value = "Khoramdin";<br />
<br />
OdbcCom.ExecuteNonQuery();
Can someone be kind enough to tell me where I am going wrong?
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
You SQL statement doesn't specify the columns you want to update. You provide the values, but the statement does know which values go in which colums.
INSERT INTO table (columnName1, columnName2, columnName3, ...) VALUES (value1, value2, value3, ...)
|
|
|
|
|
How can i export data from sql table to a text file
|
|
|
|
|
All you have to do is open the table, read each record one at a time, then write each field value out in the format you want. It's usually done by seperating the fields with commas and enclsing strings in quote marks, or some other delimitter.
|
|
|
|
|
i have a listbox and when i select a item in the listbox i want this selected item to get information from the db and then show this data (that is related to the selected item) shown in seperated textboxes.
an example:
i choose a building from the listbox, when i select a building i want to retrieve the name of the building, adress, city and so on.. to be shown in their textboxes that is read only.
How can i do this? i have the db ready but dont know how to retrieve the data that is related to the selected item to be shown in their txtBoxes.
I really hope that someone could help me with this, i use C# as language and ms sql server.
|
|
|
|
|
Hi,
I have an access data base stored on a website, I would like to connect it via a windows application in C#. is it possible?
I tried the following without success:
this.oleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"http:\\www.website.com\\DB\\DataBase.mdb \" ";
Thanks
|
|
|
|