Sunday, March 25, 2012
connexion, processes ...
the SQL command related to the processes ?
What are system views/tables, scripts used to monitor and obtain more information
about processes, connexions... ?Straight from the Holy Book (SQL books Online)
----------------------
DECLARE @.Handle binary(20)
SELECT @.Handle = sql_handle FROM sysprocesses WHERE spid = 52
SELECT * FROM ::fn_get_sql(@.Handle)
----------------------|||Thanks for the reply, but the code is not working in my server (and mya be this is due to SP...). By the way, how to find the last SP applied to sql server ?
DBCC INPUTBUFFER(80)
EventType Parameters EventInfo
--- ---- ---------
RPC Event 0 DVSPAYS_CODELIB_DVSPRINC_S;1
DECLARE @.Handle binary(20)
SELECT @.Handle = sql_handle FROM sysprocesses WHERE spid = 80
SELECT * FROM ::fn_get_sql(@.Handle)
dbid objectid number encrypted text
-- ---- -- --- ----------------------------------------------------------------------------
No row(s)sqlsql
Connet to SQL using VB6 forms via Internet
We have one system that is developed using Visual Basic 6. The system connects to MS SQL database using ODBC configuration. We have another branch that has to access the same database. We've got an Internet connection with a speed of 2MB, as we tried to connect using Virtual Private Network (VPN), but the problem we faced that the system became very slow over the Internet, its taking half an hour to open one form. Is there any way to connect to the database and via the Internet using VB6 Forms? Or its not useful as its not a web based tool.
Hi,it′s hard for us to tell where the bottleneck in your application design is. But as of your description the application is not designed for slow connections to the database. To find out exactly what your problem is, you will either have to through the code to see which data is requested from the server, or let the profiler runn to see where the latency is based on.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
Connectivity with sql server
a network system to sql server,the time taken is very high.
I would like to know how to make faster updation of record
to my sql database.
And what role does ODBC play here.and is there any log
file or temporary files created at server end,if i would
like to know the path.and does it got to do anything with
the record updation speed.
I would be a great help for me...!!What type of update are you doing? Is this a one-time thing or a
continuously needed update? What is your table structure, what does your
update statement look like? Do you have indexes on the table? What recovery
mode are you running the database in? How many users are connected to the
server when you run this update? Are there any locking/blocking issues? Lots
of questions, answer them and I'm sure someone can help.
Ray Higdon MCSE, MCDBA, CCNA
--
"ssd" <ssd_myworld@.yahoo.com.sg> wrote in message
news:0e8e01c3deff$e7afc9f0$a601280a@.phx.gbl...
quote:|||I got one sql server connected to 5 workstations,A small
> The problem what iam facing,is while updating records from
> a network system to sql server,the time taken is very high.
> I would like to know how to make faster updation of record
> to my sql database.
> And what role does ODBC play here.and is there any log
> file or temporary files created at server end,if i would
> like to know the path.and does it got to do anything with
> the record updation speed.
> I would be a great help for me...!!
vb application which updates 10-15 fileds,submission of
each record is taking 35-40secs,we will be updating 50
records at a time span of 30-45 minutes.
Here the time taken to update each record is pain taking.
How can i over come this problem inorder to submit my
records faster.
And ODBC got to do anything at workstation end,i mean we
got to configure ODBC at workstation.sqlsql
Thursday, March 8, 2012
Connection to SQL
Exception Details: System.Data.OleDb.OleDbException: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. Invalid connection string attribute
This is the string can anyone help?
Dim DBConn as OleDbConnection
Dim DBCommand As OleDbDataAdapter
Dim DSLogin as New DataSet
DBConn = New OleDbConnection("Provider=sqloledb;" _
& "server=localhost;" _
& "InitialCatalog=BOOKSTORE;" _
& "User Id=sa;" _
& "Password=Pswd:")
DBCommand = New OleDbDataAdapter _
("Select StudentID from " _
& "Students Where " _
& "StudentName = '" & txtStudentName.Text _
& "' and Password = '" & txtPassword.Text _
& "'", DBConn)
DBCommand.Fill(DSLogin, _
"StudentInfo")
If DSLogin.Tables("StudentInfo"). _
Rows.Count = 0 Then
lblMessage.Text = "The student name and password " _
& "were not found. Please try again."
Else
Session("StudentID") = DSLogin.Tables("StudentInfo"). _
Rows(0).Item("StudentID")
Session("StudentName") = txtStudentName.Text
Response.Redirect("./home_room.aspx")
End IfAre you using Mixed mode or windows authentication for sql Server?
Also, I thoght you needed to open the connection first, not totally sure.
Friday, February 24, 2012
Connection string from outside
Hi there!!
I want to make a package and pass connection string from outside say through .ini file, so that I can put package on any system and use some external source to pass connection string.
How do we do this in SSIS?
Rahul Kumar, Software Engineer, India
Hi,
Package Configurations in SSIS are used for the same purpose that you are looking for. Package config can be used to pass on the values to the package at run time. For more details, please check http://msdn2.microsoft.com/en-us/library/ms141682.aspx
Let me know if this solves your issue.
Thanks,
S Suresh
|||Hi Suresh
Yeah this is fine,we can assign configuration settings but still I am scratching my head how to change connection string in connection manager
|||If you define a configuration, this is held as part of the package definition. In yoru case you would define the configuration such that the property value to be set is the ConnectionString of the specified connection.
When the package loads the config is processed, so your new connection string is read for the specified location and applied. That loaded instance of the package will have the new connection string on the connection manager.
Still got an itch? If so can you explain why you do not think thsi solves the issue?
|||When you go through the Package Configurations Wizard choose the ConnectionString property of the ConnectionManager you want to configure. At runtime it will try and configure that property for you. You don't have to manually set it.Sunday, February 19, 2012
Connection String
public class Class1
{
public string sConType = System.Configuration.ConfigurationManager.AppSettings["conType"].ToString();
public string server = System.Configuration.ConfigurationManager.AppSettings["server"].ToString();
public string UID = System.Configuration.ConfigurationManager.AppSettings["UID"].ToString();
public string PWD = System.Configuration.ConfigurationManager.AppSettings["PWD"].ToString();
public string db = System.Configuration.ConfigurationManager.AppSettings["DB"].ToString();
private string sConStr;
.....
public Class1()
{
try
{
this.sConStr = "Server=" + this.server + ";Database=" + this.db + ";UID=" + this.UID + ";PWD=" + this.PWD + ";";
}
catch
{ }
}
.....
public void OpenConnection()
{
Class1 gr = new Class1();
conn = gr.CreateConnection();
conn.Open(); //ERROR
i'm getting the connection string from web.config file.i checked it with breakpoints.but it isnt working.The error message is "The ConnectionString property has not been initialized."
Where's my mistake?
Depending on which data provider driver you are using, the keywords in the connection string changes.
The keywords that you have specified are for use with the "MSDASQL" provider. I believe it is more common to use the "SQLOLEDB" provider. If you still prefer using the "MSDASQL" provider, you may need to set "Provider" property on the connection object. Please refer to the article below on MSDN for details.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adosql/adoprg01_0ahx.asp
HTH,
Jimmy
Tuesday, February 14, 2012
Connection String
using System.Data.OleDb;
OleDbConnection conn = new OleDbConnection("Provider=SqlOleDb;Data Source=BLOOD;Initial Catalog=Test;");
//Tried Above as ...;Initial Catalog= Test")
conn.Open();You need to install the database engine software (SQL Server, based on your connection string), and properly configure the server and the database before you can connect to them.
Once you get your server setup you may get error messages. Those would help us a lot in futher diagnosing your problem(s)!
-PatP
Friday, February 10, 2012
Connection problem with database and calendar
imports system.data
Private schedule As New DataView()
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
schedule = CType(srcSchedule.Select(DataSourceSelectArguments.Empty), DataView)
schedule.Sort = "entryDate"
End Sub
///////////////////////
whenever i run the above code an error message comes up with the following message:
Object reference not set to an instance of an object.
and it highlights the bold message mention in the code.
I wanted this code to highlight the dates in the calendar that have events on them.
Can you please help. thank you very much in advance.
Hi
srcSchedule might be null when program run into the bold line.
You can debug that line to check out.
Hope it helps.
connection problem
Dear sir,
i have a problem with my sql server database that every time logged in the database on
my web server as login system , the error has occured .
The ERROR is
microsoft ole db ms sql server not logged as localhost/i_userlocalhost , so why this problem occurs.
i am watitng for your response.
thanking you,
saquib qureshi