.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Imran Ghani
Post New Web Links

xp_cmdshell not executing for fixed server role.

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :Sql Server
 
Hi all, i hope you can help me. i am logon into sql server 2005 using my windows account. i am trying to execute xp_cmdshell from my account as i am member of fixed server role (sysadmin acouunt). when i am executing xp_cmdshell , its running under ##xp_cmdshell_proxy_account## "Proxy acoount".  please help me to run under sysadmin account .


View Complete Post


More Related Resource Links

Need help with setting up SQL Server 2008 for role/user management

  

I've posted my problem in a few other categories.  Sorry for that.  I didn't see the security category until now.

I'm trying to use ASP.NET's built-in role/user management for a couple ASP.NET MVC 2 sites.  I'm using the MVCMusicStore as my guide.  I click on the Configuration Tool as the tutorial suggests, which launches the site administration page.  Unfortunately when I click on the security tab, I get an error that it cannot connect to the data store.  Attempting to test the AspNetSqlProvider gives me a similar error.

I've run the aspnet_regsql program as the error message suggested, and I have a role/user management database ready to go on the server.  The proper tables are constructed, and all that.  The configuration tool still doesn't see the data store.

As a test, I ran the MVCMusicStore demo in the debugger.  Its role/user management functionality worked.  I was able to add myself as a customer, and add/remove items from my cart with no errors or exceptions.  However, when I attempted to access its security tab in the configuration tool, I received the same error as I get for my own project.  How is it possible that role/user management works, but the configuration tool cannot change its settings?

Any suggestions on how I can get the configuration t

Trouble executing ASP.NET app on 64-bit server

  
Hi,I have an asp.net webapp that uses some unmanaged code and 3rd party pre-compiled libraries that I am pretty sure are 32-bit.  We developed this on a 32-bit machine with a 32-bit development windows server.  Now we are moving our web site to production where the box has Windows Server 2003 64-bit.  I was getting W3SCV errors about the framework at first:http://s18.photobucket.com/albums/b116/dtdono0/DOTNET/ISAPI_002.jpg I followed the instructions on this blog that talks about enabling the 32-bit version of ASP.NET: http://support.microsoft.com/kb/894435Now I get a new error and I cannot find any documentation on it.  http://s18.photobucket.com/albums/b116/dtdono0/DOTNET/ISAPI_001.jpgI looked up the error code 0x000000c1 and got the following:C:\Err>err 000000c1# for hex 0xc1 / decimal 193 :  SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION                       bugcodes.h  SQL_193_severity_15                                           sql_err# The object or column name starting with '%.*ls' is too# long. The maximum length is %d characters.  ERROR_BAD_EXE_FORMAT                                          winerror.h# %1 is not a valid Win32 application.# 3 matches found for "000000c1"This really doesn't tell me much.  Any ideas?

Error while executing a package through SQL Server Agent

  
Hi All,   I have a ssis package. It has 3 tasks, first task updates a record in Oracle database to set an Indicator to “Y”, second task process SSAS Cube and the third again updates the same record and sets the indicator to “N”. This package has 2 data sources, one is Oracle and the other is Analysis Services. I gave the credentials for the Oracle and use NT Authority for Analysis services.   When I am executing from BIDS package is executing successfully. But when I am calling the job to execute this package its throwing me the error. Below is the error.     Message Executed as user: User\Username. ...ion 9.00.4035.00 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  10:57:46 AM  Error: 2010-08-27 10:57:46.79     Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.  End Error  Error: 2010-08-27 10:57:47.16     Code: 0xC0202009     Source: Ord_test Connection manager &q

Solution deployment requires executing execadmsvcjobs command on search server to complete deploymen

  
We have multiple Sharepoint 2007 farms and deploy custom code weekly to the farms. On one o the farms it is required to run stsadm -o execadmsvcjobs on the Search server in the farm in order for solution deployments to complete deploying. These are solution recycles that we are running. This is the only farm this happens on and all farms are identical. In central admin it shows the solution state as deploying. Farm Config Sharepoint 2007 SP2 w Dec Cumulative updates 1 WFE 1 Search server 1 SQL server

Administrative Commands via XP_CmdShell in SQL Server 2005

  
SQL Server 2005: Microsoft SQL Server Enterprise Edition (64-bit) Microsoft Windows NT 5.2 (3790) SQL Version 9.00.3175.00   I have 2 identical servers... one for DEV and one for TEST. On the DEV server, I can use xp_cmsdhell to execute "administrative commands" such as NET SHARE and AT. On the identically configured TEST server, I can not. Those command return the "System error 5 has occurred. Access is denied" error. I CAN run other commands via xp_cmdshell (DIR, NET USE, etc.). This is true regardless of the account I connect as.   The SQL Server service accounts in both instances are domain accounts belonging to the local admin group.   I "know" that I ran across this when setting up the DEV server and am "fairly sure" I found a reference to a known problem with 2005's xp_cmdshell and administrative commands. But for the life of me I can not now find any such reference, nor can I find any differences between the DEV and TEST servers in the area of users, groups, policies, or anything else security-related. (99.9% of the internet searches I do end up being about either enabling xp_cmdshell -- done -- or setting up an xp_cmdshell proxy account -- not needed).   Any input is greatly appreciated.   Thanks! -dave

copy folder from one server to the next using xp_cmdshell

  
Hello, I have to copy a folder from one server to another. I would like to use xp_cmdshell to accomplish this, but I am not sure if I have to create a batch file, or if I can just embed the commands right in xp_cmdshell. My DOS knowledge is limited, so I always dread these types of tasks. Any help would be appreciated and that you all in advance :)   DaveDave SQL Developer

Problem with users needing sysadmin server role to connect to db

  
When we create a new user in SQL Management Studio 2005 and give it just the public server role, it does not allow us to connect to the db. We found that we had to give it the sysadmin server role in order to allow it to connect to the db. We are using a UDL file in order to test connect. It seems that this is true for all users we create in SQL Management Studio 2005. Is there a way where we can change it so that users are not required to have the sysadmin server role in order to connect to a db? We would like it so that if they have at least the public server role, they should be able to connect to the db.

Migrating ASPNET Role/Membership Database to New Server

  

Hello,

I have an existing ASPNET role/membership database created on SQLExpress 2005 (WIndows 2003 Server). I created it under the .NET 3 framework many years ago using the aspnet_regsql.exe application in full GUI mode. 

I am setting up a new Windows 2008R2 server with .Net Framework 4 and SQL Server 2008R2. I don't want users to have to recreate accounts or create roles, etc.

So...

1. Should I backup the current database and import it into the new system, and if so do I even need to use the aspnet_regsql.exe application. (If so which version do I use, different aspnet_regsql.exe files exist in different directories (i.e., FrameWork, FrameWork64)


2. Should I just run aspnet_regsql.exe on its own and then somehow try to import the current data into those tables.


I am concerned that if I just import somehow the roles within SQL server will not be created properly. 

thanks in advance,

mitch


Sql Server Agent stops executing jobs

  

Hello everyone.  I'm having a problem with the sql server agent occasionally not executing its scheduled jobs, and unless the sql server agent is restarted they will not execute according to their schedule.  I've read many posts on people having problems with running a package manually and then not being able to run it in a job, although that is not my problem since these are jobs that have all run successfully historically, and only until the agent is restarted do they start working again.  It is the strangest thing.....we have many different jobs on this server and all of them will just mysteriously stop being executed.  Two other things of note, the agent and server processes both run on AD accounts, and we receive this error:

 

SQL Server Scheduled Job 'X' - Status: Failed - Invoked on: 2007-10-27 02:00:00 - Message: The job failed.  Unable to determine if the owner (AD\adacct) of job 'X' has server access (reason: Unable to connect to server - check SQL Server and SQL Server Agent errorlogs).

 

Any help would be greatly appreciated.

executing stored procedure from different server

  

'Hi All,

If have two servers A and B.I have a stored procedure in server A.But i need to execute the Stored procedure from server B.

i have a job in server B, in the step of that job,it should be executing the stored procedure from Server A. how can we do this.there is no linked server.

Exec sp_prcLoadData (this is in server A,but i need to execute it from Server B.)

 

Thanks in Advance


executing stored procedure from different server

  

'Hi All,

If have two servers A and B.I have a stored procedure in server A.But i need to execute the Stored procedure from server B.

i have a job in server B, in the step of that job,it should be executing the stored procedure from Server A. how can we do this.there is no linked server.

Exec sp_prcLoadData (this is in server A,but i need to execute it from Server B.)

 

Thanks in Advance


NT Authority \System Account Having SysAdmin Server Role

  

Looking to tighten security access to a SQL Server 2008 instance based on Windows 2003 Server clusters.

Is their any downside risk to revoking the sysadmin role from this account?  We've established all our services to run under domain service accounts we had set up.

Are there features or functions in SQL 2008 that depend on this account being present and having elevated priviledges?

 

thks

 


Slow performance with SQL Server 2005 executing parameterized queries with LIKE and an aggregate com

  

We have a slow-performing query and, after some analysis, have narrowed the cause down to using parametrized queries in conjunction with LIKE and aggregate comparisons used in the WHERE clause.  If we use a non-parametrized query (but keep the WHERE clause the same) the query performs much faster and, in fact, executes a different plan.  Using OPTIMIZE FOR UNKNOWN is not an option for us as we are using SQL Server 2005.  Obviously, we'd like to use parametrized queries to prevent SQL injection but the slow perf is unacceptable.  We need the LIKE to support wildcard scenarios.  If we need to we'll use dynamic SQL (scrubbed as much as we can) in lieu of parametrized queries.  We're wondering, however, is there another option that would give us the perf without sacrificing safety?  I can provide a sample database, query, plans, etc. if necessary...I'm assuming SQL Server generates a less efficient plan with the parametrized query as it can't make any assumptions about the parameter values...

Mike Bouck


Slow performance with SQL Server 2005 executing parameterized queries with LIKE and an aggregate com

  

We have a slow-performing query and, after some analysis, have narrowed the cause down to using parametrized queries in conjunction with LIKE and aggregate comparisons used in the WHERE clause.  If we use a non-parametrized query (but keep the WHERE clause the same) the query performs much faster and, in fact, executes a different plan.  Using OPTIMIZE FOR UNKNOWN is not an option for us as we are using SQL Server 2005.  Obviously, we'd like to use parametrized queries to prevent SQL injection but the slow perf is unacceptable.  We need the LIKE to support wildcard scenarios.  If we need to we'll use dynamic SQL (scrubbed as much as we can) in lieu of parametrized queries.  We're wondering, however, is there another option that would give us the perf without sacrificing safety?  I can provide a sample database, query, plans, etc. if necessary...I'm assuming SQL Server generates a less efficient plan with the parametrized query as it can't make any assumptions about the parameter values...

Mike Bouck


SQL job status say executing but target server become unavailable

  

i am executing SSIS package as Sql Job, inserting into DB2 table from SQL Server. When DB2 server become unavailable, SSIS job executing without any failure.

All settings and properties are default, is there any setting need to change to force SSIS package fail.

little confusing, how SQL job status say executing but target server become unavailable?

Thanks

V


Is the bug 50002514 has been fixed in SQL Server 2008 R2?

  

We are planning a migration from SQL Server 2005 to SQL Server 2008 R2, but it seems that the Bug #: 50002514 (http://support.microsoft.com/kb/949687/en-us) was not fixed in 2008 R2.

My test configuration:

- Windows 2008 R2 Server, Standard 64 bit (7600)

- Sql 2008 R2 Server Developer Edition 32 bit (10.50.1600.1), two instances (A and B) installed and linked ( A->B and A<-B).

Our software reports an error from SQL Server 2008 R2: "(3970) This operation conflicts with another pending operation on this transaction. The operation failed." On another test system with the same software using SQL Server 2005 SP3 (32-Bit)/Windows Server 2008 R2 everything works just fine.

Is anything wrong with my configuration (64/32-bits mixup) or this problem is related to SQL Server 2008 R2 itself and therefore it can be fixed sooner or later?

Thanks


Adding user to SSAS server role not working

  

I have SQL Server 2005 SP3 installed on  Windows 7

 

 I’m trying to deploy a SSAS project and get the message

 

“Either the user, Ron-laptop\ron, does not have access to the analysis services Project2 database, or the database does not exist”

 

Following recommendations in the forum I’ve used SSMS to view the properties > security of the SSAS connection and am trying to add myself to “The server role is used to grant server-wide security privileges to a user” role

 

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend