Hi I want to start studying process- based software. i don't know where to start . can you give me the name of the courses to take by their order for example Workflow - BPMN - ,... thanks
yousefshokati
Posts
-
BPMN question -
Increasing the session existing time in sql serverHi . I want to know how can i increase the session existence time in SQL server. I have a software that uses a connection to SQL server . when it remains idle for some minutes then the new session will be created to SQL server from the application side . This produces me me a big problem . Because i use the connection_Id for auditing the user . in my login table i have applicationID that refers to connection_Id in sys.dm_exec_connections . when the software authenticates the user , It updates the connection_ID in login table and through this column i can get my user's username in my triggers . here is the problem when my software becomes idle , then another connection_id is created and i can not trace my user because i can not reach my user in logins table this is my login table
CREATE TABLE [dbo].[Logins](
[LoginUser] [nvarchar](50) NOT NULL ,
[Password] [nvarchar](50) NOT NULL,
[IsDefaultPassword] [int] NULL,
[AppID] [uniqueidentifier] NULL,
CONSTRAINT [PK_Logins] PRIMARY KEY CLUSTERED
(
[LoginUser] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]and this is my authenticate procedure
CREATE PROCEDURE [dbo].[Authenticate] (@username nvarchar(30) , @password nvarchar(30))
AS
declare @Authenticated int
set @Authenticated = 0select @Authenticated = 1
from Logins l
where l.LoginUser =@username and l.Password =@passwordif @Authenticated = 1
begin;
declare @AppID uniqueidentifier
select @AppID=p.connection_id from sys.dm_exec_connections p
where p.session_id = @@SPID
update Logins
set AppID = @AppID
where Logins.LoginUser = @username and Logins.Password = @password
end;select @Authenticated ,@AppID
-
Can a SQL login have more than one userI am asking only that A SQL User (database -level security) must map to a login . It is very obvious .Now I am only asking you that can a login have more that one database-level user ? We know that a Login and a user are related with each other by SID Ok? Now i want to know that is it possible for a login , that can have nmore than one user ?
-
Can a SQL login have more than one userHello . I know that a SQL login is used to log into the server and SQL user is used to log to database but i want to know that is their a 1 to 1 correspondence between a SQL Login and SQL user or a login can have more than one SQL user that can be mapped to it. Thanks
-
I can not drop table after upgrading to sql 2008 r2 from sql 2005I did it but it gave me again the same error
-
I can not drop table after upgrading to sql 2008 r2 from sql 2005Hi. I had a database that was working very well in sql server 2005. I upgraded my SQL to SQL 2008 R2 . After upgrading , I wanted to drop one of my tables. But i could not. It gives this error No catalog entry found for partition ID 281474980577280 in database 5. The metadata is inconsistent. Run DBCC CHECKDB to check for a metadata corruption I don't know what to do
-
Can Not Resolve The collation ConflictHi I am receiving this error recently after i re-installed my windows OS in my project Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Arabic_CI_AS" in the equal to operation. I should add that this was working before re-instaling the windows and sql server
-
Two same foreign keys in the one table . is it possibleHi Is it possible to have 2 foreign keys that ae thesame in one table ?
Create table Product
(
productID int PK
)
Create table Category
(
CategoryID int PK ,
productID1 int fk references Product (productID) ,
productID2 int fk references Product (productID)
) -
How Can We Avoid Creatng Closed Pathes in our DesignHi And tanks for your answer . You say that When we design our database , we should design in a way that we do not have any closed path ? Am I right? But if we have 2 different relationship between 2 entities , then what should we do . Consider the following example : We have MembersTable Which represents the members of teams and we have TeamsTable That represents the Team Entity Now We have to relations between these 2 . The First relation is "Plays For" which means that "Member Plays for team A for example " and the second is "Captain Of" which stands for "Members x is captain of team A" . Now if we update one of these FK s that are in tables for creating the relationships then we will get an error , won't be?
-
How Can We Avoid Creatng Closed Pathes in our DesignHi . I have three entities that are related to each other . So these entities have relationships with each other but the problem here is that their relationships finally make a closed path . Would you please tell me what should i do in situations like this ? I do not know even this is about normalization or not? Entities :
Media ( MediaID , MediaName , ...,GroupID)
Articles (ArticleID , Title,... ,GroupID)
Groups (GroupID , GroupName ,... )Article_Media ( MediaID, ArticleID, ...)
thanks Give me the solution because in update we can not update the records
-
how to loop over results of a select statement ?I have a select query that returns a some rows . i want to send each of the rows in returned result to a function but i do not know how ? can you help me "Note that i do not want to use Cursor "
select PersonelCode , ...
from PersonnelTable
and the function Need the PersonelCode.For each row this function should be executed
Create Function MyFunction ( @PersonelCode )
begin
body of the function
end -
how to loop over results of a select statement ?I have a select query that returns a some rows . i want to send each of the rows in returned result to a function but i do not know how ? can you help me
select PersonelCode , ...
from PersonnelTable
and the function Need the PersonelCode.For each row this function should be executed
Create Function MyFunction ( @PersonelCode )
begin
body of the function
end -
Failed to open malformed assembly 'mscorlib' with HRESULT 0x80070008.Hi . I have written an assembly in which it has two user defined functions . In sql when i create the assemblies , it does not make any errors even when i create my first function again i do not have any errors but when i create the second function , the server computer has this error , the most intresting thing for me is that i have installed all of them in another computer and it worked but in my server it has this error can you help me ? the error is : " Failed to open malformed assembly 'mscorlib' with HRESULT 0x80070008. "
-
How to Call A web service inside SQL serverHi Thanks for your Guidance. I know all of them but thanks
-
How to Call A web service inside SQL serverHello . I have a web service which takes some parameters and inserts them in another database . I have my own database that has a table (Table_B) .Now I want to call my web service when a new record inserts to (Table_B) I know that i should use a trigger . All I want to do is calling a web service inside of my trigger . I don't know how to call it. Would you please help me Thanks . bye
-
can a trigger have parametersHi . thanks for your attention . The problem is I have list of personnels that every month give some money to the bank of our firm . If their balance reaches to for example 100$ then they can enter to the list of people who can use loan (TurnsTable). Now I have a SP that each month adds for example 20$ to all of our staff's Balance all in the same time . this is an important insert to my DB because when an insert takes place I want to write a trigger to check the total balance after insert.If the balance would reach to the special amount(100$) then this person's Personnel code must be inserted to the TurnsTable which maintains the list of personnel who wants loan . because of this i needed to know that can i send parameters to the triggers ? what do you suggest to my problem ? How can i solve it?
-
Should every table have Primary key ?Hello . Thanks for your help .I ask this question because i had a problem in my own design I have 5 entities that are related to each other and with foreign keys that i am sure are needed < there is a Circle in my design and this circle causes anomalies in the database and for this reason database prevent the DML actions in some of my tables . I am going to ask a total question from you : What should I do to solve the problem with the circles that appear because the foreign key constraints ? thanks
-
can a trigger have parametersthanks for your attention . I know that we have those tables in triggers . I am not doing dml action to effect them . I have a query that returns some "Personnel Codes" that these codes should be in the trigger as input . Now I am looking a way to solve this problem . thanks
-
can a trigger have parametersHi . I am designing a query . I want to write a trigger that accepts parameters. Is this possible how? and if not what should I do to solve this ? Thanks
-
Should every table have Primary key ?Hi I have a group of tables that have some relationship with each other . HardwareType( HardwareTypeID (pk) , Name ) Hardware (HardwareID , Model , ...,HardwareTypeID (FK)) Properties(PropertyID (PK) , Name , HardwareTypeID) Values( ValueID (PK) , ValueTitle , PropertyID (FK)) Hardware-Value( PVID (PK identity), ValueID (FK), HardwareID(FK)) with these in my design i have a circuit in my design and this is very bad for my update and delete operations . so i want to know that should i have Primary keys and relationship always in my tables or i can avoid using primary key and relationships in my design under some circumstances like the Hardware-Value( PVID (PK identity), ValueID (FK), HardwareID(FK)) can i omit the foreign key constraint in this design without loosing the normal form of my database ? thanks