Permissions Are Insufficient For Performing ListChildren()

Jan 16, 2008

I'm developing an asp.net app that will list the reports available on the report server. The app works OK on my local machine but when I deploy it I run into a permissions problem:

Exception Details: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: The permissions granted to user 'NT AUTHORITYNETWORK SERVICE' are insufficient for performing this operation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'NT AUTHORITYNETWORK SERVICE' are insufficient for performing this operation. at Microsoft.ReportingServices.Library.ListChildrenAction.PerformActionNow() at Microsoft.ReportingServices.Library.RSSoapAction`1.Execute() at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.ListChildren(String Item, Boolean Recursive, CatalogItem[]& CatalogItems) --- End of inner exception stack trace --- at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.ListChildren(String Item, Boolean Recursive, CatalogItem[]& CatalogItems) at Microsoft.ReportingServices.WebServer.ReportingService2005.ListChildren(String Item, Boolean Recursive, CatalogItem[]& CatalogItems)

My code uses the DefaultCredentials:
ReportingService2005 rService = new ReportingService2005();rService.Credentials = System.Net.CredentialCache.DefaultCredentials;
CatalogItem[] catalogItems;
catalogItems = rService.ListChildren("/", true);
I can avoid the exception if I use the Administrator account:

System.Net.CredentialCache cache = new System.Net.CredentialCache();// Add a NetworkCredential instance to CredentialCache.// Negotiate for NTLM or Kerberos authentication.cache.Add(new Uri(ReportServer), "Negotiate", new System.Net.NetworkCredential("Administrator", "<password>", "<domain>")); //Assign CredentialCache to the Web service Client Proxy(myProxy) Credentials property.rService.Credentials = cache;

I'm pretty sure using the Administrator account here is not the best practice. Any suggestions?

Thanks,
Al

View 3 Replies


ADVERTISEMENT

The Permissions Granted To User 'mydomainmyuser' Are Insufficient For Performing This Operation.

Mar 8, 2006

Hi,

I am trying to deploy a reporting services report to remote reorting services server , i did the following :



in project property : http://192.xxx.xxx.xxx/reportserver

(NB: my pc and server are on the same domain)

and i assigned a permission for my user 'mydomainmyuser' on the virtual folder of the reporting service, but i got this error :

The permissions granted to user 'mydomainmyuser' are insufficient for performing this operation.I

I know it is a permission pb but please any idea to solve that ??

Thanks,

Tarek Ghazali

SQL Server MVP

View 6 Replies View Related

Error RsAccessDenied : The Permissions Granted To User '' Are Insufficient For Performing This Operation.

Mar 20, 2007

I get an error message when deploying reports to the reportserver from microsoft visual studio.

error message : Error rsAccessDenied : The permissions granted to user '' are insufficient for performing this operation.

TargetServerURL : http://server.com/ReportServer$sql_2005

The Report server is configured to use a custom security extension. i can access the reportserver.

It looks like when i deploy the reports from VS. it does not pass any credentials to the report server. From the error message it looks like there is no username . How do i deploy reports to report server if we are using a custom security extension. How do i grant user rights to deploy report if we are using a custom security extension. Any idea. Thanks!



chi



View 4 Replies View Related

The Permissions Granted To User 'domainusername' Are Insufficient For Performing This Operation. (rsAccessDenied)

Jan 21, 2008



Hi,

I wonder if anyone can help me?

I have installed and configured sql server 2005 express edition with advanced services on an xp box, with the aim of using reporting services.

I have set up reporting services successfully using the report manager, with my web services id = netwrokservice.

I can access both the report manager and report url locally, i.e while using localhost anjd on the machine. The problem arises however when i try to access

the reports from another machine, as i get the message:

"The permissions granted to user 'domainusername' are insufficient for performing this operation. (rsAccessDenied)"

when going to for example:

"http://servername/ReportServer/Pages/ReportViewer.aspx?%2fReport1&rs:Command=Render"

I have looked at various sites (including microsoft) in an attempt to find a solution to this and most sites give exmaples of how to configure the full

version of reporting services which i do not have. The things that I have managed to gleam and try are:

- open up security on dir: C:Program FilesMicrosoft SQL ServerMSSQL.2Reporting ServicesReportServer to everyone and allow all access
- added my own username as a new role assigment in the report manager page
- added my own username to the reportserveruser and reportingserviceswebservicesuser roles, as indicated by microft:

http://msdn2.microsoft.com/en-us/library/ms365166.aspx, who state that "Custom authentication extensions and custom role assignments are not supported. You

must map existing Windows domain user and group accounts to predefined role definitions."

Can anyone suggest where to look next as I cannot believe that this should be this difficult?

Many Thanks in advance

View 3 Replies View Related

The Permissions Granted To User 'Domainuser' Are Insufficient For Performing This Operation. (rsAccessDenied)

Apr 25, 2008

Hi, I've scoured the forums and tried just about every answer to this problem without any success. What I have is SQL Server 2005 installed on a single machine, and trying to deploy reports to the same machine for testing purposes. When I try to deploy the report I receive the permissions error. Here's what I've gotten to at this point:


I can get to the reports URL (http://machine/Reports)

I can login to Reporting Services via SQL Server Management Studio as the administrator. (Windows Authentication)

I have added my login to the Home Folder-->Permissions in SQL Server Management Studio, and all reports are set to inherit the home folder's permissions

In Reporting Service Configuration Manager the Windows Service Identity is set to Local System, and for web service identity - ASP.NET Service Account is set to NT AuthorityNetworkService; Report Server and Report Manager are set to DefaultAppPool.

In IIS I tried enabling Anonymous Authentication

Current Application pools are set to "Classic" for Managed Pipeline mode (I did this to actually be able to login to Reporting Services via SQL Server management studio; having this set to integrated gives me an error)
What gets me is that this is entirely self-contained on one machine, that I set up as an administrator. So why do I get a permissions error when I am the admin on this machine deploying to this machine?

View 17 Replies View Related

The Permissions Granted To User &&<MachineName&&>ASPNET' Are Insufficient For Performing This Operation.

Jul 25, 2007

Hi,



I wanted to deploy my Sql 2005 reports to my local machine and want it to get viewed by all the users through Asp.Net application.

User can directly view the reports by clicking on the direct link to report but when they try to view it using application having Report Viewer, running on iis it gives acess denied 401 error and can't view the reports

If I make my application to run on default port then it works fine

If I give rights to <particularMachineNameASPNET> then that user can view the report but if there are 100 users then will i Add 100 such entries???

I think I am making mistake in this case.

Any response will be appriciated.





-Thanks,

Digs

View 6 Replies View Related

The Permissions Granted To User 'DomainUser' Are Insufficient For Performing This Operation. (rsAccessDenied)

Apr 15, 2008

i finally got SSRS(SQL Server Reporting Services) to install properly and and it was working before i had to restart my PC
after restarting my PC i went back to the Domain/Reports$SQLExpress and the menus where Blank it just showed the help link and the border. so i opened the Domain/ReportServer$SQLExpress and it said


The permissions granted to user 'DOMAINOwner' are insufficient for performing this operation.(rsAccessDenied) Get Online Help
and there is no Login Box Popping up How do i get it to Login - Its set to use Windows Authentication what sould i doo please help ive had one problem after another with this SSRS

View 2 Replies View Related

SPROC Won't Execute - Insufficient Permissions

Jun 30, 2006

I'm trying to use the SPROC below (courtesy of Erland!) to capture theerror message but it fails owing to insufficient permissions (I can'treproduce it just now, but I think it's because it can't get access tothe DBCC OUTPUTBUFFER).How do I give the SPROC permission to execute?Many thanksEdwardCREATE PROCEDURE stpShowErrorMessage @errmsg nvarchar(500) OUTPUT ASDECLARE @dbccrow nchar(77),@msglen int,@lenstr nchar(2),@sql nvarchar(2000),@s tinyint-- Catch the output buffer.CREATE TABLE #DBCCOUT (col1 nchar(77) NOT NULL)INSERT INTO #DBCCOUTEXEC ('DBCC OUTPUTBUFFER(@@spid)')-- Set up a cursor over the table. We skip the first-- row, because there is nothing of interest.DECLARE error_cursor CURSOR STATIC FORWARD_ONLY FORSELECT col1FROM #DBCCOUTWHERE left(col1, 8) <> replicate('0', 8)ORDER BY col1-- Init variable, and open cursor.SELECT @errmsg = ''OPEN error_cursorFETCH NEXT FROM error_cursor INTO @dbccrow-- On this first row we find the length.SELECT @lenstr = substring(@dbccrow, 15, 2)-- Convert hexstring to intSELECT @sql = 'SELECT @int = convert(int, 0x00' + @lenstr + ')'EXEC sp_executesql @sql, N'@int int OUTPUT', @msglen OUTPUT-- @s is where the text part of the buffer starts.SELECT @s = 62-- Now assemble rest of string.WHILE @@FETCH_STATUS = 0 AND datalength(@errmsg) - 1 < 2 * @msglenBEGINSELECT @errmsg = @errmsg + substring(@dbccrow, @s + 1, 1) +substring(@dbccrow, @s + 3, 1) +substring(@dbccrow, @s + 5, 1) +substring(@dbccrow, @s + 7, 1) +substring(@dbccrow, @s + 9, 1) +substring(@dbccrow, @s + 11, 1) +substring(@dbccrow, @s + 13, 1) +substring(@dbccrow, @s + 15, 1)FETCH NEXT FROM error_cursor INTO @dbccrowENDCLOSE error_cursorDEALLOCATE error_cursor-- Now chop first character which is the length, and cut after end.SELECT @errmsg = substring(@errmsg, 2, @msglen)GO

View 3 Replies View Related

Distribution Agent Insufficient Permissions

Jan 11, 2007

Hi,

I am trying implement replication and having problem when creating push subscription to an existing transactional replication publication.
The distribution agent is failing to run its job with the error:

Agent message code 14260. You do not have sufficient permission to run this command. Contact your system administrator.

I followed the http://msdn2.microsoft.com/en-us/library/ms151868.aspx article instructions when I set the distribution agent properties

What did I miss?

The following is the step error message:
Date        1/12/2007 2:30:01 PM
Log        Job History (105342-DB3PROD-MOMA-ArchivedTransactions-105337-DEV2-15)

Step ID        2
Server        105342-DB3PROD
Job Name        105342-DB3PROD-MOMA-ArchivedTransactions-105337-DEV2-15
Step Name        Run agent.
Duration        00:00:00
Sql Severity        0
Sql Message ID        0
Operator Emailed       
Operator Net sent       
Operator Paged       
Retries Attempted        0

Message
2007-01-12 19:30:01.258 Microsoft SQL Server Replication Agent: distrib
2007-01-12 19:30:01.258
2007-01-12 19:30:01.258 The timestamps prepended to the output lines are expressed in terms of UTC time.
2007-01-12 19:30:01.258 User-specified agent parameter values:
            -Subscriber 105337-DEV2
            -SubscriberDB MOMA
            -Publisher 105342-DB3PROD
            -Distributor 105342-DB3PROD
            -DistributorSecurityMode 1
            -Publication ArchivedTransactions
            -PublisherDB MOMA
            -XJOBID 0x65C41EBC553D96439BAF69E4DC3CC823
            -XJOBNAME 105342-DB3PROD-MOMA-ArchivedTransactions-105337-DEV2-15
            -XSTEPID 2
            -XSUBSYSTEM Distribution
            -XSERVER 105342-DB3PROD
            -XCMDLINE 0
            -XCancelEventHandle 00000000000006E8
2007-01-12 19:30:01.258 Startup Delay: 214 (msecs)
2007-01-12 19:30:01.477 Connecting to Distributor '105342-DB3PROD'
2007-01-12 19:30:01.618 Agent message code 14260. You do not have sufficient permission to run this command. Contact your system administrator.

View 5 Replies View Related

Reporting Services ListChildren

Jan 25, 2008

I have a web application the instantiates the reporting service service and calls the listChildren method with the root "/" folder and recurse set to "true". I capture the collection of items and then in subsequent code make the assumption that the collection has the folders and reports, data sources, resources in the order that the recursion from the root found them. This has been true for a year of multiple users on this web application every day. Suddenly earlier this week the collection result from listChildren started returning the items in an order it could not possibly have found them from recursion, reports deep down in the folder structure were returned ahead of the folders above them. Nothing had changed except the reporting server had 10 patches put on it overnight. We rolled back the patches and rolled them forward one at a time with reboot and testing, which seemed to restore the original behavior of listChildren but then the next morning it was back to being bad again.
SO..... I stayed up late rewriting the code to move the recursion into my program instead of trusting listChildren to do it.
BUT..... Shouldn't collection returned from listChildren("/",true) be in the order of the recursion? Arn't collections the immutable unless the program changes their order? So... What order is listChildren supposed to return? Is listChildren actually recursing through the folders and their contents, or is it just pulling the info out of a table in the reportserver database and returning the items in whatever order that table has them?

View 1 Replies View Related

ListChildren Method Does Not Return All Columns From Catalog Table

Dec 5, 2007

I am trying to use the ListChildren method to query the SSRS Catalog. I am using this as a dataset in a report. I'd like to see more columns, in particular the Description column, included in the dataset. Is there some way to tell ListChildren what columns should be included or is there some other method to obtain this information.
ListChildren returns ID, Name, Path, Type, CreationDate, ModifiedDate, CreatedBy, ModifiedBy, xmlns.

I'd prefer not to query the Catalog table directly.

Thanks
Tim

View 1 Replies View Related

Table Permissions Versus View Permissions

Aug 2, 2006

Using SQL Server 2k5 sp1, Is there a way to deny users access to a specific column in a table and deny that same column to all stored procedures and views that use that column? I have a password field in a database in which I do not want anyone to have select permissions on (except one user). I denied access in the table itself, however the views still allow for the user to select that password. I know I can go through and set this on a view by view basis, but I am looking for something a little more global.

View 5 Replies View Related

Error When Performing DTS

Nov 30, 2000

Can anyone assist me in solving this problem:

DTSTransformCopy: ValidateSchema failed; see Extended Error Information.
TransformCopy 'DTSTransformation_10' validation error: Source column too narrow to contain a valid value of destination column's datatype for column pair 1 (source column 'Col010'(DBTYPE_STR), destination column 'CHECKDAT' (DBTYPE_DBTIMESTAMP)).

Any help would be greatly appreciated.

Thanks,

Rey

View 1 Replies View Related

Performing Math Problem

Nov 19, 2003

I need to perform some division on the results of two alias columns that perform counts in a query. What is the best way to do this?

View 7 Replies View Related

Performing A Cascade Delete

Sep 3, 2002

How to delete a record from a parent table, all relating records in the child tables should also delete.
How to do it by MSSQL 7.0

ANB

View 1 Replies View Related

Performing An Insert Using NOT EXIST

Mar 8, 2005

I have two tables that I have to compare:


Table:PR
WBS1 WBS2 WBS3
123-456 1000 01
123-456 1000 02
123-456 2000 02
567-890 2000 01
567-890 2000 02

Table:PR_Template
WBS2 WBS3
1000 00
1000 01
1000 02
2000 00
2000 01
2000 02

After Insert I should have:

wbs1 wbs2 wbs3
123-456 1000 00
123-456 1000 01
123-456 1000 02
123-456 2000 00
123-456 2000 01
123-456 2000 02
567-890 1000 00
567-890 1000 01
567-890 1000 02
567-890 2000 00
567-890 2000 01
567-890 2000 02




Basically, I need to insert the wbs2 and wbs3 where it does not exist in each wbs1.

What I have now will find the values that need to be inserted for a particular project but I don't know how to go through each project and perform the insert:

Select * from PR_template Where Not Exists
(Select Wbs1, Wbs2, Wbs3 from PR where PR.WBS2 = PR_Template.WBS2
And PR.WBS3 = PR_Template.Wbs3 and pr.wbs1 = '123-456')
Order by wbs2, wbs3 asc

Thank You

View 11 Replies View Related

Performing A Hierarchical Query...

Mar 26, 2008

Hi. I'm trying to find out which "cases" have a new items added to our database. I have provided a sample layout.

ID ParentID Name CreateDate
358 2 SMITH, JOHN 3/3/2008 11:15:23 am
359 358 Invoice 3/5/2008 4:13:52 pm
360 358 Shipping 3/5/2008 5:11:09 pm
361 358 Receiving 3/6/2008 4:22:01 am

The main ID for this is 358. The invoice, shipping, and receiving items are child items. I would like to run a query that can report which cases have newly added items. This is hierarchical I guess and I'm quite lost. I hope this makes sense. Thanks for any help!

View 3 Replies View Related

Using SUM And Performing Subtraction On Columns

Sep 4, 2013

I need to do SUM on a column values and then subtract it from the SUM of values on a column from another table. I am using SQL server Management Studio, but getting the errors on the following Query

SELECT note_id, cap_int_amt)- SUM (ttl_cap_int_amt) as SUM1,
sum(orig_fee_amt)-sum(ttl_qualfyng_fee_amt) as SUM2
FROM [spstrd00_starrpt].[dbo].[rpt23t]
where [rpt20t].note_id =[rpt23t].note_id

ERROR Message
Msg 208, Level 16, State 1, Line 1
Invalid object name 'dbo.rpt23t'.
Msg 4104, Level 16, State 1, Line 7
The multi-part identifier "rpt20t.note_id" could not be bound.
Msg 207, Level 16, State 1, Line 8
Invalid column name 'ttl_qualfyng_fee_amt'.

View 4 Replies View Related

Performing A Conditional Join

Oct 10, 2007

Hello,

I want to write a query that joins data in a different table based on a column value. The table is for a "Playlist" and holds play list items. The items can be video, audio, images, etc. The playlist table looks like this:

Table_Playlist
-----------------
ID (int)
MediaType (char)
MediaId (int)

Table_Audio
-----------------
MediaId (int)

Table_Video
--------------
MediaId (int)


If the Table_Playlist.[MediaType] column value = "Audio" then I want to join to the Table_Audio table. If the value = "Video" then I need the video table.

Hope that makes sense. Thanks

View 1 Replies View Related

Performing String Operation

Mar 29, 2008

Hi,

I have got a column with the string "I too Love Sql Server". I am trying an output as shown below:

I want to divide this into 4 columns :

Column1 Column2 Column3 Column4
I too Love Sql Server I.t.L.S.S

The Column 4 contains the first letter of each word. If the string contains only 2 words, Eg: "Sql Server" then Column 2 will be empty and only Column 1,3 and 4 will be filled.

How do I do this?

View 2 Replies View Related

Performing A Query Using Two Tables

Jul 20, 2005

Hi,Have a database that contains various tables.I need to run a query on two tables.Table A contains a column called TitlesTable B contains a column called Uni_TitlesIn Table B's column it contains multiple titles as shown belowseparated by semi-colons in each row.Table B Uni-Title Column__________________________Row 1: Landlord and tenant; Leases; Rent reviewsRow 2: Acquisitions; Advisers; Appointment; Contract termTable A - Titles Column_________________________Table A's column contains a only one of the words in Table B's columni.e. Landlord and tenantI would like to obtain a count of how many times the same word orphrases appears in the column of Table B.ThanksSteve

View 2 Replies View Related

Performing FTP Using Xp_cmdshell In Ms Sql 2005

Feb 27, 2008



Hi,
I want to copy xls file from remote server to my server.
i want to use xp_cmdshell to perform this operation.
can anybody help me out how to pass parameter to xp_cmdshell.

thanks in advance,

Chetan S. Raut.

View 3 Replies View Related

Help Needed While Performing Lookup

Dec 21, 2007

I have to look up a mapping table and add 5 more columns from the mapping table if the look on the first column in the mapping table and corresponding column in source is successful.
But if there is no matching record in then mapping table I still need the record to pass through with NA values.
Please help?

View 3 Replies View Related

Performing A Very Peculiar Task

Jun 1, 2007

Hello All,

I am tackling with unique request. I have to download the ".zip" files from the https and uncompress them. Now, the fetch process works fine when I am downloading the files. Using .net and .IO namespaces from system library.

Similarly after downloading I have to uncompress the files as these files are treated by compressed file folders by windows xp. I know it can be achieved by using the IO.compression class form system namespace.
But the only trouble here is IO.compression supports ".gz" and "Gzipstream.Uncompress" and I wonder how I would be able to get the ".zip" and "Zipstream.uncompress" done.

Thanks a million in all your help and advice. Also I appreciate for your time.

Regards
Sandesh

View 1 Replies View Related

Performing Insert Query With Check

Feb 29, 2008

hii,,i am using asp.net 2005 and sql server 2005.i have a web page in which i can enter details and it gets stored in a table in a database..in the table thrs a column called as sme_id,,what i want is when one inserts a new sme_id from the page,,it should check in the table so tht no duplicate sme_id wil b generated..,,this code is workin fine,,i just want to implement the above condition...here is the insert code which i have used along with sql datasource:::__________________________
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
ConnectionString="<%$ ConnectionStrings:sme_trackerConnectionString %>"
InsertCommand="INSERT INTO SME_Master(SME_Id, FirstName, LastName, Type_of_SME, Agency_id, Agency_Name, Email, Address, Phone, Mobile, Fax, TimeZone_Id, Experience, City, State, Status, Level_Of_Exam, Other_Comments, Certificate, Expertise)
 VALUES (@SME_Id, @FirstName, @LastName, @Type_of_SME, @Agency_id, @Agency_Name, @Email, @Address, @Phone, @Mobile, @Fax, @TimeZone_Id, @Experience, @City, @State, @Status, @Level_Of_Exam, @Other_Comments, @Certificate, @Expertise)"
OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [SME_Master]">
_______hope u got my problem,,,,,reply asap....thnks in advance

View 11 Replies View Related

Software For Performing Mass Design Changes

Jun 28, 2001

Hi,

I was wondering if anyone knows of any way, including third party tools, to replicate a design change on a table across many different databases. I have written an ASP script that allows me to copy multiple tables to multiple databases in one go but I need something that will allow me to replicate the design of a table by comparing source and destination tables. So far I have scripted most of it but I have no idea on which system table to get the identity information and it seems there must be an easier way!

Any help would be appreciated,

Seoras

View 1 Replies View Related

Performing Backups Using Network Resource

Sep 16, 1998

I`m having difficulty performing a SQL dump using a network drive. I have successfully created a backup device on a network drive but when I go to perform a backup using it I get the following error message: "Can`t open dump device `RSS4DATARSA3_Dump.Dat`, device error or device off line. Please consult the SQL Server error log for more details. (Message 3201)" I can successfully perform a backup using a local drive but not this network drive. I have checked the permissions on the network drive and is seems ok. I use the following command to try to perform the backup: "DUMP DATABASE RSA3 TO DISK = `Rss4DataRSA3_Dump.Dat WITH STATS = 10, INIT". Any help would be most appreciated. Thanks in advance!

View 2 Replies View Related

Performing Select Stmts. Using 2 Servers

May 25, 2002

It just seems like I should be able to use a 4 part naming convention to compare database tables that exist on 2 servers. It isn't always possible to link dbs because of security. Is there any other way to query between servers?

Thanks!

View 3 Replies View Related

Performing Statistics In SELECT Statement

May 30, 2008

I have listed below a sql statement generated by a MS Access query. The Access is the frontend, using a SQL Server 2005 View as the backend. I have already corrected the obvious differences between Access and SQL Server syntax, such as replacing UCase$ with UPPER,
replacing '_' with '.' between the db owner and view name, replacing IIF with IF, and replacing "D" with 'D' and "E" with 'E', but it still generates syntax errors (of course, with no explanation). As you can see, it is SUMing a field based on whether the value is 'D' or 'E', then using those calculated values to calculate a percentage. Can anyone out there let me know what I'm doing wrong?

SELECT dbo_vwDisplayUserList.DEPT_DESC, Sum(IIf(UCase$([Essential_Code])="D",1,0)) AS Department_Essential, Sum(IIf(UCase$([Essential_Code])="E",1,0)) AS EOC_Essential, Count(dbo_vwDisplayUserList.UserID) AS Total_Employees, Int([Department_Essential]/[Total_Employees]*100) AS [%Department_Essential], 100-Int([Department_Essential]/[Total_Employees]*100) AS [%EOC_Essential]
FROM dbo_vwDisplayUserList
GROUP BY dbo_vwDisplayUserList.DEPT_DESC
ORDER BY dbo_vwDisplayUserList.DEPT_DESC

View 1 Replies View Related

Get Identifier Back After Performing INSERT

Feb 8, 2006

Basically I have a table with 2 fields UserId (string) and UserName (uniqueidentifer). The default value for UserId is newid().

I can perform an insertion with
INSERT INTO MyTable(UserName) VALUES ('Foo Bar');

But I would like to retrieve the UserId that has just been created. How do I achieve that?

Thanks in advance,
Joannes

View 3 Replies View Related

Query On Performing Recursive Joins

Apr 14, 2007

I have a single table named PROCESS which contain following three fields

ProcessID
ParentID,
info

* Every process have a unique ProcessID and ave single parent process which is identified by ParentID.

* If a process does not have a Parent then its ParentID value is -1.

*Only single level of Parent-child hierarchy is maintained.


Can anyone please tell me the Query that uses Recursive JOINS to retrieve the ProcessID s based in following Conditions.

1. if the Parent's 'info' field contains given value then retrieve all the process under it.
2. Retrive all the process whose 'info' contains given value and excluding the Processes resulted from 1st conditiion

Thanks in advance

Bharath Booshan L

View 2 Replies View Related

Problem Performing Remote Queries

Aug 16, 2007

I am trying to a simple insert statement from a remote applicationagainst a sql server 2005 database. To fix the problem I was having,I had to grant the Login I was using the role of sysadmin. However Idon't want this user to have that kind of control, what would be thebest role to allow the user full access(including remoting) to onlyone particular database?

View 5 Replies View Related

Performing A Whitespace-insensitive Query

Jul 20, 2005

Hi,I am trying to concoct a query that will join rows on the basis of awhitespace insensitive comparison. For instance if one row has the value'a<space>b' and another has the value 'a<space><space>b' I want them to beconsidered equal (but not the same as 'ab')I am happy to do some T-SQL if that helps. Also I have a full-text index onthe column in question, but note that I am comparing rows against eachother, not to a fixed string.This is for a one-off job, so if there is no obvious way to do it on thedatabase, I will just bcp out the data and knock up some perl or somethingto do it. All other things being equal I would rather do it on the databasethough.Many thanksAndy

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved