Showing posts with label user. Show all posts
Showing posts with label user. Show all posts

Friday, March 30, 2012

please help me in fixing this bug...................!!

Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.

Confused

http://forums.asp.net/p/981020/1750831.aspx#1750831

please help me about build new table

please help me

i need for example

when my user clicke in the button a new table build in my sql database

please help me

Try the links below for more info on create table statement for SQL Server 2000/2005. Hope this helps.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create2_8g9x.asp

http://msdn2.microsoft.com/en-us/library/ms174979.aspx

sql

Please help Index slowed down our production system

Hi all,
I have a query connecting users to my products by and user groups and
today I added a nonclustered index to my table the one that maps users
to user groups (added a nonclusted index to both userID and UserGroups
in ASC order). About 6 hours later our CPU usage went from .01 - .10%
to 100+%? So I removed it and disable some parts of my SQL to
improve the speed. What's happening here? Please help? Would
removing the index change my table back to it's previous index'
please helpppppppppppppppp...
Thx
MStill UPDATE STATISTICS.
"mazdotnet" <maflatoun@.gmail.com> wrote in message
news:1194993911.116978.257150@.v2g2000hsf.googlegroups.com...
> Hi all,
> I have a query connecting users to my products by and user groups and
> today I added a nonclustered index to my table the one that maps users
> to user groups (added a nonclusted index to both userID and UserGroups
> in ASC order). About 6 hours later our CPU usage went from .01 - .10%
> to 100+%? So I removed it and disable some parts of my SQL to
> improve the speed. What's happening here? Please help? Would
> removing the index change my table back to it's previous index'
> please helpppppppppppppppp...
>
> Thx
> M
>|||Can you show us the query + info about the indexes?
"mazdotnet" <maflatoun@.gmail.com> wrote in message
news:1194993911.116978.257150@.v2g2000hsf.googlegroups.com...
> Hi all,
> I have a query connecting users to my products by and user groups and
> today I added a nonclustered index to my table the one that maps users
> to user groups (added a nonclusted index to both userID and UserGroups
> in ASC order). About 6 hours later our CPU usage went from .01 - .10%
> to 100+%? So I removed it and disable some parts of my SQL to
> improve the speed. What's happening here? Please help? Would
> removing the index change my table back to it's previous index'
> please helpppppppppppppppp...
>
> Thx
> M
>

Wednesday, March 28, 2012

Please help in queries

Hi,

I have 5 tables in sql database, naming Book, Category, Subject, UserDownload, User.

In Book table, BookID, BookTitle, CategoryID

In Category table, CategoryID, CategoryName

In Subject table, SubjectID, SubjectName, CategoryID

In UserDownload table, UserID, BookID

In User table, UserID, UserName

I used Book to store information of books. Those books has many categories. In those categories, there is also some subjects.

When user downloads book, I update UserDownload table.

The result I want to get is, Top Ten Download Subject. How can I get? Please help me.

The way I approach this kind of query is to first list the columns I need to return. Then I start thinking about which tables I need to touch to get that data, and then I think about how the data is related. Something like this should work for you:

SELECT
Subject.SubjectID,
Subject.SubjectName,
TopDownloads.BookCount
FROM
Subject
INNER JOIN
Book ON Subject.CategoryID = Book.CategoryID
INNER JOIN
(SELECT TOP 10 BookID, COUNT(*) AS BookCount FROM UserDownload GROUP BY BookID ORDER BY COUNT(*) DESC) AS TopDownloads ON Book.BookID = TopDownloads.BookID

Please help i can't connect....

Hi
I'm loged on Workstation as a user EUR\zzzz1 and i use different user
EUR\abc123 to map a drive on remote server SERVER2, SERVER2 is a domain
controler . It works.
On SERVER2 i have SQL Server 2000 with mixed mode authentication.
I have a user abc123 added in Active directory on SERVER2:
SERVER2\abc123. The same user is added in Sql Server with rights etc.
When i lounch Query Analyzer on my Workstation and select Sql
Authentication to use EUR\abc123 user i got message "[Microsoft][ODBC
SQL Server Driver][SQL Server]Login failed for user 'EUR\abc123'"
Why i have no access to sql server ?
regards
m
Hi
You must not use SQL Authentication, as it is a domain account, you need to
select NT Authentication when connecting.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"marta" <grupy_d@.go2.pl> wrote in message
news:1127985222.430902.144700@.o13g2000cwo.googlegr oups.com...
> Hi
> I'm loged on Workstation as a user EUR\zzzz1 and i use different user
> EUR\abc123 to map a drive on remote server SERVER2, SERVER2 is a domain
> controler . It works.
> On SERVER2 i have SQL Server 2000 with mixed mode authentication.
> I have a user abc123 added in Active directory on SERVER2:
> SERVER2\abc123. The same user is added in Sql Server with rights etc.
> When i lounch Query Analyzer on my Workstation and select Sql
> Authentication to use EUR\abc123 user i got message "[Microsoft][ODBC
> SQL Server Driver][SQL Server]Login failed for user 'EUR\abc123'"
> Why i have no access to sql server ?
>
> regards
> m
>
|||Ok now i use windows NT Authentication and i can log in but this way
i'm connected to SERVER2 with user EUR\zzzz1 not abc123... I need to
connect using user abc123. How to do that ?
M.
|||Hi Marta
If EUR\abc123 has been added to the server as a login, you will need SQL
authentication to connect as that login. Are you sure you're using the
right password?
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"marta" <grupy_d@.go2.pl> wrote in message
news:1127989262.660929.186550@.o13g2000cwo.googlegr oups.com...
> Ok now i use windows NT Authentication and i can log in but this way
> i'm connected to SERVER2 with user EUR\zzzz1 not abc123... I need to
> connect using user abc123. How to do that ?
> M.
>
|||Of course i can map a drive using that pass.
The problem is : how to connect to sql server on remote server with
windows authentication, when i am logged on local workstation with
different user.
M
|||You could probably use "Run As" (right-click the shortcut/executable,
and choose "Run as..." from the menu) to run Query Analyzer under the
context of another user, and therefore be able to pass that security
ticket to the SQL Server when you use Windows Authentication. Runas.exe
can also be called from the command line w/ switches. I believe this
functionality is only available from the right-click menu on Windows
2003 and XP - 2000 contains the command line version.
Good luck,
Tony Sebion
"marta" <grupy_d@.go2.pl> wrote in message
news:1128002474.807122.247970@.g14g2000cwa.googlegr oups.com:

> Of course i can map a drive using that pass.
> The problem is : how to connect to sql server on remote server with
> windows authentication, when i am logged on local workstation with
> different user.
> M
|||you can always connect to the ipc share of remote user with the login/pw of
the user you want
NET USE \\REMOTEPUTER\IPC$ /USER:MYUSERNAME "MYPASSWORD"
now event hough your are logged on as user LOCALUSER...any connection to
remote puter will be as MYUSERNAME
get it ?
"marta" <grupy_d@.go2.pl> wrote in message
news:1128002474.807122.247970@.g14g2000cwa.googlegr oups.com...
> Of course i can map a drive using that pass.
> The problem is : how to connect to sql server on remote server with
> windows authentication, when i am logged on local workstation with
> different user.
> M
>
sql

Please help i can't connect....

Hi
I'm loged on Workstation as a user EUR\zzzz1 and i use different user
EUR\abc123 to map a drive on remote server SERVER2, SERVER2 is a domain
controler . It works.
On SERVER2 i have SQL Server 2000 with mixed mode authentication.
I have a user abc123 added in Active directory on SERVER2:
SERVER2\abc123. The same user is added in Sql Server with rights etc.
When i lounch Query Analyzer on my Workstation and select Sql
Authentication to use EUR\abc123 user i got message "[Microsoft][ODB
C
SQL Server Driver][SQL Server]Login failed for user 'EUR\abc123'"
Why i have no access to sql server ?
regards
mHi
You must not use SQL Authentication, as it is a domain account, you need to
select NT Authentication when connecting.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"marta" <grupy_d@.go2.pl> wrote in message
news:1127985222.430902.144700@.o13g2000cwo.googlegroups.com...
> Hi
> I'm loged on Workstation as a user EUR\zzzz1 and i use different user
> EUR\abc123 to map a drive on remote server SERVER2, SERVER2 is a domain
> controler . It works.
> On SERVER2 i have SQL Server 2000 with mixed mode authentication.
> I have a user abc123 added in Active directory on SERVER2:
> SERVER2\abc123. The same user is added in Sql Server with rights etc.
> When i lounch Query Analyzer on my Workstation and select Sql
> Authentication to use EUR\abc123 user i got message "[Microsoft][O
DBC
> SQL Server Driver][SQL Server]Login failed for user 'EUR\abc123'"
> Why i have no access to sql server ?
>
> regards
> m
>|||Ok now i use windows NT Authentication and i can log in but this way
i'm connected to SERVER2 with user EUR\zzzz1 not abc123... I need to
connect using user abc123. How to do that ?
M.|||Hi Marta
If EUR\abc123 has been added to the server as a login, you will need SQL
authentication to connect as that login. Are you sure you're using the
right password?
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"marta" <grupy_d@.go2.pl> wrote in message
news:1127989262.660929.186550@.o13g2000cwo.googlegroups.com...
> Ok now i use windows NT Authentication and i can log in but this way
> i'm connected to SERVER2 with user EUR\zzzz1 not abc123... I need to
> connect using user abc123. How to do that ?
> M.
>|||Of course i can map a drive using that pass.
The problem is : how to connect to sql server on remote server with
windows authentication, when i am logged on local workstation with
different user.
M|||You could probably use "Run As" (right-click the shortcut/executable,
and choose "Run as..." from the menu) to run Query Analyzer under the
context of another user, and therefore be able to pass that security
ticket to the SQL Server when you use Windows Authentication. Runas.exe
can also be called from the command line w/ switches. I believe this
functionality is only available from the right-click menu on Windows
2003 and XP - 2000 contains the command line version.
Good luck,
Tony Sebion
"marta" <grupy_d@.go2.pl> wrote in message
news:1128002474.807122.247970@.g14g2000cwa.googlegroups.com:

> Of course i can map a drive using that pass.
> The problem is : how to connect to sql server on remote server with
> windows authentication, when i am logged on local workstation with
> different user.
> M|||you can always connect to the ipc share of remote user with the login/pw of
the user you want
NET USE \\REMOTEPUTER\IPC$ /USER:MYUSERNAME "MYPASSWORD"
now event hough your are logged on as user LOCALUSER...any connection to
remote puter will be as MYUSERNAME
get it ?
"marta" <grupy_d@.go2.pl> wrote in message
news:1128002474.807122.247970@.g14g2000cwa.googlegroups.com...
> Of course i can map a drive using that pass.
> The problem is : how to connect to sql server on remote server with
> windows authentication, when i am logged on local workstation with
> different user.
> M
>

please help fix this statement

im using an access project file now and no longer a mdb file.

i used to prompt a user for the first and last name of the patient they were looking for using this statement like [forms]![main]![text0] & "*"
and like [forms]![main]![text2] & "*" then it would promt them to enter in a last name and a first name but if they only entered a last name and left the first name prompt empty it would give them all the last name they had entered .

now im on sql as my backend and i got my query working except
if i dont type anything in on the second prompt i get no records.

how can i fix this because the user doesnt always no the first name and would like to sort through the records by just the last.

my current statement that works as long as you fill in both prompts is a follows.

SELECT tblpatientinfo.*
FROM tblpatientinfo
WHERE (lname LIKE @.LastName + '%') AND (fname LIKE @.firstname + '%')
ORDER BY chartnumberSELECT tblpatientinfo.*
FROM tblpatientinfo
WHERE (lname LIKE isnull(@.LastName,'') + '%') AND (fname LIKE isnull(@.firstname,'') + '%')
ORDER BY chartnumber|||Originally posted by Enigma
SELECT tblpatientinfo.*
FROM tblpatientinfo
WHERE (lname LIKE isnull(@.LastName,'') + '%') AND (fname LIKE isnull(@.firstname,'') + '%')
ORDER BY chartnumber

thank you very much worked great , im just having a hard time with the new syntax at least the vb codes i wrote still work.sql

Please Help - User Authentication Problem

Hi Lads,
I'm having this severe problem that's wrecking my head altogether! I created
a new user on my local machine, the purpose of this was to allow this user to
access certain reports through an asp.net application (to build up the
specified reports parameters, and pass them back using the soap API)
To test this I logged in as this user, and went to the report manager - but
nothing
came up! all I get is the home page with no reports! I granted "content
manager" access for this user for the group of reports when I logged in as
administrator...any ideas would be much appreciated!Do they have access to anything in the Home folder? If not then they will
see nothing. You have to give them a path to navigate to the reports they
have permission to view.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rowan Massey" <RowanMassey@.discussions.microsoft.com> wrote in message
news:7B34FA0E-AAF9-489A-A92C-A0CCB2FC6DE9@.microsoft.com...
> Hi Lads,
> I'm having this severe problem that's wrecking my head altogether! I
> created
> a new user on my local machine, the purpose of this was to allow this user
> to
> access certain reports through an asp.net application (to build up the
> specified reports parameters, and pass them back using the soap API)
> To test this I logged in as this user, and went to the report manager -
> but
> nothing
> came up! all I get is the home page with no reports! I granted "content
> manager" access for this user for the group of reports when I logged in as
> administrator...any ideas would be much appreciated!
>

Friday, March 23, 2012

Please help

Hi,
How can i use a java script function in sql reporting services.
I have a textbox - which i want to make as a hyperlink and when the user
clicks on it - it has to open another report or say url in another browser.
i am usin
<hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
but it doesnt work . Can you please help me how to do this ?
Thanks
RPDon't be doing this by hand. Use RS capabilities. For the textbox do a right
mouse click, properties, advanced, navigation, jump to URL.
Then put in this for a report with parameters:
Here is an example of a Jump to URL link I use. This causes Excel to come up
with the data in a separate window:
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
"&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
For a website put in this:
="javascript:void(window.open('http://www.google.com','_blank'))"
Note that you have to have SP1 or SP2 installed. This functionality was
added in SP1.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"RP" <RP@.discussions.microsoft.com> wrote in message
news:CD453D6F-085D-4EFB-94B1-D43A6D6D677A@.microsoft.com...
> Hi,
> How can i use a java script function in sql reporting services.
> I have a textbox - which i want to make as a hyperlink and when the user
> clicks on it - it has to open another report or say url in another
> browser.
> i am using
> <hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
> but it doesnt work . Can you please help me how to do this ?
> Thanks
> RP|||Bruce,
I didnt do this by hand. I rt clicked on the textbox, properties - advanced
- navigation
jump to url.
The funny thing is :
if i give the
="javascript:void(window.open('http://www.google.com','_blank'))"
and click on the link, i get 'page cannont be displayed' with
"javascript:void(window.open('http://www.google.com','_blank'))"
in the url.
click on that - will open a new window.
2. if i access the report from localhost\reports\reportname - this is the
situation
but if i access the report from localhost\reportserver\reportname - it works
absolutely fine.
what is the diff. between reports and reportserver ?
Thanks
"Bruce L-C [MVP]" wrote:
> Don't be doing this by hand. Use RS capabilities. For the textbox do a right
> mouse click, properties, advanced, navigation, jump to URL.
> Then put in this for a report with parameters:
> Here is an example of a Jump to URL link I use. This causes Excel to come up
> with the data in a separate window:
> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
> For a website put in this:
> ="javascript:void(window.open('http://www.google.com','_blank'))"
> Note that you have to have SP1 or SP2 installed. This functionality was
> added in SP1.
>
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "RP" <RP@.discussions.microsoft.com> wrote in message
> news:CD453D6F-085D-4EFB-94B1-D43A6D6D677A@.microsoft.com...
> > Hi,
> > How can i use a java script function in sql reporting services.
> > I have a textbox - which i want to make as a hyperlink and when the user
> > clicks on it - it has to open another report or say url in another
> > browser.
> > i am using
> > <hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
> > but it doesnt work . Can you please help me how to do this ?
> > Thanks
> > RP
>
>|||I have a little test report that has what looks exactly the same to me.
= "javascript:void(window.open('http://www.google.com','_blank'))"
It works regardless of how the report is pulled up (I did it both ways:
reports and reportserver).
Don't know what to tell you, it works for me (I am on SP2).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"RP" <RP@.discussions.microsoft.com> wrote in message
news:893EB9DB-C59F-4FBD-9E0F-DDB2B17E3FB7@.microsoft.com...
> Bruce,
> I didnt do this by hand. I rt clicked on the textbox, properties -
> advanced
> - navigation
> jump to url.
> The funny thing is :
> if i give the
> ="javascript:void(window.open('http://www.google.com','_blank'))"
> and click on the link, i get 'page cannont be displayed' with
> "javascript:void(window.open('http://www.google.com','_blank'))"
> in the url.
> click on that - will open a new window.
> 2. if i access the report from localhost\reports\reportname - this is the
> situation
> but if i access the report from localhost\reportserver\reportname - it
> works
> absolutely fine.
> what is the diff. between reports and reportserver ?
> Thanks
> "Bruce L-C [MVP]" wrote:
>> Don't be doing this by hand. Use RS capabilities. For the textbox do a
>> right
>> mouse click, properties, advanced, navigation, jump to URL.
>> Then put in this for a report with parameters:
>> Here is an example of a Jump to URL link I use. This causes Excel to come
>> up
>> with the data in a separate window:
>> ="javascript:void(window.open('" & Globals!ReportServerUrl &
>> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
>> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
>> For a website put in this:
>> ="javascript:void(window.open('http://www.google.com','_blank'))"
>> Note that you have to have SP1 or SP2 installed. This functionality was
>> added in SP1.
>>
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>>
>> "RP" <RP@.discussions.microsoft.com> wrote in message
>> news:CD453D6F-085D-4EFB-94B1-D43A6D6D677A@.microsoft.com...
>> > Hi,
>> > How can i use a java script function in sql reporting services.
>> > I have a textbox - which i want to make as a hyperlink and when the
>> > user
>> > clicks on it - it has to open another report or say url in another
>> > browser.
>> > i am using
>> > <hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
>> > but it doesnt work . Can you please help me how to do this ?
>> > Thanks
>> > RP
>>|||Bruce,
Can you pls post the code of your sample report once. my javascript looks
exactly the same. unfortunately it works if i say reportserver instead of
report. is there anyother way to check?
Thanks
RP
"Bruce L-C [MVP]" wrote:
> I have a little test report that has what looks exactly the same to me.
> = "javascript:void(window.open('http://www.google.com','_blank'))"
> It works regardless of how the report is pulled up (I did it both ways:
> reports and reportserver).
> Don't know what to tell you, it works for me (I am on SP2).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "RP" <RP@.discussions.microsoft.com> wrote in message
> news:893EB9DB-C59F-4FBD-9E0F-DDB2B17E3FB7@.microsoft.com...
> > Bruce,
> > I didnt do this by hand. I rt clicked on the textbox, properties -
> > advanced
> > - navigation
> > jump to url.
> > The funny thing is :
> > if i give the
> > ="javascript:void(window.open('http://www.google.com','_blank'))"
> > and click on the link, i get 'page cannont be displayed' with
> > "javascript:void(window.open('http://www.google.com','_blank'))"
> > in the url.
> > click on that - will open a new window.
> >
> > 2. if i access the report from localhost\reports\reportname - this is the
> > situation
> > but if i access the report from localhost\reportserver\reportname - it
> > works
> > absolutely fine.
> >
> > what is the diff. between reports and reportserver ?
> > Thanks
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Don't be doing this by hand. Use RS capabilities. For the textbox do a
> >> right
> >> mouse click, properties, advanced, navigation, jump to URL.
> >>
> >> Then put in this for a report with parameters:
> >> Here is an example of a Jump to URL link I use. This causes Excel to come
> >> up
> >> with the data in a separate window:
> >>
> >> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> >> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> >> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
> >>
> >> For a website put in this:
> >>
> >> ="javascript:void(window.open('http://www.google.com','_blank'))"
> >>
> >> Note that you have to have SP1 or SP2 installed. This functionality was
> >> added in SP1.
> >>
> >>
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >>
> >>
> >> "RP" <RP@.discussions.microsoft.com> wrote in message
> >> news:CD453D6F-085D-4EFB-94B1-D43A6D6D677A@.microsoft.com...
> >> > Hi,
> >> > How can i use a java script function in sql reporting services.
> >> > I have a textbox - which i want to make as a hyperlink and when the
> >> > user
> >> > clicks on it - it has to open another report or say url in another
> >> > browser.
> >> > i am using
> >> > <hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
> >> > but it doesnt work . Can you please help me how to do this ?
> >> > Thanks
> >> > RP
> >>
> >>
> >>
>
>|||oh b.t.w,
even i have SP2
"Bruce L-C [MVP]" wrote:
> I have a little test report that has what looks exactly the same to me.
> = "javascript:void(window.open('http://www.google.com','_blank'))"
> It works regardless of how the report is pulled up (I did it both ways:
> reports and reportserver).
> Don't know what to tell you, it works for me (I am on SP2).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "RP" <RP@.discussions.microsoft.com> wrote in message
> news:893EB9DB-C59F-4FBD-9E0F-DDB2B17E3FB7@.microsoft.com...
> > Bruce,
> > I didnt do this by hand. I rt clicked on the textbox, properties -
> > advanced
> > - navigation
> > jump to url.
> > The funny thing is :
> > if i give the
> > ="javascript:void(window.open('http://www.google.com','_blank'))"
> > and click on the link, i get 'page cannont be displayed' with
> > "javascript:void(window.open('http://www.google.com','_blank'))"
> > in the url.
> > click on that - will open a new window.
> >
> > 2. if i access the report from localhost\reports\reportname - this is the
> > situation
> > but if i access the report from localhost\reportserver\reportname - it
> > works
> > absolutely fine.
> >
> > what is the diff. between reports and reportserver ?
> > Thanks
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Don't be doing this by hand. Use RS capabilities. For the textbox do a
> >> right
> >> mouse click, properties, advanced, navigation, jump to URL.
> >>
> >> Then put in this for a report with parameters:
> >> Here is an example of a Jump to URL link I use. This causes Excel to come
> >> up
> >> with the data in a separate window:
> >>
> >> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> >> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> >> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
> >>
> >> For a website put in this:
> >>
> >> ="javascript:void(window.open('http://www.google.com','_blank'))"
> >>
> >> Note that you have to have SP1 or SP2 installed. This functionality was
> >> added in SP1.
> >>
> >>
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >>
> >>
> >> "RP" <RP@.discussions.microsoft.com> wrote in message
> >> news:CD453D6F-085D-4EFB-94B1-D43A6D6D677A@.microsoft.com...
> >> > Hi,
> >> > How can i use a java script function in sql reporting services.
> >> > I have a textbox - which i want to make as a hyperlink and when the
> >> > user
> >> > clicks on it - it has to open another report or say url in another
> >> > browser.
> >> > i am using
> >> > <hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
> >> > but it doesnt work . Can you please help me how to do this ?
> >> > Thanks
> >> > RP
> >>
> >>
> >>
>
>|||bruce -
got it - figured it myself.
"Bruce L-C [MVP]" wrote:
> I have a little test report that has what looks exactly the same to me.
> = "javascript:void(window.open('http://www.google.com','_blank'))"
> It works regardless of how the report is pulled up (I did it both ways:
> reports and reportserver).
> Don't know what to tell you, it works for me (I am on SP2).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "RP" <RP@.discussions.microsoft.com> wrote in message
> news:893EB9DB-C59F-4FBD-9E0F-DDB2B17E3FB7@.microsoft.com...
> > Bruce,
> > I didnt do this by hand. I rt clicked on the textbox, properties -
> > advanced
> > - navigation
> > jump to url.
> > The funny thing is :
> > if i give the
> > ="javascript:void(window.open('http://www.google.com','_blank'))"
> > and click on the link, i get 'page cannont be displayed' with
> > "javascript:void(window.open('http://www.google.com','_blank'))"
> > in the url.
> > click on that - will open a new window.
> >
> > 2. if i access the report from localhost\reports\reportname - this is the
> > situation
> > but if i access the report from localhost\reportserver\reportname - it
> > works
> > absolutely fine.
> >
> > what is the diff. between reports and reportserver ?
> > Thanks
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Don't be doing this by hand. Use RS capabilities. For the textbox do a
> >> right
> >> mouse click, properties, advanced, navigation, jump to URL.
> >>
> >> Then put in this for a report with parameters:
> >> Here is an example of a Jump to URL link I use. This causes Excel to come
> >> up
> >> with the data in a separate window:
> >>
> >> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> >> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> >> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
> >>
> >> For a website put in this:
> >>
> >> ="javascript:void(window.open('http://www.google.com','_blank'))"
> >>
> >> Note that you have to have SP1 or SP2 installed. This functionality was
> >> added in SP1.
> >>
> >>
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >>
> >>
> >> "RP" <RP@.discussions.microsoft.com> wrote in message
> >> news:CD453D6F-085D-4EFB-94B1-D43A6D6D677A@.microsoft.com...
> >> > Hi,
> >> > How can i use a java script function in sql reporting services.
> >> > I have a textbox - which i want to make as a hyperlink and when the
> >> > user
> >> > clicks on it - it has to open another report or say url in another
> >> > browser.
> >> > i am using
> >> > <hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
> >> > but it doesnt work . Can you please help me how to do this ?
> >> > Thanks
> >> > RP
> >>
> >>
> >>
>
>

Please explain this.., why is PasswordRecovery creating another sqlservr process....

Why is the PasswordRecovery control creating another sqlservr process after I successfully enter the user name, and for a reason I have not found yet it keeps the database in a read only modem then when I answer my security question correctly it gives me the error:

Failed to update database "C:\INETPUB\WWWROOT\VER1.0.0.1\APP_DATA\ASPNETDB.MDF" because the database is read-only.

I read other post regarding the read only message and I don't if there doing the same thing, but why does this happen and what is the solution to this other not using the control?

cancel that!... found solution from another post...

Wednesday, March 21, 2012

Please All Help me ( challenge )

I'm in need to write stored procedures which insert id for employee in a table in a database but i want to make stored procedures to prevent the user from entering id with value 0 i want to catch this from the stored procedures as kindly message and send this message to windows application

Use Raiserror with severy >=16:

create procedure InsertEmployee

@.id int

as

if @.id = 0

begin

RAISERROR ('Employee ID can''t be 0',16,1);

end

else

begin

--INSERT here

print 'ID > 0 '

end

|||But the important section is how to catch this error message from windows application and show it when the user try to enter value for id employee less than 1|||

That depends on the technology that you are using to connect to the database server and also the programming language that you have used to develop the client application. You're unlikely to get the answer to your question in a T-SQL forum.

See if you can find a more relevant forum in this list:

http://forums.microsoft.com/MSDN/default.aspx?siteid=1

Just to steer you in the right direction, and now that you've been advised on how to raise errors in your stored procedures, then this forum might be the next port of call:

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=45&SiteID=1

Chris

|||If you want to use SqlCommand explicitly:

SqlCommand cmd = new SqlCommand("<name of your SP>",conn);
cmd.Parameters.Add("@.ID",SqlDBType.Int);
cmd.Parameters["@.ID"].Value = <value from user input>;
try
{
cmd.ExecuteNoQuery();
}
catch(SqlException e)
{
//Catch error here
//For example
MessageBox.Show(e.Errors[0].Message);
}

If you want to use SqlDataAdapter/TableAdapter

SqlDataAdapter da = <some code to obtain>;
try
{
da.Update(ds);//ds - you dataset or datatable

}
catch(SqlException e)

{

//Catch error here

//For example

MessageBox.Show(e.Errors[0].Message);

}|||The whole point is that if your are giving id as parameter why not check the value inside your application before sending it to the SP.
Now other option is to write a trigger inside which u rollback ur transaction if id is 0. This will prevent 0's not only from appl but also from backend

Tuesday, March 20, 2012

placing system table filegroup and Log files on same drive

Is it better to create a seperate filegroup for all user tables ? And if so
should all the system tables that belong to the Primary filegroup reside on
the same drive with the log file . I am using SQL 2000. Which system tables
get hit the most daily for any inserts,updates and deletes that may be
occuring on the server
ThanksDepends on the disk configuration.
I believe it is generally recommended to separate the log file from any data
files, i.e., separate physical disks... however, if you have a multiple
channel controller, with high thoroughput on each channel, you may be able
to get by w/ having the log and the data on the same logical disk.
I believe that all system tables must reside in PRIMARY, I'd have to verify.
If that is true, it doesn't matter what system tables get inserts, updates,
deletes. However, you are taking away some fault tolerance if you put the
system tables and the log files on the same physical disk.
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%23AKD5sEXDHA.1872@.TK2MSFTNGP12.phx.gbl...
> Is it better to create a seperate filegroup for all user tables ? And if
so
> should all the system tables that belong to the Primary filegroup reside
on
> the same drive with the log file . I am using SQL 2000. Which system
tables
> get hit the most daily for any inserts,updates and deletes that may be
> occuring on the server
> Thanks
>|||You also generally want log files on RAID 1 or 10 as they are continuously
sequentially writing.
Thanks,
Greg H
"Martin Schmid" <martinschmid@.sbcglobal.net.nospam> wrote in message
news:eoDKm2EXDHA.2212@.TK2MSFTNGP09.phx.gbl...
> Depends on the disk configuration.
> I believe it is generally recommended to separate the log file from any
data
> files, i.e., separate physical disks... however, if you have a multiple
> channel controller, with high thoroughput on each channel, you may be able
> to get by w/ having the log and the data on the same logical disk.
> I believe that all system tables must reside in PRIMARY, I'd have to
verify.
> If that is true, it doesn't matter what system tables get inserts,
updates,
> deletes. However, you are taking away some fault tolerance if you put the
> system tables and the log files on the same physical disk.
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:%23AKD5sEXDHA.1872@.TK2MSFTNGP12.phx.gbl...
> > Is it better to create a seperate filegroup for all user tables ? And if
> so
> > should all the system tables that belong to the Primary filegroup reside
> on
> > the same drive with the log file . I am using SQL 2000. Which system
> tables
> > get hit the most daily for any inserts,updates and deletes that may be
> > occuring on the server
> >
> > Thanks
> >
> >
>|||Hassan
If you are using SQL Server 7, it is a good idea to put
your system files in a seperate filegroup. If you get a
corrupted user table, if your system tables are in a
seperate filegroup you can still perform a transaction log
backup prior to invoking DR (If you have DR of course). If
they are in the same filegroup you may not be able to.
This is no longer an issue in 2000.
Hope this helps
John

Monday, March 12, 2012

Placing data field on the report Header

I have the problem palcing the field from my Stored proc on the header.
Depending on the user name, I have to dynamically change the department name
that comes from the stored proc.
But, RS is not allowing me to put any expression (with fields) on header.
Any ideas how to do that ?I think the solution to this is to place the data into a field within the
body of the report, then set the hidden property to true. You can then set
the value of the Header textbox "=ReportItems!Fieldname.Value" This is
because you cannot reference datasets within the header or footer, they are
out of scope.
"Sujay" <Sujay@.discussions.microsoft.com> wrote in message
news:F18343A1-29A9-4BC8-B877-EB74B96495BB@.microsoft.com...
>I have the problem palcing the field from my Stored proc on the header.
> Depending on the user name, I have to dynamically change the department
> name
> that comes from the stored proc.
> But, RS is not allowing me to put any expression (with fields) on header.
> Any ideas how to do that ?|||Sujay,
I am actually doing this. I have a 2 stored procs (header and details).
These are separate datasets. In the table header you can put a dataset value
into it. For example, =First(Fields!Header1.Value, "HeaderDataSet")
HTH
"Sujay" wrote:
> I have the problem palcing the field from my Stored proc on the header.
> Depending on the user name, I have to dynamically change the department name
> that comes from the stored proc.
> But, RS is not allowing me to put any expression (with fields) on header.
> Any ideas how to do that ?|||Rich,
I did exactly as you said. But, since the Body of the field value is being
displayed on the first page only, even the header text box is visible only on
first page.
It displays blank on other pages.
If I place a field value at the bottom of Body section then, I see header
only on the last page.
So, even that doesn't seem to be working.
I haven't tried Neo's solution yet.
"Rich Millman" wrote:
> I think the solution to this is to place the data into a field within the
> body of the report, then set the hidden property to true. You can then set
> the value of the Header textbox "=ReportItems!Fieldname.Value" This is
> because you cannot reference datasets within the header or footer, they are
> out of scope.
> "Sujay" <Sujay@.discussions.microsoft.com> wrote in message
> news:F18343A1-29A9-4BC8-B877-EB74B96495BB@.microsoft.com...
> >I have the problem palcing the field from my Stored proc on the header.
> > Depending on the user name, I have to dynamically change the department
> > name
> > that comes from the stored proc.
> > But, RS is not allowing me to put any expression (with fields) on header.
> > Any ideas how to do that ?
>
>|||Neo,
It is not allowing me to use =First(Fields!Header1.Value, "HeaderDataSet")
as I cannot define any fields in Header section.
What I have done is :
*Created 2 datasets; Header and detail
*Placing a text box in Header section and value of text box is :
First(Fields!Header1.Value, "HeaderDataSet")
*Other dataset fields are witin the Body section placed in the report.
But, when I preview this report it says, cannot place dataset fields in
Header or Footer.
Let me know what am I doing wrong!!!
"Neo" wrote:
> Sujay,
> I am actually doing this. I have a 2 stored procs (header and details).
> These are separate datasets. In the table header you can put a dataset value
> into it. For example, =First(Fields!Header1.Value, "HeaderDataSet")
> HTH
> "Sujay" wrote:
> > I have the problem palcing the field from my Stored proc on the header.
> > Depending on the user name, I have to dynamically change the department name
> > that comes from the stored proc.
> > But, RS is not allowing me to put any expression (with fields) on header.
> > Any ideas how to do that ?

placed file xxxxx on cabinet yyyyy (was "please help me !")

Please help me on this error :--
Executed as user: ACS1255\SYSTEM. ...binet 'ABED_R2.CAB_' placed file 'ABED_R2\Application.dimcr_' (size 30) on cabinet 'ABED_R2.CAB_' placed file 'ABED_R2\Application.dimprop_' (size 34981) on cabinet 'ABED_R2.CAB_' placed file 'ABED_R2\Application.dimtree_' (size 57829) on cabinet 'ABED_R2.CAB_' placed file 'ABED_R2\ABCD_' (size 113) on cabinet 'ABED_R2.CAB_' placed file 'ABED_R2\Business Area.dim_' (size 2817) on cabinet 'ABED_R2.CAB_' placed file 'ABED_R2\Business Area.dimcr_' (size 30) on cabinet 'ABED_R2.CAB_' placed file 'ABED_R2\Business Area.dimprop_' (size 2429) on cabinet 'ABED_R2.CAB_' placed file 'ABED_R2\Business Area.dimtree_' (size 7411) on cabinet 'ABED_R2.CAB_' placed file 'ABED_R2\Calendar.Calendar.dim_' (size 2221) on cabinet 'ABED_R2.CAB_' placed file 'ABED_R2\Calendar.Calendar.dimcr_' (size 30) on cabinet 'ABED_R2.CAB_' placed file 'ABED_R2\Calendar.Calendar.dimprop_' (size 829) on cabine... Process Exit Code 1. The step failed.

Regards,
sumitI am curious to know if anyone understand anything from this question|||Sumit
Please state the error and where exactly you're getting this error.
Make sure the account you;re running has required privileges and if scheduled then SQLAgent account is also having necessary permission.

Wednesday, March 7, 2012

PK columns dont show up in INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE

Having a database user 'myuser' beeing a member of the roles 'public'
and 'db_owner' I created the test table:
if exists (select * from dbo.sysobjects where id =
object_id(N'[myuser].[TEST]') and OBJECTPROPERTY(id, N'IsUserTable')
=
1)
drop table [myuser].[TEST]
GO
CREATE TABLE [myuser].[TEST] (
[TEST_ID] [varchar] (2) NOT NULL ,
[DESCRIPTION] [varchar] (60) NOT NULL ,
CONSTRAINT [TEST_PK] PRIMARY KEY CLUSTERED
(
[TEST_ID]
) ON [PRIMARY]
) ON [PRIMARY]
GO
However, the primary key constraint 'TEST_PK' does not show up in the
view
select * from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
only foreign keys (from other tables) show up.
Is this a security issue?
Using SQL Server 2000 Dev Edition SP3a on Win XP Prof.
Thank you in advance for your assistance,
SRSoenke,
This happens when a user tries to get schema information from tables
that they don't own. If you login as myuser it works fine. Can you
create the table as dbo.[TEST]? If you do this then it should work
without issue.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Soenke Richardsen wrote:
> Having a database user 'myuser' beeing a member of the roles 'public'
> and 'db_owner' I created the test table:
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[myuser].[TEST]') and OBJECTPROPERTY(id, N'IsUserTable
') =
> 1)
> drop table [myuser].[TEST]
> GO
> CREATE TABLE [myuser].[TEST] (
> [TEST_ID] [varchar] (2) NOT NULL ,
> [DESCRIPTION] [varchar] (60) NOT NULL ,
> CONSTRAINT [TEST_PK] PRIMARY KEY CLUSTERED
> (
> [TEST_ID]
> ) ON [PRIMARY]
> ) ON [PRIMARY]
> GO
> However, the primary key constraint 'TEST_PK' does not show up in the
> view
> select * from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
> only foreign keys (from other tables) show up.
> Is this a security issue?
> Using SQL Server 2000 Dev Edition SP3a on Win XP Prof.
> Thank you in advance for your assistance,
> SR|||Hi Mark,
during the last week I tried several times to reply to your message
using google groups, but always got a message like:
"Unable to retrieve message OQ0Dm2T$EHA.3180@.TK2MSFTNGP10.phx.gbl"
Now I found the new beta groups, and they seem to work better...
Anyway, your posting helped me, thanks!
Soenke
Mark Allison wrote:[vbcol=seagreen]
> Soenke,
> This happens when a user tries to get schema information from tables
> that they don't own. If you login as myuser it works fine. Can you
> create the table as dbo.[TEST]? If you do this then it should work
> without issue.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Soenke Richardsen wrote:
'public'[vbcol=seagreen]
N'IsUserTable') =[vbcol=seagreen]
the[vbcol=seagreen]

Saturday, February 25, 2012

pivot tables & offline cube access

Is it possible to have multiple pivot tables in the same Excel workbook accessing the same offline cube file?

Currently, when the user is connected to the server it connects to a .asdatabase to populate many pivot tables. I need to allow the user to access a local cube file when they are not connected to the server.

I am using excel vba macros to connect the pivot caches to the online data source, which works perfectly. I would like to do the same to connect the pivot caches to the local cube file.

Is this possible? The local cube file is created off the server database using MDX (create global cube).

Thanks,
Lyn

If this is AS2005 - there is a bug in this area that is being fixed in the SP2 release. I think the fix would allow you to do what you've described.|||

Is this possible? The local cube file is created off the server database using MDX (create global cube).

yes possible , but there is a problem. u have to run this MDX statment manually , I tries to put it in a schedule in a jobs list , but it says the MDX syntax is worng, any help?

Karim

pivot tables & offline cube access

Is it possible to have multiple pivot tables in the same Excel workbook accessing the same offline cube file?

Currently, when the user is connected to the server it connects to a .asdatabase to populate many pivot tables. I need to allow the user to access a local cube file when they are not connected to the server.

I am using excel vba macros to connect the pivot caches to the online data source, which works perfectly. I would like to do the same to connect the pivot caches to the local cube file.

Is this possible? The local cube file is created off the server database using MDX (create global cube).

Thanks,
Lyn

If this is AS2005 - there is a bug in this area that is being fixed in the SP2 release. I think the fix would allow you to do what you've described.|||

Is this possible? The local cube file is created off the server database using MDX (create global cube).

yes possible , but there is a problem. u have to run this MDX statment manually , I tries to put it in a schedule in a jobs list , but it says the MDX syntax is worng, any help?

Karim

pivot tables & offline cube access

Is it possible to have multiple pivot tables in the same Excel workbook accessing the same offline cube file?

Currently, when the user is connected to the server it connects to a .asdatabase to populate many pivot tables. I need to allow the user to access a local cube file when they are not connected to the server.

I am using excel vba macros to connect the pivot caches to the online data source, which works perfectly. I would like to do the same to connect the pivot caches to the local cube file.

Is this possible? The local cube file is created off the server database using MDX (create global cube).

Thanks,
Lyn

If this is AS2005 - there is a bug in this area that is being fixed in the SP2 release. I think the fix would allow you to do what you've described.|||

Is this possible? The local cube file is created off the server database using MDX (create global cube).

yes possible , but there is a problem. u have to run this MDX statment manually , I tries to put it in a schedule in a jobs list , but it says the MDX syntax is worng, any help?

Karim

Pivot Table Bug with AdventureWorks

A user pointed out an odd bug / inconsistency that occurs when using Excel pivot tables. Depending on how attributes are related to each other, Excel does some odd things when cross joining attributes from the same dimension on an axis.

Example 1. "Correct" cross join of attributes:

    Connect to AdventureWorks from Excel pivot table. Drop in "Internet Sales Amount".

    On rows add "State-Province" and "Total Children". Row 4 should read "State-Province, Total Children, Total".

    Click the drop-down on "Total Children" and select "1".

    The results should be filtered so that you only see states where there are internet sales for families with 1 child.

Example 2. "Incorrect" cross join of attributes:

    Connect to AdventureWorks from Excel pivot table. Drop in "Internet Sales Amount".

    On rows add "State-Province" and "Country". Row 4 should read "State-Province, Country, Total".

    Click the drop-down on "Country" and select "United States".

    The results *should* be filtered so that you only see states belonging to the United States. Instead, we still see states belonging to other countries.

Shouldn't the "United States" selection on the rows preclude the states from other countries? I don't understand why the pairs of attributes in examples 1 and 2 interact so differently. I would appreciate any meaningful explanation than I can pass on to the user.

Are you using Excel 2003 or Excel 2007? Not sure if I recreated the examples exactly or not, but in Excel 2007, it seems to behave as you expect it to. In the first example, I get the states filtered to just those that had customers with a total children value of 1. And in the second example, I get the states filtered to just those in the United States.

Unless I'm doing something wrong, this seems to work in Excel 2007. I don't have Excel 2003 loaded on my current machine, but could get to another machine to test this if you are indeed using Excel 2003...

Another question would be what service pack level you have installed for Analysis Services. I have SP2 installed (which I don't think would change the behaviour of Excel, but...) So, if you are using Excel 2007, what service package are you running for SSAS?

Dave Fackler

|||

I started with Excel 2003. I saw the bizarre behavior. Then I saved the document and opened in Excel 2007. And still saw the bizarre behavior.

In 2007 I have to enable "classic layout" to get both "State-Province" and "Country" to both show up side-by-side (stacked) on rows. Then I just uncheck all countries and check only "United States". However the states and provinces of other countries are still displayed in the first column.

I'm on SP2 of SSAS. Thanks in advance.

|||

Is it possible that you have the Country attribute from the Geography dimension selected with the State-Province attribute from the Customer dimension (or vice versa)? Both dimensions contain geography attributes. While they are named the same, they represent attributes in different dimensions. Thus, they are related only through the fact table. That means that filtering of one will not filter values from the other (although the filtering does affect the fact data as expected).

Dave Fackler

|||

The problem happens when the "State-Province" is added in rows with the "Country" of the *same* (Customer) dimension. We actually noticed the problem first in our production cubes and then reproduced it in AdventureWorks.

To be clear, add "State-Province" in rows so it shows in the *first* column, add "Country" in the *second* column, and then try to filter the country by the "United States". Unfortunately this doesn't preclude states from other countries.

This is such an obviously inconsistency but it only occurs when attributes are related to each other in the way that "State-Province" and "Country" are. I'm surprised that I haven't heard of other complaints. Also unusual is the fact that my own MDX expressions with these two attributes never return the same data that Excel is displaying.

Anybody else see this problem?