Showing posts with label solution. Show all posts
Showing posts with label solution. Show all posts

Monday, March 26, 2012

Polyserve versus MSCS (Microsoft Cluster Server)

Hello All,

I would like to compare the MSCS with Polyserve's solution and thus wondering if anyone has an experience using both or knows -

    What are the major differences between the two? What are the limitations? What are the advantages and disadvantages? Which is advisable to use as a HA solution?

Any other information which may help me to make this decision would be appreciated.

Thanks in advance for your help!

~Managar

In my experience both are different, when you think about server consolidation then PS is best one to chose.

http://searchsqlserver.techtarget.com/polyserveResourcePage/0,295274,sid87,00.html

Policy Enforcement

I understand that SQL 2000 does not have security policy enforcement, but is
there any work-around solution for this (disregard Windows NT Authority)?
like checking for users' passwords if they meet the requirement of number of
characters, digits, or even must be changed when they are expired.
Thank you in advance
PaulHi
If you are using a trusted connection this task is deligated to Windows.
That is why in general it is better to use this type of connection. If you
are using SQL Server authentication and have a had written application that
allows the user to change a password then your rules can be implemented
there. If you want to check existing users then you may want to check out
MBSA or the SQL Server Security advisor
http://www.microsoft.com/technet/se...s/mbsahome.mspx
http://www.microsoft.com/downloads/...&displaylang=en
Other products mentioned at
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=30 may also help.
John
"PaulManh" wrote:

> I understand that SQL 2000 does not have security policy enforcement, but
is
> there any work-around solution for this (disregard Windows NT Authority)?
> like checking for users' passwords if they meet the requirement of number
of
> characters, digits, or even must be changed when they are expired.
> Thank you in advance
> Paul

Wednesday, March 21, 2012

plz solve for this tasks

could some one help in giveing solution for this tasks..
[CODE]
Task 1 : Get the first day and last day of the week

Ex: input : '04/12/2006'

Required ouput :

start_date End_date
04/09/2006 04/15/2006

Note : 1. start_date should be sunday
2. end_date should be saturday

Task 2 -- Find the product sales week wise

Find the product sales week wise

Output Required:

gasstationID productClass week1 week2 week3 week4
------- ---- ---- ---- ---- ----
111 DSL 1 0 0 0
111 GAS 2 0 1 1
222 DSL 1 0 1 1
222 GAS 1 0 0 0

create table trial_sales(
gasstationID bigint,
salesDate smalldatetime,
gallons bigint,
productClass varchar(4))

insert into trial_sales values(111,'11/01/2005',10000,'GAS')
insert into trial_sales values(111,'11/02/2005',1000,'GAS')
insert into trial_sales values(111,'11/02/2005',20000,'DSL')
insert into trial_sales values(222,'11/01/2005',10000,'GAS')
insert into trial_sales values(222,'11/02/2005',10000,'DSL')
insert into trial_sales values(111,'11/15/2005',1000,'GAS')
insert into trial_sales values(222,'11/15/2005',10000,'DSL')
insert into trial_sales values(111,'11/25/2005',1000,'GAS')
insert into trial_sales values(222,'11/25/2005',10000,'DSL')

Task 3 Display unique values

Display unique values in

create table t (colA varchar(25))

insert into t values('apple')
insert into t values('bat')
insert into t values('car')

ouput required:

a
b
c
e
l
p
r
t

Task : 4

I have a table in the database I am working with with the following columns:
(I have simplified this down for the sake of clarity)
int p1
int p2
int p3
int s1
date d1
string s1

There is no primary key and the table more resembles a log than anything.
e.g.

p1 p2 p3 s1 d1 s1
1 12 14 100 23May comment 2
1 12 14 800 22May comment 1
1 12 14 300 24May comment 3
1 12 15 100 22May comment 2
1 12 15 800 21May comment 1
2 12 15 100 23May comment 1

What I want to do is exttract the rows from the table where the combination
of p1 p2 and p3 is distinct/unique and the date is the most recent one for
all combinations of p1, p2, p3. So from the table above I would end up with
the resultset:

p1 p2 p3 s1 d1 s1
1 12 14 300 24May comment 3
1 12 15 100 22May comment 2
2 12 15 100 23May comment 1

Task 5

say i have the following data...
uId(int PK), productcode(int), quantity(int)
1,12,5
2,12,3
3,12,5
4,11,9

...and i have an order for productcode 12 with quantity of 6 products.
i need to select only enough rows to reach a quantity of 6.
in this case, i would want the first two rows which would give me a sum of
8.
how can i do this without looping through each record, getting the quantity
and exiting the loop when i have a sum >= 6?

Task 6

I have two tables as below, TABLE1 and TABLE2.

TABLE 1: Base

ID PName PPrice
------------
1 A 30
2 B 20

TABLE 2: History

ID Ldate Amount
------------
1 2005/8/7 50

The ID of TALBE1 is the primary key and the ID of TABLE2 is the foreign key.
What's the right T-SQL JOIN statement when I pass the date of 2005/8/7,
it will return the result as below:

Ldate PName Amount
-----------
2005/8/7 A 50
2005/8/7 B null

and when I pass the date of 2005/8/8, it will return the result as below:

Ldate PName Amount
-----------
2005/8/8 A null
2005/8/8 B null

Task : 7

Reverse the Name

create table sample_judge(
judge_name varchar(50))
go

insert into sample_judge values ('J Smith')
insert into sample_judge values ('M Samuel')
insert into sample_judge values ('S Shan')
insert into sample_judge values ('K Anand')
insert into sample_judge values ('K K K K Anand')
insert into sample_judge values ('K R Shanth Anand')
insert into sample_judge values ('K R Shanth Anand Kumara Velu')

go

Expected Output :

Smith J
Samuel M
Shan S
Anand K
Anand K K K K
Shanth Anand K R
Shanth Anand Kumara Velu K R

[\CODE]

thanks in adv
chakricould some one help in giveing solution for this tasks..no, because we don't do homework assignments

but we would be happy to help you do your assignment, one question at a time

;)

Task 1 : Get the first day and last day of the week

feed the given date into the DATEPART function using weekday (dw) datepart The weekday (dw) datepart returns a number that corresponds to the day of the week, for example: Sunday = 1, Saturday = 7. The number produced by the weekday datepart depends on the value set by SET DATEFIRST, which sets the first day of the week.then subtract this weekday number minus 1 from the given date using DATEADD function with day parameter

this gives you the first day of the week for the given date

for the last day of the week, add 6 days to the first day of the week

when you have understood this, and have written your solultion to task 1, you will be ready to tackle task 2|||thanks for your help, well can i know about this

create table t (colA varchar(25))

insert into t values('apple')
insert into t values('bat')
insert into t values('car')

ouput required:

a
b
c
e
l
p
r
t

thanks in adv.,
chakri|||i will give you a hint: you need to extract 1-character substrings of a string value

do you know of any function that can extract substrings?

hint: SUBSTRING

:)|||thank you..for your help..|||What was your solution? I have one floating about in my noodle but I am curious how you solved it :)

Tuesday, March 20, 2012

Plz Give The Solution Within Hour

I have two Same Databases on two different machine.i developed report at first machine.it run successfully.when i copy the report to other machine which has different name and open it, on refreshing ,its prompt for database connection then i change the name of server,database name ,user id and password then press ok.
Then
System Processing............
System Processing............
System Processing............
System Processing............
System Processing............
System Processing............
System Hanged
then I press Alt+Ctll+Delete
to abort the procceesCheck the ODBC source on both machines, if report runs on machine a, but not machine b, it could be the ODBC names are mis-matched.|||Bro. V361 i am using OLEDB(ADO) for database connection.

Actually problem is that i have developed report with my Server name for eg.DB02.BUT at client side DB02 is obviously unknown.when client open my report in crystal report and press F5 ,sometime it prompt for parameters,and sometime it hangs,when it prompt for parameter,i press ok then it ask for database connection ,I enter the configuration accordingly.after that.....Dont ask...

Prbolem is How to replace my Server Name with Clint Server Name...|||Open report, go to database, set databse location, you should see the current database connection at the top, browse too or create the new connection at the bottom. You will need to click on the table names at the
top, find the table name in the bottom connection and click update. You will need to do this for all tables involved as well as any subreports. As long as your report is not based on a command, this should help.|||Thanks for your reply.
My problem has been solved.Connection Timeout property was set to 0 which means crystal report never prompt for database configuration and keep searching for server name which causes computer to be hanged.

Monday, March 12, 2012

Pls Help very urgent

Hi All,
I attached my report with this thread.Pls give me the solution for the following.
when i am selecting the specified record from the field the report shows all the records.
Pls give me the suggestion for the error
Bye
BalaSorry I don't understand your question. Please be more specific about what is wrong with your report, and what are you trying to achieve.|||use record selection formula.. the report u have attached doesnt have any record selection formula to filter records..

zeeshangodil@.hotmail.com

Wednesday, March 7, 2012

Please provide me with a solution

I am developer who codes for both front end and back end.

HEre is the situation. I have two databases sqlnts1 and sqlnts2. I need to update certain tables in sqlnts1 and then certain tables in sqlnts2 and then back to the sqlnts1 to update few more tables. This is the program logic.

When I tried executing the stored procedure written in sql server 2000 I am provided with the following message

"[OLE/DB provider returned message: Cannot start more transactions on this session.]"

To set this problem correct the only option that I have is to set xact_abort on. But, setting this option on I cannot handle the errors in code. That is this option lets the server handle the system errors.

I want to handle the errors using @.@.error programatically.

Also when I try to commit the transaction that is started before updating sqlnts1 at the end of the stored procedure it provides me with the following error.

"No transaction or savepoint of that name was found".

To work around this problem I used set xact_abort on before making updates to sqlnts2 and set it back to off after finishing updates to sqlnts2.

This way it works, but am sure given that there occurs an error in updating sqlnts2 server tables - its gonna create problems. I want to handle them by myself in the code.

Please help.

Here is the program flow. I tried beginning the distributed transaction too. Case is also checked and begin and end tran are ensured to have the same case.

Begin distributed transaction abc / begin tran abc

Update tables in sqlnts1

set xact abort on

update tables in sqlnts2

set xact abort off

Update tables in sqlnts1

commit tran / rollback tran abc

Thanks,
SubhaAre these 2 DBs on the same server or different servers?|||The sqlnts1 and 2 are two servers.

I would look forward ot hear from you.
Thanks,
Subha

Originally posted by sbaru
Are these 2 DBs on the same server or different servers?|||What is the level of nested transactions you are going into ?
find max value of @.trancount at which the error
"[OLE/DB provider returned message: Cannot start more transactions on this session.]"
occurs|||I have only one transaction on. I don't open multiple transactions.
@.trancount is only 1

Originally posted by Enigma
What is the level of nested transactions you are going into ?
find max value of @.trancount at which the error
"[OLE/DB provider returned message: Cannot start more transactions on this session.]"
occurs

Please provide me with a solution

I am developer who codes for both front end and back end.

HEre is the situation. I have two databases sqlnts1 and sqlnts2. I need to update certain tables in sqlnts1 and then certain tables in sqlnts2 and then back to the sqlnts1 to update few more tables. This is the program logic.

When I tried executing the stored procedure written in sql server 2000 I am provided with the following message

"[OLE/DB provider returned message: Cannot start more transactions on this session.]"

To set this problem correct the only option that I have is to set xact_abort on. But, setting this option on I cannot handle the errors in code. That is this option lets the server handle the system errors.

I want to handle the errors using @.@.error programatically.

Also when I try to commit the transaction that is started before updating sqlnts1 at the end of the stored procedure it provides me with the following error.

"No transaction or savepoint of that name was found".

To work around this problem I used set xact_abort on before making updates to sqlnts2 and set it back to off after finishing updates to sqlnts2.

This way it works, but am sure given that there occurs an error in updating sqlnts2 server tables - its gonna create problems. I want to handle them by myself in the code.

Please help.

Here is the program flow. I tried beginning the distributed transaction too. Case is also checked and begin and end tran are ensured to have the same case.

Begin distributed transaction abc / begin tran abc

Update tables in sqlnts1

set xact abort on

update tables in sqlnts2

set xact abort off

Update tables in sqlnts1

commit tran / rollback tran abc

Thanks,
SubhaCrosspost

http://www.dbforums.com/t970872.html (http://www.dbforums.com/t970872.html)|||I could not see any reply posted by enigma??????

Originally posted by subkrish
I am developer who codes for both front end and back end.

HEre is the situation. I have two databases sqlnts1 and sqlnts2. I need to update certain tables in sqlnts1 and then certain tables in sqlnts2 and then back to the sqlnts1 to update few more tables. This is the program logic.

When I tried executing the stored procedure written in sql server 2000 I am provided with the following message

"[OLE/DB provider returned message: Cannot start more transactions on this session.]"

To set this problem correct the only option that I have is to set xact_abort on. But, setting this option on I cannot handle the errors in code. That is this option lets the server handle the system errors.

I want to handle the errors using @.@.error programatically.

Also when I try to commit the transaction that is started before updating sqlnts1 at the end of the stored procedure it provides me with the following error.

"No transaction or savepoint of that name was found".

To work around this problem I used set xact_abort on before making updates to sqlnts2 and set it back to off after finishing updates to sqlnts2.

This way it works, but am sure given that there occurs an error in updating sqlnts2 server tables - its gonna create problems. I want to handle them by myself in the code.

Please help.

Here is the program flow. I tried beginning the distributed transaction too. Case is also checked and begin and end tran are ensured to have the same case.

Begin distributed transaction abc / begin tran abc

Update tables in sqlnts1

set xact abort on

update tables in sqlnts2

set xact abort off

Update tables in sqlnts1

commit tran / rollback tran abc

Thanks,
Subha