Exception :DBD, [Microsoft][SQL server] ..State: 42000
Hi All,
I have this technical environment:
-BOXIR3.1.
-DB: SQL server 2005.
-OS: Windows server 2003.
When i try to create a report under Deski, with 2 objects, i get this error:
"Exception: DBD, [ ODBC SQL Server Driver][SQL Server]Impossible
de préparer les insctruction.state:42000"
Note : I have tried all the tests(under the server, with administrator account.. ) but i get the same problem under Deski, but under Webi when i create the same Query nothings happen, in other words it works.
I have copied the SQL query:
SELECT
count (distinct (convert(char
(10),dbo.Tbld_CLI_PMSI_RSS.CLI_Donn_NoAbsEpisode)'_'convert(char
(10),dbo.Tbld_CLI_PMSI_RSS.CLI_Donn_NoRSS))),
year(( dbo.Tbld_CLI_PMSI_RSS.CLI_Date_Entree ))
FROM
dbo.Tbld_CLI_PMSI_RSS
*I activated the log, and i send you the 3 *
interesting line:
1- 2009/04/23 16:23:46.449|==| | | 3296|3924| |||||||||||||||BOCSHelper::DoRealCSDescribe( SELECT count (distinct (convert(char(10),dbo.Tbld_CLI_PMSI_RSS.CLI_Donn_NoAbsEpisode)'_'convert(char(10),dbo.Tbld_CLI_PMSI_RSS.CLI_Donn_NoRSS))), year(( dbo.Tbld_CLI_PMSI_RSS.CLI_Date_Entree )) FROM dbo.Tbld_CLI_PMSI_RSS )
2- sqlboAsyncNet.cpp:83:void __cdecl job_thread::Describe|E| | 3296|2044| |||||||||||||||job_thread::Describe : DBD:[Microsoft][ODBC SQL Server Driver][SQL Server]Impossible de préparer les instructions.
Thank you for any suggestion.
Regards,
Aimen
Edited by: Aimen Akriche on Apr 24, 2009 10:35 AM
Edited by: Aimen Akriche on Apr 24, 2009 10:36 AM
Hi Aimen,
Following solution might be helpful in resolving the issue.
SQL statement is case sensitive in Business Objects.
Follow these steps:
Test the connection in your universe and click Details.
From Details, copy and run the path for the PRM file used by your connection which will open the relevant PRM file in Notepad.
Modify the following parameter (or add to the PRM file if it does not exist) as follows:
<Parameter Name="CASE_SENSITIVE">N</Parameter>
Save the PRM file.
Close and relaunch Designer.
Regards,
Sarbhjeet Kaur
Similar Messages
-
Exception: DBD, MicrosoftODBC SQL Server DriverSQL ServerStatement(s)
Hello Experts,
When i put the following SQL statment in the Univesre i am getting the error.
Exception: DBD, MicrosoftODBC SQL Server DriverSQL ServerStatement(s) could not be prepared.State:42000
Code.
QAS.qas.CRMD_ORDERADM_I.ORDERED_PROD = QAS.qas.ZCOMV_PR_CAT.PRODUCT_ID AND
QAS.qas.CRMD_PARTNER.PARTNER_FCT= CASE QAS.qas.ZCOMV_PR_CAT.CATEGORY_ID_MAST WHEN 'ZUCORD' THEN 'ZCRMBY' ELSE '00000001 ' END
Regards,
Shiva Kumar G.CThe correct syntax for case statements is:
CASE WHEN condition = outcome then result WHEN condition2 = outcome2 then result2 ELSE result3 END
I think the first bit is a touch disjointed.
What is the logic that you are trying to represent? -
Hi,
I am currently receiving the following error in BI Answers when I run a query against a Microsoft SQL 2005 Server.
View Display Error
Odbc driver returned an error (SQLExecDirectW).
Error Details
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 16001] ODBC error state: 60 code: 8180 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Statement(s) could not be prepared.. [nQSError: 16001] ODBC error state: 60 code: 102 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Incorrect syntax near 'UserName'.. [nQSError: 16002] Cannot obtain number of columns for the query result. (HY000)
SQL Issued: SELECT 0 s_0, "SD&A_Dashboard_Test"."BORIS_ALIAS_ETMS_Users"."Id" s_1, "SD&A_Dashboard_Test"."BORIS_ALIAS_ETMS_Users"."UserName" s_2 FROM "SD&A_Dashboard_Test" WHERE ("BORIS_ALIAS_ETMS_Users"."UserName" = 'trowe') FETCH FIRST 65001 ROWS ONLY
I am able to connect successfully to the Data Source and run a query against the database using the NQCMD command line tool so believe I have configured the DataDirect 7.0.1 drivers correctly, also I am able to view the Table Data in the RPD Physical Layer in the BI Administration Tool. So don't understand why I am getting this error.
I have also activated the nquery.log but that doesn't really give me any further information.
[2015-04-28T16:37:22.000+00:00] [OracleBIServerComponent] [TRACE:4] [USER-34] [] [ecid: 4a9e440f990ba0a4:-1995d2c5:14d00d3ef04:-8000-00000000000001c6,0:1:1:5] [tid: 5f] [requestid: 6f11000b] [sessionid: 6f110000] [username: borisdev] -------------------- Query Status: [nQSError: 16002] Cannot obtain number of columns for the query result. [[
[nQSError: 16001] ODBC error state: 60 code: 102 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Incorrect syntax near 'UserName'..
[nQSError: 16001] ODBC error state: 60 code: 8180 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Statement(s) could not be prepared..
[nQSError: 43119] Query Failed:
I was wondering if anyone could shed any light on what could possibly be causing the [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Incorrect syntax near 'UserName'.. error ? And also provide any suggestions on how I can troubleshoot this issue further as I am now completely out of ideas of what to do next having tried numerous things i.e. setting IDENTIFIER_QUOTE_CHAR = '' in DBFeatures.INI which I found in similar posts on the subject all to no avail
Regards,
Tom RoweHi Rajagopal,
Thanks for your reply after doing some further investigations this morning I found and corrected the problem...
The DataDirect Driver does not like double quotes in the query for some reason, testing using the BI Answers generated SQL with the nqcmd tool below...
With double quotes “” it fails immediately
Give SQL Statement: select T18706."Id" as c1, T18706."UserName" as c2 from "ETMS_Users" T18706 where ( T18706."UserName" = 'trowe' )
select T18706."Id" as c1, T18706."UserName" as c2 from "ETMS_Users" T18706 where ( T18706."UserName" = 'trowe' )
[102][State: S1000] [DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near 'Id'.
Statement execute failed
With double quotes removed for just the columns I now get the Error near ‘ETMS_Users’ which still had the double quotes
Give SQL Statement: select T18706.Id as c1, T18706.UserName as c2 from "ETMS_Users" T18706 where ( T18706.UserName = 'trowe' )
select T18706.Id as c1, T18706.UserName as c2 from "ETMS_Users" T18706 where ( T18706.UserName = 'trowe' )
[102][State: S1000] [DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near 'ETMS_Users'.
Statement execute failed
With all double quotes removed it works !
Give SQL Statement: select T18706.Id as c1, T18706.UserName as c2 from ETMS_Users T18706 where ( T18706.UserName = 'trowe' )
select T18706.Id as c1, T18706.UserName as c2 from ETMS_Users T18706 where ( T18706.UserName = 'trowe' )
c1 c2
42499 trowe
Row count: 1
Give SQL Statement:
The solution to fix the problem is...
In the BI Admin Tool Physical Layer Database, Properties Features tab is to delete the double quote in the Value column for IDENTIFIER_QUOTE_CHAR, setting this in the DBFeatures.INI file does not resolve the problem possibly it did in earlier versions of the product.
Regards,
Tom Rowe -
I received the following error when I gave the following statement in select:
case when {fn_year(FINANCE_PERIOD.FP_START)} @prompt('Enter Year','N',,mono,free)
then 1 else 0
end
Parse failed: Exception: DBD, [Microsoft][ODBC SQL Server Driver] Syntax Error or access violationState: 42000
I looked at differnt forums but could not fnd the error.Sams Latin
then try this:
CASE
WHEN YEAR(FINANCE_PERIOD.FP_START) = @Prompt('Enter Year','N',here give class/object or LOV's,mono,free) THEN 1 ELSE 0
END
Note: In case of Date , you can make it blank (3rd parameter), which gives you calendar at runtime.
I suggest you try it in step by step like:
>> @Prompt('Enter Year','N',here give class/object or LOV's,mono,free)
Parse it, succeed. Then
>> YEAR(FINANCE_PERIOD.FP_START)
Parse it, then
for each case see LOV's.
>> at last, try above CASE WHEN
Hope it solves you.
I'm Back
Merry Christmas -
Binding in Prepared Statement is not working with Microsoft SQL Server JDBC
I ran the following program with sqljdbc4.jar in the class path. There is data in the EMPLOYEE table for the employee name DEMO but the following program is not retrieving data for DEMO. When the same program was run with Merlia.jar in the class path, it was retrieving data for DEMO.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection con = DriverManager.getConnection("jdbc:sqlserver://SERVER23:5000;databaseName=TESTDB", "SYSADM", "SYSADM");
String sqlSele = "SELECT * FROM EMPLOYEE WHERE EMPNAME like ?" ;
PreparedStatement sts = con.prepareStatement(sqlSele);
sts.setString(1, "DEMO" );
ResultSet rs = sts.executeQuery();
while(rs.next())
System.out.println("driverConn.main()" + rs.toString());
catch(Exception e)
System.out.println(e);
e.printStackTrace();
Can someone help me out from this issue.This is the program that I used for testing the behaviour of prepared statement with sqljdbc4.jar. Also included the code for Merlia.jar.
import java.sql.*;
public class driverConn {
public static void main(String [] a)
try{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
//Class.forName("com.inet.tds.TdsDriver");
Connection con = DriverManager.getConnection("jdbc:sqlserver://SERVER23:5000;databaseName=TESTDB", "SYSADM", "SYSADM");
//Connection con = DriverManager.getConnection("jdbc:inetdae7a:SERVER23:5000?database=TESTDB", "SYSADM", "SYSADM");
String sqlSele = "SELECT * FROM EMPLOYEE WHERE EMPNAME like ?" ;
//String sqlSele = "SELECT * FROM EMPLOYEE WHERE EMPNAME like ‘%DEMO%’”;
PreparedStatement sts = con.prepareStatement(sqlSele);
sts.setString(1, "DEMO" );
//sts.setString(1, "%DEMO%" );
java.sql.ResultSet rs = sts.executeQuery();
while(rs.next())
System.out.println("EMPNAME is " + rs.getString(“EMPNAME”) + “”); }
catch(Exception e)
System.out.println(e);
e.printStackTrace();
Following are the specifications:
Version of the Driver:
Microsoft JDBC Driver 4.0 for SQL Server CTP3
Downloaded the driver using the link http://www.microsoft.com/download/en/details.aspx?id=11774
Java Version:
Java 1.7.0_02
Database Version:
Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64) -
Dear Experts,
i am getting the below error when i was giving * (Star) to view all the items in DB
[Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. 'Items' (OITM) (OITM)
As i was searching individually it is working fine
can any one help me how to find this..
Regards,
Meghanath.SDear Nithi Anandham,
i am not having any query while finding all the items in item master data i am giving find mode and in item code i was trying to type *(Star) and enter while typing enter the above issue i was facing..
Regards,
Meghanath -
BO XI 3.1 in Webi Rich Client, i get this when I use the default Audit Universe to run the Sample Auditing Report.
A database error occured. The database error text is: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) Could not prepared..(WIS 10901)
In infoview webi i get this,
A Database error occured. The database error text is: [Microsoft][ODBC driver Manager] Data source name not found and no default driver specified. (WIS 10901)
We tried checking all the rights and we are trying this using the Administrator user. Also tried logon to Desinger, Import Auditing Universe and Verify the Parameters and then re exported. Still not workingHi Prasanth,
Thanks for your suggestions and I tried all that what I can do along with your suggestion, and still getting the same error, all the connection are working fine, but when I checked for Integrity, Parse Object and Cardinality I was getting some Object error and cardinality error, which am trying to resolve, so I think am having a wrong version of the Activity Universe.
Thanks for your suggestion.
Thanks and Regards
Senthil -
Hi all
I'm trying to install SQL 2008 Express on my Computer: Hp compact DX7300 Slim tower.
and get this error:
TITLE: Microsoft SQL Server 2008 Setup
The following error has occurred:Error reading from file d:\8268cd7b247d294de359c9\x86\setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn\Template\msdbdata.mdf. Verify that the file exists and that you can access it.
Click 'Retry' to retry the failed action, or click 'Cancel' to cancel this action and continue setup.
For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.1823.0&EvtType=0xF45F6601%25401201%25401
Log file
Overall summary:
Final result: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
Exit code (Decimal): -2068643839
Exit facility code: 1203
Exit error code: 1
Exit message: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
Start time: 2014-12-09 23:22:03
End time: 2014-12-09 23:40:28
Requested action: Install
Log with failure: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\sql_engine_core_inst_Cpu32_1.log
Exception help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.1823.0
Machine Properties:
Machine name: VISTA-PC
Machine processor count: 2
OS version: Windows Vista
OS service pack: Service Pack 1
OS region: United States
OS language: English (United States)
OS architecture: x86
Process architecture: 32 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature
Language Edition Version Clustered
Package properties:
Description: SQL Server Database Services 2008
SQLProductFamilyCode: {628F8F38-600E-493D-9946-F4178F20A8A9}
ProductName: SQL2008
Type: RTM
Version: 10
SPLevel: 0
Installation location: d:\8268cd7b247d294de359c9\x86\setup\
Installation edition: EXPRESS
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: False
AGTSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Disabled
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASDOMAINGROUP: <empty>
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: *****
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CONFIGURATIONFILE: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\ConfigurationFile.ini
ENABLERANU: True
ERRORREPORTING: False
FEATURES: SQLENGINE,REPLICATION
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: *****
HELP: False
INDICATEPROGRESS: False
INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft SQL Server\
INSTANCEID: SQLExpress
INSTANCENAME: SQLEXPRESS
ISSVCACCOUNT: NT AUTHORITY\NetworkService
ISSVCPASSWORD: *****
ISSVCSTARTUPTYPE: Automatic
MEDIASOURCE: d:\8268cd7b247d294de359c9\
NPENABLED: 0
PID: *****
QUIET: False
QUIETSIMPLE: False
RSINSTALLMODE: FilesOnlyMode
RSSVCACCOUNT: <empty>
RSSVCPASSWORD: *****
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: <empty>
SQLBACKUPDIR: <empty>
SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS
SQLSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
SQLSVCPASSWORD: *****
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: VISTA-PC\VISTA
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: False
TCPENABLED: 0
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\ConfigurationFile.ini
Detailed results:
Feature: Database Engine Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Feature: SQL Server Replication
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\SystemConfigurationCheck_Report.htm
I will very appriciate if someone can help me solve it. I was trying to set Full control for my account in Properties/Security of root folder and try again but error is still.
Many thanksHi Foreverduy,
Before you run SQL Server 2008 express setup, make sure that you have installed Windows installer 4.5 and.NET Framework 3.5 SP1 manually. For more information about the process, please refer to the article:
http://msdn.microsoft.com/en-us/library/ms143506(v=sql.100).aspx. Moreover, please turn off all the third-party softwares which could prohibit the installation process.
According to your error message, the issue could be due to that your account has no rights to install SQL Server, or the corruption on the media.
Firstly, please ensure that your account has admin rights. Also make sure that you right-click the setup.exe and choose “Run as administrator” to complete the installation.
Secondly, please check if "msdbdata.mdf" file exists at d:\8268cd7b247d294de359c9\x86\setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn\Template. If it exists, please make sure that your account has read permission to the extracted
folder.
However, if the file doesn't exist in the extraction, the media could be corrupt. Please download the
media
again and check if the issue still occurs.
Regards,
Michelle Li -
I have created a user and given him the owner rights for the database. Though I can LogIn as the user, I cannot access the databases. I am having the error mesage:
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The SELECT permission was denied on the object 'extended_properties', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=229&LinkId=20476
Sha_woopSince there are so many possibilities for what might be wrong. Here's another possibility to look at. I ran into something where I had set up my own roles on a database. (For instance, "Administrator", "Manager", "DataEntry", "Customer",
each with their own kinds of limitations) The only ones who could use it were "Manager" role or above--because they were also set up as sysadmin because they were adding users to the database (and they were highly trusted). Also, the users that
were being added were Windows Domain users--using their domain credentials. (Everyone with access to the database had to be on our domain, but not everyone on the domain had access to the database--and only a few of them had access to change it.)
Anyway, this working system suddenly stopped working and I was getting error messages similar to the above. What I ended up doing that solved it was to go through all the permissions for the "public" role in that database and add those permissions to
all of the roles that I had created. I know that everyone is supposed to be in the "public" role even though you can't add them (or rather, you can "add" them, but they won't "stay added").
So, in "SQL Server Management Studio", I went into my application's database, in other words (my localized names are obscured within <> brackets): "<Computername> (SQL Server <version> - sa)"\Databases\<MyAppDB>\Security\Roles\Database
Roles\public". Right-click on "public" and select "Properties". In the "Database Role Properties - public" dialog, select the "Securables" page. Go through the list and for each element in the list, come up with an SQL "Grant" statement to
grant exactly that permission to another role. So, for instance, there is a scalar function "[dbo].[fn_diagramobjects]" on which the "public" role has "Execute" privilege. So, I added the following line:
EXEC ( 'GRANT EXECUTE ON [dbo].[fn_diagramobjects] TO [' + @RoleName + '];' )
Once I had done this for all the elements in the "Securables" list, I wrapped that up in a while loop on a cursor selecting through all the roles in my roles table. This explicitly granted all the permissions of the "public" role to my database roles.
At that point, all my users were working again (even after I removed their "sysadmin" access--done as a temporary measure while I figured out what happened.)
I'm sure there's a better (more elegant) way to do this by doing some kind of a query on the database objects and selecting on the public role, but after about half and hour of investigating, I wasn't figuring it out, so I just did it the brute-force method.
In case it helps someone else, here's my code.
CREATE PROCEDURE [dbo].[GrantAccess]
AS
DECLARE @AppRoleName AS sysname
DECLARE AppRoleCursor CURSOR LOCAL SCROLL_LOCKS FOR
SELECT AppRoleName FROM [dbo].[RoleList];
OPEN AppRoleCursor
FETCH NEXT FROM AppRoleCursor INTO @AppRoleName
WHILE @@FETCH_STATUS = 0
BEGIN
EXEC ( 'GRANT EXECUTE ON [dbo].[fn_diagramobjects] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT EXECUTE ON [dbo].[sp_alterdiagram] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT EXECUTE ON [dbo].[sp_creatediagram] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT EXECUTE ON [dbo].[sp_dropdiagram] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT EXECUTE ON [dbo].[sp_helpdiagramdefinition] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT EXECUTE ON [dbo].[sp_helpdiagrams] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT EXECUTE ON [dbo].[sp_renamediagram] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[all_columns] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[all_objects] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[all_parameters] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[all_sql_modules] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[all_views] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[allocation_units] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[assemblies] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[assembly_files] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[assembly_modules] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[assembly_references] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[assembly_types] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[asymmetric_keys] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[certificates] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[change_tracking_tables] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[check_constraints] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[column_type_usages] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[column_xml_schema_collection_usages] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[columns] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[computed_columns] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[conversation_endpoints] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[conversation_groups] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[conversation_priorities] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[crypt_properties] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[data_spaces] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[database_audit_specification_details] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[database_audit_specifications] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[database_files] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[database_permissions] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[database_principal_aliases] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[database_principals] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[database_role_members] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[default_constraints] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[destination_data_spaces] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[event_notifications] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[events] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[extended_procedures] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[extended_properties] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[filegroups] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[foreign_key_columns] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[foreign_keys] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[fulltext_catalogs] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[fulltext_index_catalog_usages] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[fulltext_index_columns] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[fulltext_index_fragments] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[fulltext_indexes] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[fulltext_stoplists] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[fulltext_stopwords] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[function_order_columns] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[identity_columns] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[index_columns] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[indexes] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[internal_tables] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[key_constraints] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[key_encryptions] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[message_type_xml_schema_collection_usages] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[module_assembly_usages] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[numbered_procedure_parameters] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[numbered_procedures] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[objects] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[parameter_type_usages] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[parameter_xml_schema_collection_usages] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[parameters] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[partition_functions] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[partition_parameters] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[partition_range_values] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[partition_schemes] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[partitions] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[plan_guides] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[procedures] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[remote_service_bindings] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[routes] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[schemas] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[service_contract_message_usages] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[service_contract_usages] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[service_contracts] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[service_message_types] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[service_queue_usages] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[service_queues] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[services] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[spatial_index_tessellations] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[spatial_indexes] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sql_dependencies] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sql_modules] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[stats] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[stats_columns] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[symmetric_keys] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[synonyms] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[syscolumns] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[syscomments] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysconstraints] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysdepends] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysfilegroups] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysfiles] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysforeignkeys] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysfulltextcatalogs] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysindexes] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysindexkeys] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysmembers] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysobjects] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[syspermissions] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysprotects] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysreferences] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[system_columns] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[system_objects] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[system_parameters] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[system_sql_modules] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[system_views] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[systypes] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[sysusers] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[table_types] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[tables] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[transmission_queue] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[trigger_events] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[triggers] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[type_assembly_usages] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[types] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[views] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[xml_indexes] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[xml_schema_attributes] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[xml_schema_collections] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[xml_schema_component_placements] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[xml_schema_components] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[xml_schema_elements] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[xml_schema_facets] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[xml_schema_model_groups] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[xml_schema_namespaces] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[xml_schema_types] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[xml_schema_wildcard_namespaces] TO [' + @AppRoleName + '];' )
EXEC ( 'GRANT SELECT ON [sys].[xml_schema_wildcards] TO [' + @AppRoleName + '];' )
FETCH NEXT FROM AppRoleCursor INTO @AppRoleName
END
CLOSE AppRoleCursor
RETURN 0
GO
Once that is in the system, I just needed to "Exec GrantAccess" to make it work. (Of course, I have a table [RoleList] which contains a "AppRoleName" field that contains the names of the database roles.)
So, the mystery remains: why did all my users lose their "public" role and why could I not give it back to them? Was this part of an update to SQL Server 2008 R2? Was it because I ran another script to delete each user and add them back so to refresh
their connection with the domain? Well, this solves the issue for now.
One last warning: you probably should check the "public" role on your system before running this to make sure there isn't something missing or wrong, here. It's always possible something is different about your system.
Hope this helps someone else. -
Hi All,
we are facing the Login fails issue .
how to resolve the bellow error , could you please suggested the possible ways .. ASAP
TITLE: Connect to Server
Cannot connect to ..
ADDITIONAL INFORMATION:
Login failed for user ' domain\name'. (Microsoft SQL Server, Error: 18456)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
BUTTONS:
OK
Log Name: Application
Source: MSSQLSERVER
Date: 10/6/2011 1:56:28 PM
Event ID: 18456
Task Category: Logon
Level: Information
Keywords: Classic,Audit Failure
User: domain\name
Computer:
Description:
Login failed for user ' domain\name'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine>]
RAMI was hitting myself in the head with this problem for a couple of minutes.... Everything was fine on the DC and Domain itself.. I added the Domain admins Group Principal for which I am part of... I was getting this error ... Long History... Short
(Right Click and Run as Administrator took care of this for me..) UAC was the cause of the problem.
Cannot connect to XX-DB-XX3.
===================================
Login failed for user 'XXXXS\XXas'. (.Net SqlClient Data Provider)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
Server Name: XX-DB-XX3
Error Number: 18456
Severity: 14
State: 1
Line Number: 65536
Program Location:
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser() -
JDBC for Microsoft SQL Server 2000
Hello,
I have installed Microsoft SQL Server 2000 to establish a connection with JDK 1.4.1 and run the following code:
import java.sql.Connection.*;
import java.sql.*;
public class Connect
private java.sql.Connection con = null;
private final String url = "jdbc:microsoft:sqlserver://";
private final String serverName= "localhost";
private final String portNumber = "1433";
private final String databaseName= "cbi";
private final String userName = "sa";
private final String password = "";
// Informs the driver to use server a side-cursor,
// which permits more than one active statement
// on a connection.
private final String selectMethod = "cursor";
// Constructor
public Connect(){}
private String getConnectionUrl()
return url+serverName+":"+portNumber+";databaseName="+databaseName+";selectMethod="+selectMethod+";";
private java.sql.Connection getConnection()
try
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con = java.sql.DriverManager.getConnection(getConnectionUrl(),userName,password);
if(con!=null)
System.out.println("Connection Successful!");
catch(Exception e)
e.printStackTrace();
System.out.println("Error Trace in getConnection() : " + e.getMessage());
return con;
Display the driver properties, database details
public void displayDbProperties()
java.sql.DatabaseMetaData dm = null;
java.sql.ResultSet rs = null;
try
con= this.getConnection();
if(con!=null)
dm = con.getMetaData();
System.out.println("Driver Information");
System.out.println("\tDriver Name: "+ dm.getDriverName());
System.out.println("\tDriver Version: "+ dm.getDriverVersion ());
System.out.println("\nDatabase Information ");
System.out.println("\tDatabase Name: "+ dm.getDatabaseProductName());
System.out.println("\tDatabase Version: "+ dm.getDatabaseProductVersion());
System.out.println("Avalilable Catalogs ");
rs = dm.getCatalogs();
while(rs.next())
System.out.println("\tcatalog: "+ rs.getString(1));
rs.close();
rs = null;
closeConnection();
else
System.out.println("Error: No active Connection");
catch(Exception e)
e.printStackTrace();
dm=null;
private void closeConnection()
try
if(con!=null)
con.close();
con=null;
catch(Exception e)
e.printStackTrace();
public static void main(String[] args) throws Exception
Connect myDbTest = new Connect();
myDbTest.displayDbProperties();
but, I received the error that ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver, No active Connection.
I added the 3 .jar files msbase.jar,mssqlserver.jar and msutil.jar to the System variables but it is not working. Is there any syntax for adding these .jar files to the System Variables?
Please, help me and give me the solution for establishing the connection and loading the driver class. If I am doing anything wrong then please, tell me the right step.
I am developing a project on Java and I have very little time left to accomplish it. Please help me.
Thankyou.I had already given the .jar files to the User variables and System Variables but the driver class is still not loading. I had simply given the .jar file name for instance, msbase.jar;mssqlserver.jar;msutil.jar and also tried the path of .jar files i.e., C:\Microsoft SQL Server\-----------\lib\msbase.jar;C:\-------------lib\mssqlserver.jar;C:\----------------\lib\msutil.jar; but, both ways are not working. When I installed the MS SQL Server 2000 then in the lib folder, the 3 JAR files were not installed then, I downloaded a driver for MS SQL Server 2000 Driver for JDBC sp2, then, the JAR files were installed. Then, I copied those files to the lib folder of MS SQL Server and gave that path to the User and System Variables but it didn't work then I gave the original path of files where they are installed i.e., of the Driver's path which I downloaded from Microsoft but still now, my problem is not solved. Please help me.
-
Forms talking to Microsoft SQL Server
I have a form that is based on an Oracle database. DML is handled by forms and the oracle database.
I have on field that takes a ticket number. When this field is filled out I want to connect to a Microsoft SQL Server and make sure that the ticket number references a real ticket.
In the validation trigger, how do I connect to a microsoft sql server, run a sql statement, test the results?Here I give you a Oracle sample to access ACCESS DB by OCI, hope this will help you to SQL SERVER.
How to query an MS Access database using an OCA ODBC connection?
Note: This article makes reference to directories relevant to Forms 6i
Solution Description
====================
1. Attach the oca.pll, located in the %ORACLE_HOME%/oca60/plsqllib directory,
to the desired fmb.
For this directory to appear the Oracle Open Client Adapter Component
needs to be installed from the base Developer 6i R2 cd.
2. Write a program unit similar to the following:
FUNCTION get_access RETURN pls_integer IS
connection pls_integer;
cursor1 pls_integer;
stmt varchar2(1000);
n pls_integer;
BEGIN
stmt := 'select count(*) from emp';
connection := oca.dbconnect('scott/tiger@odbc:msa');
message(to_char(connection));
cursor1 := oca.execute(connection,stmt);
loop
begin
oca.fetch_row(connection,cursor1);
oca.coldata(connection,cursor1,1,n);
message(to_char(n)||' record(s)');
exception
when no_data_found then
message('NO MORE ROWS');
exit;
end;
end loop;
oca.close(connection,cursor1);
oca.disconnect(connection);
return n;
exception
when oca.connection_error then
message('OCA-Connection error');
when oca.cursor_error then
message('OCA-Cursor error');
when others then
message('Other Error');
end;
References:
%ORACLE_HOME%\tools\doc60\us\oca_info.pdf
"Using Oracle Forms Developer, Oracle Reports Developer and the Oracle Open
Client Adapter to Access ODBC Data Sources -
Error Deleting publication Microsoft SQL Server, Error: 15517
I have a MSSQL 2008 on a windows 2008 server.
I cant delete a publication that isnt in use anymore i get the following error.
TITLE: Microsoft SQL Server Management Studio
Could not delete publication 'TASS Publication'.
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22&EvtSrc=Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Replication.ReplicationMenuItem&EvtID=CantDeletePublication&LinkId=20476
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.
Changed database context to 'tass'. (Microsoft SQL Server, Error: 15517)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2531&EvtSrc=MSSQLServer&EvtID=15517&LinkId=20476
BUTTONS:
OK
I have tried to delete it by right clicking and delete. I have tried by query.
exec
sp_removedbreplication
N'<sqlServerName>'
exec
sp_droppublication @publication
= N'<sqlServerName>'
I have looked at many forums.
I am trying to do this as 'sa'.
Do you have any suggestions?johnyvee,
Firstly, exec sp_removedbreplication should be corrected in your msg above to have the parameter of 'databasename' instead of 'sqlservername' same for the droppublciation procedure, it must be passed the publication name and not the servername.
Secondly, go to the properties of 'TASS' database and under Files make sure you have an owner specified, specify sa for example. -
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0
Hi All .need help ..
When I am running this from cmd on my sql 2008 database server:
sqlcmd -U sa -S mymachinen_name\MSSQLSERVER , MSSQLSERVER is my instance name ,
I get prompt for password and after that I get this:
Password: HResult 0x57, Level 16, State 1
SQL Server Network Interfaces: Connection string is not valid [87].
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in
stance-specific error has occurred while establishing a connection to SQL Server
. Server is not found or not accessible. Check if instance name is correct and i
f SQL Server is configured to allow remote connections. For more information see
SQL Server Books Online..
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.
I have my sqserver browser service started and also I can login through managemnet studio with windows authentication.
Also found this :
http://support.microsoft.com/kb/905618 , but this is for MS Server 2005/2000.
Can you guys please help me.
RegardsHello,
Try the following commands from your computer and
from the local server:
SQLCMD -E -S mymachinen_name\MSSQLSERVER
SQLCMD -E -S mymachinen_name
Use SQL Server Management Studio and connect
to the SQL server with the SA account
and password. If this does not work,
your SA account is disabled or the SQL
server is configured for Windows authentication.
If MSSQLSERVER is the default instance
of your SQL Server, do not use it in your
command line SQLCMD
Check on your SQL server
remote connections are enabled
If you are using TCP / IP, add an inbound
TCP exception in the firewall of your SQL
server on port used by your SQL Server instance
+ an inbound UDP 1434
exception for the SQL Server Browser service
Regards
Charlie Dancoisne - Independent Consultant & Trainer (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable. This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!) -
Unable to install Microsoft SQL Server 2008 R2
It is showing error: Attempted to perform unauthorized operation. So was unable to install
Database Engine
Replication
TITLE: Microsoft SQL Server 2008 R2 Setup
The following error has occurred:
Attempted to perform an unauthorized operation.
Click 'Retry' to retry the failed action, or click 'Cancel' to cancel this action and continue setup.
For help, click:
http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.50.1600.1&EvtType=0x6121810A%25400x92D13C14
BUTTONS:
&Retry
Cancel
Log File
Overall summary:
Final result: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then
rerun SQL Server Setup.
Exit code (Decimal): -2068119551
Exit facility code: 1211
Exit error code: 1
Exit message: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then
rerun SQL Server Setup.
Start time: 2013-01-25 10:59:08
End time: 2013-01-25 11:13:30
Requested action: Install
Log with failure: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20130125_105747\Detail.txt
Exception help link: http%3a%2f%2fgo.microsoft.com%2ffwlink%3fLinkId%3d20476%26ProdName%3dMicrosoft%2bSQL%2bServer%26EvtSrc%3dsetup.rll%26EvtID%3d50000%26ProdVer%3d10.50.1600.1%26EvtType%3d0x6121810A%400x92D13C14
Machine Properties:
Machine name: VARUNGUPTA-PC
Machine processor count: 2
OS version: Windows Vista
OS service pack: Service Pack 2
OS region: United States
OS language: English (United States)
OS architecture: x86
Process architecture: 32 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID
Feature Language
Edition Version Clustered
Sql Server 2008 SQLEXPRESS MSSQL10.SQLEXPRESS Database Engine Services
1033 Express Edition 10.3.5500.0 No
Sql Server 2008 SQLEXPRESS MSSQL10.SQLEXPRESS SQL Server Replication
1033 Express Edition 10.3.5500.0 No
Package properties:
Description: SQL Server Database Services 2008 R2
ProductName: SQL Server 2008 R2
Type: RTM
Version: 10
SPLevel: 0
Installation location: d:\a716bfc2c0347dcd1c0fc7fcedc92a06\x86\setup\
Installation edition: EXPRESS_ADVANCED
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: True
AGTSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Disabled
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASDOMAINGROUP: <empty>
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: *****
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CONFIGURATIONFILE:
CUSOURCE:
ENABLERANU: True
ENU: True
ERRORREPORTING: True
FARMACCOUNT: <empty>
FARMADMINPORT: 0
FARMPASSWORD: *****
FEATURES: SQLENGINE,REPLICATION,SSMS
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: *****
HELP: False
IACCEPTSQLSERVERLICENSETERMS: False
INDICATEPROGRESS: False
INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft SQL Server\
INSTANCEID: MSSQLSERVER
INSTANCENAME: MSSQLSERVER
ISSVCACCOUNT: NT AUTHORITY\NetworkService
ISSVCPASSWORD: *****
ISSVCSTARTUPTYPE: Automatic
NPENABLED: 0
PASSPHRASE: *****
PCUSOURCE:
PID: *****
QUIET: False
QUIETSIMPLE: False
ROLE: AllFeatures_WithDefaults
RSINSTALLMODE: FilesOnlyMode
RSSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
RSSVCPASSWORD: *****
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: <empty>
SQLBACKUPDIR: <empty>
SQLCOLLATION: Latin1_General_CI_AI
SQLSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
SQLSVCPASSWORD: *****
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: VarunGupta-PC\Varun Gupta
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: True
TCPENABLED: 0
UIMODE: AutoAdvance
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20130125_105747\ConfigurationFile.ini
Detailed results:
Feature: Database Engine Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Feature: SQL Server Replication
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Feature: Management Tools - Basic
Status: Passed
MSI status: Passed
Configuration status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20130125_105747\SystemConfigurationCheck_Report.htmI was finally able to get out of this issue... but later got stuck here with following error
TITLE: SQL Server 2008 R2 Setup
The following error has occurred:
Attempted to perform an unauthorized operation.
Click 'Retry' to retry the failed action, or click 'Cancel' to cancel this action and continue setup.
For help, click:
http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.50.2500.0&EvtType=0x6121810A%25400x92D13C14
BUTTONS:
&Retry
Cancel
Also tried by running as administrator.
It failed to install
Data Engine Services
SQL Server Replication
Full - Text Search
Reporting Services
Overall summary:
Final result: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then
rerun SQL Server Setup.
Exit code (Decimal): -2068119551
Exit facility code: 1211
Exit error code: 1
Exit message: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then
rerun SQL Server Setup.
Start time: 2013-01-27 01:11:08
End time: 2013-01-27 01:23:26
Requested action: Install
Log with failure: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20130127_010951\Detail.txt
Exception help link: http%3a%2f%2fgo.microsoft.com%2ffwlink%3fLinkId%3d20476%26ProdName%3dMicrosoft%2bSQL%2bServer%26EvtSrc%3dsetup.rll%26EvtID%3d50000%26ProdVer%3d10.50.2500.0%26EvtType%3d0x6121810A%400x92D13C14
Machine Properties:
Machine name: VARUNGUPTA-PC
Machine processor count: 2
OS version: Windows Vista
OS service pack: Service Pack 2
OS region: United States
OS language: English (United States)
OS architecture: x86
Process architecture: 32 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID
Feature Language
Edition Version Clustered
Sql Server 2008 R2 SQLEXPRESS MSSQL10_50.SQLEXPRESS Database Engine Services
1033 Express Edition 10.51.2500.0 No
Sql Server 2008 R2 SQLEXPRESS MSSQL10_50.SQLEXPRESS SQL Server Replication
1033 Express Edition 10.51.2500.0 No
Sql Server 2008 R2 SQLEXPRESS MSSQL10_50.SQLEXPRESS Full-Text Search
1033 Express Edition 10.51.2500.0 No
Sql Server 2008 R2 SQLEXPRESS MSRS10_50.SQLEXPRESS Reporting Services
1033 10.51.2500.0
No
Sql Server 2008 R2
Management Tools - Basic 1033 Express Edition
10.51.2500.0 No
Package properties:
Description: SQL Server Database Services 2008 R2
ProductName: SQL Server 2008 R2
Type: RTM
Version: 10
Installation location: c:\c49037ca8dfa571dfe4480d170\x86\setup\
Installation edition: EXPRESS_ADVANCED
Slipstream: True
SP Level 1
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: True
AGTSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Disabled
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASDOMAINGROUP: <empty>
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: *****
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CONFIGURATIONFILE:
CUSOURCE:
ENABLERANU: True
ENU: True
ERRORREPORTING: True
FARMACCOUNT: <empty>
FARMADMINPORT: 0
FARMPASSWORD: *****
FEATURES: SQLENGINE,REPLICATION,FULLTEXT,RS
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: NT AUTHORITY\LOCAL SERVICE
FTSVCPASSWORD: *****
HELP: False
INDICATEPROGRESS: False
INSTALLSHAREDDIR: c:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: c:\Program Files\Microsoft SQL Server
INSTANCEID: VARUNGUPTA
INSTANCENAME: VARUNGUPTA
ISSVCACCOUNT: NT AUTHORITY\NetworkService
ISSVCPASSWORD: *****
ISSVCSTARTUPTYPE: Automatic
NPENABLED: 0
PASSPHRASE: *****
PCUSOURCE: c:\c49037ca8dfa571dfe4480d170\PCUSOURCE
PID: *****
QUIET: False
QUIETSIMPLE: False
ROLE: <empty>
RSINSTALLMODE: DefaultNativeMode
RSSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
RSSVCPASSWORD: *****
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: SQL
SQLBACKUPDIR: <empty>
SQLCOLLATION: Latin1_General_CI_AI
SQLSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
SQLSVCPASSWORD: *****
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: VarunGupta-PC\Varun Gupta
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: True
TCPENABLED: 0
UIMODE: AutoAdvance
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20130127_010951\ConfigurationFile.ini
Detailed results:
Feature: Database Engine Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Feature: SQL Server Replication
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Feature: Full-Text Search
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Feature: Reporting Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20130127_010951\SystemConfigurationCheck_Report.htm
Here is Detail.txt file
http://sdrv.ms/W759Wo
Maybe you are looking for
-
Best Practices for configuring ICMP from the outside
Question, Are there any best practices or best recommendations on how ICMP should be configured from the outside? I have been cleaning up the rules on our ASA as a lot were simply ported over years ago when we retired our PIX. I noticed that there is
-
I'm running Linux 2.6.11-1.1369_FC4 I'm having problems in my browser (opera 8.5) with a page which uses javascript ... http://www.oregonlive.com/live/kbps/audio/index.ssf?kbps... (this works ok in Firefox). I'm wondering whether my opera is conf
-
AS: how to switch between screen modes?
hi @ all, does anybody know how to switch between the 4 screen modes in ps cs3? - standard - maximized - full screen with menubar - full screen I looked around but could not find anything discribing a way doing this by applescript. the only thread I
-
Infoobject Last Used On in Navigation
Hi, I have a problem with the statistics data of detail OLAP navigation. We have some infoobjects for which we believe the statistics are not updated. For example, there's an infoobject "XYZ" which I used in navigation in the report. This step should
-
Importing photos into iphoto from aperture
I just upgraded to Snow Leopard not realizing Aperture 1.5.6 would not open again. I do not use Aperture enough to pay for an upgrade and want to import my photos into iPhoto for future use. How do I do this (where are the files) and keep the quality