Monday, July 29, 2013

[SQL Server 2008 issues] Pooling:more than one connection to a database

[SQL Server 2008 issues] Pooling:more than one connection to a database


Pooling:more than one connection to a database

Posted: 28 Jul 2013 06:38 PM PDT

I have a doubt that whether Pooling actually works.I used below query to check the connection to the database from different pc.[code="sql"]SELECT hostname,p.status,[program_name],loginame,nameFROM Master..sysprocesses as p join master.dbo.sysdatabases as d on p.dbID = d.dbIDWHERE p.ecid=0 and p.hostname<>'' order by name[/code]In the output i saw more than one connection from a pc to the same database.So i got doubt about this.In my vb.net application i open connection only once.

Populate object hierarchy in an additional column

Posted: 28 Jul 2013 05:14 PM PDT

Hi,In my database I have a table "ObjectHierarchy" having following columns.ObjectID [Primary Key]ObjectNameParentObjectID [ObjectID from the same table]Now in this table what I want it to have an ObjectPath column that will show the hierarchy of a particular object.For egampleObjectID ObjectName ParentObjectID ObjectPath1 AAA -1 2 BBB -13 CCC 1 AAA4 DDD 3 AAA/CCC5 EEE 4 AAA/CCC/DDD6 FFF 2 BBBObjectPath column should contain the path of the object but not the actual objectname. I want to add a fucntion so that when I run the queryALTER TABLE ObjectHierarchy ADD ObjectPath AS FN_ObjectPath(ObjectID)this will add a column with the respective object path. How that function should be?Regards,Girish

SSIS package works in BIDS Fails in In SQL AGent and Store

Posted: 28 Jul 2013 04:27 AM PDT

I have a simple SSIS package that uses and odbc connection using a dl4 driver connection. It works fine in Bids but when I try to execute through a job or through the ssis store it fails. I get the following error:Code: 0xC0047062 Source: Data Flow Task 1 Source - Query [1] Description: Microsoft.SqlServer.Dts.Runtime.DtsCouldNotCreateManagedConnectionException: Could not create a managed connection manager. at Microsoft.SqlServer.Dts.Runtime.ManagedHelper.GetManagedConnection(String assemblyQualifiedName, String connStr, Object transaction) at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnectionManager100.AcquireConnection(Object pTransaction) at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.AcquireConnections(Object transaction) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostAcquireConnections(IDTSManagedComponentWrapper100 wrapper, Object transaction) End Error Error: 2013-07-28 09:56:03.77 Code: 0xC0047017 Source: Data Flow Task 1 SSIS.Pipeline Description: component "Source - Query" (1) failed validation and returned error code 0x80131500. End Error Error: 2013-07-28 09:56:03.77 Code: 0xC004700C Source: Data Flow Task 1 SSIS.Pipeline Description: One or more component failed validation. End Error Error: 2013-07-28 09:56:03.77 Code: 0xC0024107 Source: Data Flow Task 1 Description: There were errors during task validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 9:56:03 AM Finished: 9:56:03 AM Elapsed: 0.235 seconds. The package execution failed. The step failed.Can anyone help?

general

Posted: 23 Jun 2013 11:39 PM PDT

i have table with name orders and field as order_number,order_amt,order_date,order_customer,order_salepersoni want to write a query that selects all orders save those with zeroes or NULLs in the order_amt field.how can i do this?

capture web application username and other session info in sql trigger

Posted: 27 Jul 2013 09:36 PM PDT

Hi,I have created a trigger to audit changes to table rows from my web application. My web application is using a single db user to do updates to the database. However, many different users can log in to the website and do the updates and inserts. Therefore, the db user will always be same but web users will be differentI want to have some way to capture the logged in user to the website who is making the changes to the rows so that I can audit the changes along with the web user that is making the changes.Can someone please guide me how can I capture the web session in my sql trigger so that I know who is making the changes. Can I configure the web.config file so that the session info is also passed on to the sql server trigger or if there is some other way, please let me knowRegardsArif

creating a copy of a database for testing on

Posted: 28 Jul 2013 12:47 AM PDT

Problem. I need to make available a copy of one of the databases in our dev environment everyday to a software tester. The database will need to have the ability to be written to not just read - I was going to go down the road of a daily snapshot but that would be read only as i understand it ?In effect the software tester needs to be able to do whatever needs to be done in order to test things, be it add tables, delete tables and then just delete the database at the end of the day then start again the next day with another up to date copy from the dev environment. Can anybody advise of the best method(s) for this ?

Need Urgent help to get the Final Approver name in the list

Posted: 28 Jul 2013 01:08 AM PDT

Dear friends,i need an urgent help on a deadline task-I have a table- source "Pending" which has approver columns as -The 'Pending' Source table has columns for each requisition as -Req# Approver 1 Name,Req# Approver 1 Decision,Req# Approver 1 Decision Date,Req# Approver 1 ID,Req# Approver 2 Name,Req# Approver 2 Decision,Req# Approver 2 Decision Date,Req# Approver2 ID...----------------------my requirement is that:-i need to Get the name of last approver in req approval path. E.g., say the following are listed as approvers in this order: Caldwell, Walter; Rondini, Joe; Zuccaro, Leo. This field should show Zuccaro, Leo. and to do this In pending tables, it would be the last one before a null, in the Req# Approver # Name field. hence i needed help with the code on how to grab the last approver before a null, in the Req# Approver # Name field. thanksDJ

No comments:

Post a Comment

Search This Blog