Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Tuesday, March 27, 2012

Cannot remove push subscription on SQL Server 2000

Hi,

We have created replication from one production server to another backup server by using SQL scripts. These scripts have been generated by SQL Server after manual initial setup. When I ran these scripts they did not add the subscription for the backup server because a stored procedure were missing named something like sp_addsubscription. Therefore I ran the script on the production server and created the subscription manually on the backup server. But I made an error, I created a push subscription first but I should have created a pull subscription. Now I can't delete the push subscription. I don't even get a error message. I can't press delete and when right clicking on it I can only choose Help. The subscription has the following properties:

Type: push
Status: retrying
Last action: The process could not connect to distributor 'PSERV'
Replication type: Snapshot

Anyone know how I can delete this push subscription on my backup server?

Best,
/M

When you right-click on the subscription, are you connected to the production/publisher or backup/subscriber.

Try to do this on the publisher and see if you can delete it.

You can also call sp_dropsubscription (with the appropriate parameters) on the production server to drop the subscription.

|||

Nothing at all exist on the production server. The distribution and the publication has been removed. Only the push subscription exist at the backup server. And I can't delete that.

How can I use sp_dropsubscription. Can I use that from Query Analyzer. Does anyone have a SQL example for that?

Best
/M

|||

If you just want to get rid of replication on the backup server use sp_removedbreplication.

Note that this will remove all types of replication: merge and Transactional.

Use this only if you wish to remove all of replication.

|||

Additionally you can use the following:

sp_subscription_cleanup: for Transactional -- Removes metadata when a subscription is dropped at a Subscriber. For a synchronizing transaction subscription, it also includes immediate-updating triggers. This stored procedure is executed at the Subscriber on the subscription database.

sp_mergesubscription_cleanup: for Merge -- Removes metadata, such as triggers and entries, in sysmergesubscriptions and sysmergearticles after the specified merge push subscription is removed at the Publisher. This stored procedure is run at the Subscriber on the subscription database

|||

I used sp_removedbreplication 'db_name' to remove everything at the backup server. It worked as I wanted...

Thanks very much!

Now, I am happy again... for a short time :)

Best
/M

Tuesday, March 20, 2012

Cannot open offline cube

Hi,

I created an offline cube file (.cub) using SSAS 2005 sp1. I tried to open the cube file by following these steps:

1. Open excel 2003. On the toolbar, click on Data and select PivotTable and PivotChart report.

2. Select External data source as the data you want to analyze then click on next.

3. Click on the Get Data button on the next step.

4. Choose the OLAP Cubes tab on the pop-up window, select <New Data Source> and Click OK.

5. Type "Sales" as the name of the data source.

6.Choose Microsoft OLE DB Provider for Analysis Services 9.0 as the OLAP provider. Click on Connect button

7. Select the cube file option and browse for the location of the cube file. Click Finish.

8. On the fourth step (here comes the problem),on the Select the Cube that contains the data you want list, nothing is available in the dropdown list. And since I cannot finish this step, the OK button remains disabled and I was not able to open the cube file.

Can any one help me on this?

Thanks in advance,

Destry

I have exactly the same problem, as a matter of fact I was about to ask that question.

Should you find a workaround on your own, I would appreciate it if you could post it here as well too. Tia.

|||

There are several things can be going wrong. Here are several ideas for you to try.

1. Try and use Microsoft OLE DB Provider for Analysis Services 8.0 to connect to your local cube.

2. Try and use MDXSample application. In the connection dialog, as server name specify a path to your local cube file. Something like c:\my cubes\cube1.cub. If you can connect and but cant see cube name there, most likely something wrong with your local cube file.

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Cannot Open default Database. Login Failed. Problem

I have created an app which use sqlserver exrpress and works fine. I have now craeted a authentication page login.aspx.

I have added users successfully to the asp.net configuartion via the web site admin tool.

When I go to login using my page I get the Cannot open default database.Login failed. Login failed for user servet\aspnet.

I have looked at the asonetdb in sql server management studio and the server\asp net is set up on the database.

Can anyone suggeste what I ma doing wrong or where I might see a work through of the problem.

Thanks

Frank

Please check the properties of 'server\asp net' login in SQL Server Management Studio again:

1. Find its default database in the General panel

2. In the User Mapping panel, make sure its default database has been selected and mapped to a valid user.

|||

The login seems to worjk fine when I run the app using visual web developer - when I try and logn after accessing the system conventially via a web page it doesn't let me login.

Any suggestions.

Frank

|||How do you infer the login works fine? Can you connect to the SQL Server with the login? Or you checked it in SQL logins?

Cannot open database C:\Inetpub\wwwroot\Reports\App_Data\aspnetdb.mdf

I wrote a web application and tested it on the development pc and everything is working well. Then I created a Virtual Directory on my Test pc and transfered the developed site using the copy project in Visual Studio 2005. In my test pc I have .Net Framework 2.0 with SQL Express installed.

When I tried to run the site I get the following error message.

Cannot open database "C:\Inetpub\wwwroot\Reports\App_Data\aspnetdb.mdf" requested by the login. The login failed.
Login failed for user 'W2678\ASPNET'

I checked permissions and everything is ok. I strongly believe this error happens because I do not have access writes to the database. But when I open the SQL Server Management Studio, I cannot see my database there. I am totally new with this SQL server express edition that comes with Visual Studio 2005. I do not know how to add the ASPNET account to the database , because my application attaches the file at run time.

Could some one tell me how to do this? Any help is greaty appriciated.

To grant Asp.net permissions in your database, you create the server permissions in the security section under management in Management Studio and you create the database permissions in the new security section in the database section of Management Studio. You may need the Advanced Express which comes with Management Studio. Post again if you still have question. Hope this helps.

http://msdn.microsoft.com/vstudio/express/sql/download/

|||I did install the Advance express but no luck so far. Just to let you know that I used the SQL version that comes with VS 2005 to create the database. I am not sure how to deploy these applications. Are there any tutorials for these type of application (Using VS2005 SQL edition)?|||

You need to download the BOL(books online) and read up on permssions and check the thread below for the correct permissions because if you don't you cannot run your application. Hope this helps.


http://www.microsoft.com/downloads/details.aspx?FamilyID=BE6A2C5D-00DF-4220-B133-29C1E0B6585F&displaylang=en

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

http://forums.asp.net/thread/1492092.aspx


|||

Thanks for your response. This may not be a good question. In my web.config file I am attaching the database at run time. So my problem is when I open the SQL Management Studio in my Test or Development PC, I don't see my application database. Because of this I really cannot include the the account name in database login. My web.config file contents are

<?

xmlversion="1.0"?>

<!--

Note: As an alternative to hand editing this file you can use the

web admin tool to configure settings for your application. Use

the Website->Asp.Net Configuration option in Visual Studio.

A full list of settings and comments can be found in

machine.config.comments usually located in

\Windows\Microsoft.Net\Framework\v2.x\Config

-->

<

configurationxmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<

appSettings>

<

addkey="CrystalImageCleaner-AutoStart"value="true" />

<

addkey="CrystalImageCleaner-Sleep"value="60000" />

<

addkey="CrystalImageCleaner-Age"value="120000" />

</

appSettings>

<

connectionStrings>

<

addname="ASPNETDBConnectionString"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient" />

</

connectionStrings>

<

system.web>

<!--

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

Visual Basic options:

Set strict="true" to disallow all data type conversions

where data loss can occur.

Set explicit="true" to force declaration of all variables.

-->

<

roleManagerenabled="true" />

<

compilationdebug="true"strict="false"explicit="true"><assemblies><addassembly="CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.ReportSource, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.Shared, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.Enterprise.Framework, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.Enterprise.InfoStore, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></assemblies></compilation>

<

pages>

<

namespaces>

<

clear/>

<

addnamespace="System"/>

<

addnamespace="System.Collections"/>

<

addnamespace="System.Collections.Specialized"/>

<

addnamespace="System.Configuration"/>

<

addnamespace="System.Text"/>

<

addnamespace="System.Text.RegularExpressions"/>

<

addnamespace="System.Web"/>

<

addnamespace="System.Web.Caching"/>

<

addnamespace="System.Web.SessionState"/>

<

addnamespace="System.Web.Security"/>

<

addnamespace="System.Web.Profile"/>

<

addnamespace="System.Web.UI"/>

<

addnamespace="System.Web.UI.WebControls"/>

<

addnamespace="System.Web.UI.WebControls.WebParts"/>

<

addnamespace="System.Web.UI.HtmlControls"/>

</

namespaces>

</

pages>

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

-->

<

authenticationmode="Forms" />

<!--

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>

-->

<

httpHandlers><addverb="GET"path="CrystalImageHandler.aspx"type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></httpHandlers></system.web>

<

system.net>

<

mailSettings>

<

smtpfrom="coolvaas@.yahoo.com">

<

networkhost="10.5.10.22"password=""userName="" />

</

smtp>

</

mailSettings>

</

system.net>

</

configuration>

As you can see I use AttachDbFilename in the connectionstring. So I don't know how to set the database with the required user name.

Please help. I am going to browse the links that you sent me. Thanks a lot.

|||

(In my web.config file I am attaching the database at run time.)

That is what you do with Access not SQL Server so you have to choose if you want to use SQL Server, if yes take the time to read up and create the permissions you need or your application will not run. Hope this helps.

Monday, March 19, 2012

Cannot open database "testDB" requested by the login. The login failed.

I have created a new database within SQLServer Express 2005 and have an ASP page in IIS. Any time i attempt to access the database I get the following error:

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "testDB" requested by the login. The login failed.

The ODBC connection that I have created works fine if connecting to the same table (literally three sample fields with two records) in an Access database.

The database connection that I am using is:

Set DatabaseConnection = Server.CreateObject("ADODB.Connection")
DatabaseConnection.Open "DSN=testDB;UID=EINSTEIN\Administrator&pwd=password;DATABASE=testDB;APP=ASP Script"
Set rs = Server.CreateObject("ADODB.recordset")
SQLString = "SELECT * FROM testTable"
rs.Open SQLString, DatabaseConnection
if NOT rs.EOF then
Response.Write(rs("testField1") & " - " & rs("testField2"))
end if
rs.Close
DatabaseConnection.Close
Set DatabaseConnection = Nothing

EINSTEIN is the name of the server, rs = Recordset. I have tried changing to just Administrator instead of machinename\Administrator with no success. I have got SQL Server Management Studio Express CTP, and can log in fine to SQL Server using EINSTEIN\Administrator.

Please can anyone help!

Suggesting that you are going the DSN-less way (Connectionstrings can be found here www.connectionstrings.com) the database which is requested is not available for this user. You cannot provide a Windows User name if you want to use trusted authentication (it some time ago, that I used DSN, but I guess this is just possible for passing over SQL Server authentication. Try using a DSN-less connection with specifying a database that is accessible for the user.

See if that works, Jens Suessmeyer.

|||

It looks like your connection string may be a little incorrect, the current string is:

"DSN=testDB;UID=EINSTEIN\Administrator&pwd=password;DATABASE=testDB;APP=ASP Script"

It should be

"DSN=testDB;UID=EINSTEIN\Administrator;pwd=password;DATABASE=testDB;APP=ASP Script"

No Ampersand between Administrator&pwd, instead it should be a semi-colon

See if that works

Cannot open .sdf file in QA3.0

Hi,

We are using VS 2005 with SQL Server Mobile Edition. We created the .sdf file on the desktop and added this file to our VS project and set the Build Action to content. Next we deployed our app on Symbol PDA which has Windows CE 5.0 as the OS. We followed the following steps:

1. Deploy the app.

2. Install .NET CF 2.0

3. System_SR_ENU.CAB

4. sqlce30.wce5.armv4i.CAB

5. sqlce30.dev.ENU.wce5.armv4i.CAB

6. sqlce30.repl.wce5.armv4i.CAB

We now tried to double-click the .sdf file in PDA to open in QA3 but we get error.:

Error: 0x80004005 E_FAIL

Native Error (0)

Description: Interface defining error: IID_IDBInitialize

Param. 0:0

Param. 1:0

Param. 2:0

Param. 3:

Param. 4:

Param. 5:

What could be the issue?

Because of this, we unable to run the app since in our login form, this database is not available and hence we cannot proceed.

Regards,

Vilas

Please make sure that sqlceoledb30.dll is on the device and registered. The easiest way to do this is to install the repl cab (which you have done). In this case I suggest that you reinstall it and try again.

I usually install the dev cab last, but this should have no effect...

|||

I did as you said. Also found that my .sdf file was created on SQL Mobile Server and therefore did not work on PDA which has CE OS. Now I created the .sdf file on SQL CE and deployed on PDA. I can now open the .sdf file in QA 3.0 of PDA. Now when I try to access the same .sdf file via VS 2005 C# app, I get the error again. But I can run the same on Emulator without any problems. Any reason why?

Regards,

vnj

|||When you refer to a VS2005 C# application do you mean a desktop application? If so, please make sure you install SQL Compact Edition 3.1 on the desktop.

Sunday, March 11, 2012

cannot login

Well, I've tried every suggestion by helpful people in connecting to a database I created, to no avail.

I created a db, called, nodes10.mdf.
Test connection works.
Right now I get:

Cannot open database "nodes10" requested by the login. The login failed.
Login failed for user '<server>\<user>'.
Before you call me on my syntax, the problem is with logging in , not my insertString.

code:

SqlConnection conn = new SqlConnection("Data Source=NORBY11\\SQLExpress;Integrated Security=SSPI;Initial Catalog=nodes10;Connect Timeout=30;User Instance=True");

string ndeText=numberNode.Text;
string insertString = @."INSERT INTO table1(nodenames) VALUES(ndeText)";
SqlCommand cmd = new SqlCommand(insertString,conn);
//cmd.CommandText = insertString;

comboBox1.Items.Add(numberNode.Text);

try
{

conn.Open();

cmd.ExecuteNonQuery();

Also, are you supposed to be able to see my database in sqlexpress? like when you open up sqlserver config?

And why does my connection icon have a red x after I start my program?

Here are a couple questions:

Are you logged onto NORBY11 when you run this code? User Instances only support local connections.|||

yes, I'm logged into norby11.
So I've tried to use the attachdbfile syntax but the compiler doesn't like it. What should it be?
If I cut and paste the attachdb stuff from the properties window for the db, is that the correct way, because the compiler sure ain't buying it!

In the app.config file it says:

AttachDbFilename=|DataDirectory|\nodes10.mdf

HUH?|||Also, I don't know what this implies:

table1 (or whatever table number I'm fooling with at the time) is invalid object.
I got this one time while fooling around with different things in the connection string.
Does that mean no connection was made to the database, or is it that the table wasn't found, or that the table should exist someplace on my hard drive or ?|||

The AttachDBFilename syntax supports the use of |DataDirectory| when the database is in the same directory as the application. (Bold 'cause it's important.) If you put your database in a different directory, then you need to specify the full path to the database file.

Just for grins, is this a WinForm app or an ASP.NET web site your working in?

I got a small alarm bell when you mentioned copying the connection string out of the property box. Is this database embedded into your application? If the database is embedded into your application the connection string is automatically managed by VS so you don't need to open a connection manually.

If this is an ASP.NET application the issue could be with permissions since the user loging in is probably the ASP.NET user rather than your own user account. I'm not much of a web guy, but if this is the case, I can point you to a whole set of forums targeted at developing web applications on SQL Express.

Regards,

Mike Wachal
SQL Express team

-
Check out my tips for getting your answer faster and how to ask a good question: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=307712&SiteID=1

|||It's a WinForms app.

I believe it's called an embedded db. I created the database from within visual studio.

If I don't need to open the connection, why do I get an error on the line cmd.ExecuteNonQuery regarding opening a connection? --'connection property has not been initialized?'|||I have a couple more questions, if I could.

When I create a new data connection, then create a table within that db, should a table exist in the directory where my program is located? I notice in programs that I tried in VC#2005 book that tables appear in the directory. Of course, those programs didn't work either, and I can't connect to the db in them, or I get invalid object when I run them.

What a cluster.|||

Hi zenguitar,

As far as the need to connect, I'm talking about using DataSets in VS 2005. You'll be much better information about these by reading the VS documentation (http://msdn2.microsoft.com) and by hanging out in the .NET Data Access forum at http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=45&SiteID=1, but I'll try to give you the basics here.

There are a number of different ways to create a DataSet in VS, including adding a database into your project and creating a new DataSource from an existing database. The net of these actions, is that you end up in the DataSet Wizard and you can pick database objects to be exposed in the DataSet.

Once you have a DataSet, you can just drag items from the Data Sources pane onto your WinForm and have VS do all the magic of creating the objects needed to bind your data to your controls. VS also creates additional items such as a BindingSource and a TableAdapter and BindingNavigator to make you life easier. Using a DataSet also stores a ConnectionString for your database in the application settings and uses that connection string to automatically connect to your database to retreive or updated data based on your code against the DataSet. Exactly how the connection string is formed depneds on how you create the DataSet.

If you're goal is to place data bound controls on your forms, I suggest that explore the use of the DataSet as the way to do this since a bunch of the functionality is baked into VS for you.

Performing an operation such as running a Command object is still going to require that you make the connection yourself. Now you can write your connection string manually, you could store a connection string in the applicaiton settings or you could "steal" connection string from an existing Data Source that is already stored in your database. It's all really up to what your needs are.

None of this really gets to why you are getting a failed login error though. My guess is that you've still got a technology mix up between the user instance and the main instance and which one you're actually using.

Is your database nodes10 actually attached to SQL Express already? Do you access it via any other tools? (Which ones?) Does your user account actually have a Login on the server and a User account in the database?

As far as embedded databases, one way to get an embedded database is to create it via the Projects | Add New Items menu. One of the options is SQL Database, and this will actually put a database file directly in your project directory. It will also show up in Solution Explorer. If you don't see the database in Solution Explorer, then it isn't embedded. The whole idea of an embedded database is that the .mdf and .ldf files travel with the applicaiton and are attached at runtime to a User Instance. These are not suitable for an application that requires multi-user access becasue User Instances only support single user, local only access.

If you create a database using Server Explorer, it is not embedded, rather it is attached the main instance of the server and placed in the Data directory for the server. This is the way to go for multi-user access databases.

You can create DataSets against either of these databases.

As far as your final questions:

Tables don't exist independently of the database file. When you create a new table, it is stored in the database file in what ever directory that database was created in. Where the database resides is dependent on how it was created in VS as I've described above.

Sunday, February 19, 2012

Cannot insert duplicate key into ...... EXTREME problem

Hi All
Really need your urgent help on this!
Created a system that uses an SQL database as the data store. Clients have
been using this same DDL since SQL 6.5 and I've got lots of users running
SQL 6.5, 7, 2000 and MSDE with the same DDL and they don't have a problem.
However, one user, who has been running the system on SQL 6.5 for years now,
keeps getting cannot insert duplicate key into PK_ blah blah. This error is
being generated on SQL 6.5's own auto-generated ID so I'm sure it is a
problem that their SQL 6.5 has created in the db. The problem is after
running the usual CHECKDB, CHECKALLOC, NEWALLOC, CHECKTABLE and UPDATEUSAGE
DBCC commands none of these have corrected the fault.
I'm sure I've had this problem crop up once before and doing the CHECKDB
fixed it, but I've run the CHECKDB 3 times now and it doesn't correct it.
Can you give me any pointers on how I can check and more importantly resolve
this issue?
Thanks RobbieI cannot remember. Is DBCC CHECKIDENT included with 6.5? If it is try using
it.
--
Keith
"Astra" <info@.noemail.com> wrote in message
news:OQdxVA1GFHA.3128@.TK2MSFTNGP10.phx.gbl...
> Hi All
> Really need your urgent help on this!
> Created a system that uses an SQL database as the data store. Clients
have
> been using this same DDL since SQL 6.5 and I've got lots of users running
> SQL 6.5, 7, 2000 and MSDE with the same DDL and they don't have a problem.
> However, one user, who has been running the system on SQL 6.5 for years
now,
> keeps getting cannot insert duplicate key into PK_ blah blah. This error
is
> being generated on SQL 6.5's own auto-generated ID so I'm sure it is a
> problem that their SQL 6.5 has created in the db. The problem is after
> running the usual CHECKDB, CHECKALLOC, NEWALLOC, CHECKTABLE and
UPDATEUSAGE
> DBCC commands none of these have corrected the fault.
> I'm sure I've had this problem crop up once before and doing the CHECKDB
> fixed it, but I've run the CHECKDB 3 times now and it doesn't correct it.
> Can you give me any pointers on how I can check and more importantly
resolve
> this issue?
> Thanks Robbie
>|||Hi Astra,
I do not have any 6.5 experience however I have seen this
problem on 2000.
Within 2000 if you run the command
SELECT TOP 100 PERCENT name, IDENT_SEED(name) AS [ID
Start], IDENT_INCR(name) AS [ID Increment], IDENT_CURRENT
(name) AS [Current ID]
FROM dbo.sysobjects
WHERE xtype = 'U'
ORDER BY IDENT_SEED(name)
You will get the current identity values for the user
tables in your database.
I think that somehow one on your 6.5 has got out of
sequence i.e. the current identity is 4, but internally it
thinks it 3, so it trys to insert 4 in again.
How we solved this in 2000 was with the DBCC CHECKIDENT
command.
Peter
"Although prepared for martyrdom, I preferred that it be
postponed."
Winston Churchill
>--Original Message--
>Hi All
>Really need your urgent help on this!
>Created a system that uses an SQL database as the data
store. Clients have
>been using this same DDL since SQL 6.5 and I've got lots
of users running
>SQL 6.5, 7, 2000 and MSDE with the same DDL and they
don't have a problem.
>However, one user, who has been running the system on SQL
6.5 for years now,
>keeps getting cannot insert duplicate key into PK_ blah
blah. This error is
>being generated on SQL 6.5's own auto-generated ID so I'm
sure it is a
>problem that their SQL 6.5 has created in the db. The
problem is after
>running the usual CHECKDB, CHECKALLOC, NEWALLOC,
CHECKTABLE and UPDATEUSAGE
>DBCC commands none of these have corrected the fault.
>I'm sure I've had this problem crop up once before and
doing the CHECKDB
>fixed it, but I've run the CHECKDB 3 times now and it
doesn't correct it.
>Can you give me any pointers on how I can check and more
importantly resolve
>this issue?
>Thanks Robbie
>
>.
>|||Yes, it was.
SQL Server 6.5 has a few issues with Identity columns. Those issues went
away with SQL server 7.0.
DBCC CHECKIDENT
( 'table_name'
[ , { NORESEED
| { RESEED [ , new_reseed_value ] }
}
]
)
Checks the current identity value for the specified table and, if needed,
corrects the identity value.
As an aside, SQL Server 6.5 is no longer supported by Microsoft, so those
clients would be well advised to move to SQL Server 2000.
Regards
Mike
"Keith Kratochvil" wrote:
> I cannot remember. Is DBCC CHECKIDENT included with 6.5? If it is try using
> it.
> --
> Keith
>
> "Astra" <info@.noemail.com> wrote in message
> news:OQdxVA1GFHA.3128@.TK2MSFTNGP10.phx.gbl...
> > Hi All
> >
> > Really need your urgent help on this!
> >
> > Created a system that uses an SQL database as the data store. Clients
> have
> > been using this same DDL since SQL 6.5 and I've got lots of users running
> > SQL 6.5, 7, 2000 and MSDE with the same DDL and they don't have a problem.
> >
> > However, one user, who has been running the system on SQL 6.5 for years
> now,
> > keeps getting cannot insert duplicate key into PK_ blah blah. This error
> is
> > being generated on SQL 6.5's own auto-generated ID so I'm sure it is a
> > problem that their SQL 6.5 has created in the db. The problem is after
> > running the usual CHECKDB, CHECKALLOC, NEWALLOC, CHECKTABLE and
> UPDATEUSAGE
> > DBCC commands none of these have corrected the fault.
> >
> > I'm sure I've had this problem crop up once before and doing the CHECKDB
> > fixed it, but I've run the CHECKDB 3 times now and it doesn't correct it.
> >
> > Can you give me any pointers on how I can check and more importantly
> resolve
> > this issue?
> >
> > Thanks Robbie
> >
> >
>|||Guys
You've made my weekend!!!
Many thanks.
"Peter The Spate" <anonymous@.discussions.microsoft.com> wrote in message
news:1ad701c51b53$2a8f0a20$a601280a@.phx.gbl...
Hi Astra,
I do not have any 6.5 experience however I have seen this
problem on 2000.
Within 2000 if you run the command
SELECT TOP 100 PERCENT name, IDENT_SEED(name) AS [ID
Start], IDENT_INCR(name) AS [ID Increment], IDENT_CURRENT
(name) AS [Current ID]
FROM dbo.sysobjects
WHERE xtype = 'U'
ORDER BY IDENT_SEED(name)
You will get the current identity values for the user
tables in your database.
I think that somehow one on your 6.5 has got out of
sequence i.e. the current identity is 4, but internally it
thinks it 3, so it trys to insert 4 in again.
How we solved this in 2000 was with the DBCC CHECKIDENT
command.
Peter
"Although prepared for martyrdom, I preferred that it be
postponed."
Winston Churchill
>--Original Message--
>Hi All
>Really need your urgent help on this!
>Created a system that uses an SQL database as the data
store. Clients have
>been using this same DDL since SQL 6.5 and I've got lots
of users running
>SQL 6.5, 7, 2000 and MSDE with the same DDL and they
don't have a problem.
>However, one user, who has been running the system on SQL
6.5 for years now,
>keeps getting cannot insert duplicate key into PK_ blah
blah. This error is
>being generated on SQL 6.5's own auto-generated ID so I'm
sure it is a
>problem that their SQL 6.5 has created in the db. The
problem is after
>running the usual CHECKDB, CHECKALLOC, NEWALLOC,
CHECKTABLE and UPDATEUSAGE
>DBCC commands none of these have corrected the fault.
>I'm sure I've had this problem crop up once before and
doing the CHECKDB
>fixed it, but I've run the CHECKDB 3 times now and it
doesn't correct it.
>Can you give me any pointers on how I can check and more
importantly resolve
>this issue?
>Thanks Robbie
>
>.
>

Thursday, February 16, 2012

Cannot get SSCE 3.5 beta 2 to work

I'm running VS2008 beta2. I've succefully added a SDF database file to my project and created a couple of tables in it from VS. I added a reference to the System.Data.SqlCeConnection. When I try to create a new instance of the SqlCeConnection class I get a nasty error that states I'm missing the 'sqlceme35.dll' file. I copy all of the files .dll into by bin folder. Now I'm getting a BadImageFormat error when I create an instance. Does anyone know what that means? or why I had to copy those files to begin with? This is very odd. Any help would be appreciated. I am new to SqlCe.

Hi

I can't help - having the same problem but getting this error

Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

when I try and add

C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5\sqlceme35.dll

as a reference then I get another error

Microsoft Visual Studio

A reference to 'C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5\sqlceme35.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.

OK

Hoping for an answer as well

Mike
|||

Mike,

I'm starting to think it has something to do with x64. I'm only getting this error Windows Server 2003 x64 and on Vista x64. However, when I install VS2008 on Vista x86, I have not seen the issue (at least not so far). What platform are you running on?

Jon

|||

This DLL is not a COM object or .NET assembly so it can't be added as reference and it should not be. It should be simply located in your %WINDIR%\System32 or in your application folder.

Also make sure to mark your application as x86 (platform target in project properties or you won't be able to use SQL CE in 64 bit OS.

|||Arg.. That sucks no SQL CE for 64-bit.. Why does VS install all of the tools and SDKs for SQL CE on 64-bit if you can't use it ?

|||

You can - in 32 bit mode. That's the way most applications work on 64 bit OS today.

|||

Jon

Looks like it - I am running Vista 64

All seeems fine ov XP 32

Hope there is a work round

Mike

|||

Hi Ilya

Thanks - I can get a compile and successfull run once I switch to x86 in Orcas Beta 2

but I still can't run SQLMetal in Vista64 either the 32bit version of sqlmetal

Any advice ?

Thanks again

Mike

|||

Go ahead and file a bug here.

Cannot get proxy account to work.

For some reason I cannot get a job to run under a different account other
than the SQL Agent. What I have done is the following.
1)Created a credential called operations that has the domain\user format
with its password. The user used is the SA of the sql server.
2)I created a proxy that is linked to this credential. In this Proxy I have
set it up to run all subsystems. I have also linked two users to this proxy.
3)I changed the job owner to be a user that will use the proxy
4)I changed each job step to run as the proxy created.
When I run the job, the job instantly fails. I keep getting the following
error.
Executed as user: DOMAIN\user. The process could not be created for step 1
of job 0x34E60C35C09E184EA8FD2E9E223821E2 (reason: A required privilege is
not held by the client). The step failed.
At one time this worked great. I believe this broke because of an update
that was applied.
I have recreated the credential and the proxy several times and I cannot see
what I am doing wrong.
Can anyone help me.
Hi Chris, please take a look at this tip on what to take care of when running
a SQL Server Agent job using a proxy account:
http://www.sqlcommunity.com/Default.aspx?id=97&tabid=77
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
"Chris Lumnah" wrote:

> For some reason I cannot get a job to run under a different account other
> than the SQL Agent. What I have done is the following.
> 1)Created a credential called operations that has the domain\user format
> with its password. The user used is the SA of the sql server.
> 2)I created a proxy that is linked to this credential. In this Proxy I have
> set it up to run all subsystems. I have also linked two users to this proxy.
> 3)I changed the job owner to be a user that will use the proxy
> 4)I changed each job step to run as the proxy created.
> When I run the job, the job instantly fails. I keep getting the following
> error.
> Executed as user: DOMAIN\user. The process could not be created for step 1
> of job 0x34E60C35C09E184EA8FD2E9E223821E2 (reason: A required privilege is
> not held by the client). The step failed.
> At one time this worked great. I believe this broke because of an update
> that was applied.
> I have recreated the credential and the proxy several times and I cannot see
> what I am doing wrong.
> Can anyone help me.
|||Thank you for the reply. I will try this out. Is this aimed at the SQL
Agent Service account or the proxy account? Should I apply it to both?
Thanks again.
"Saleem Hakani" wrote:
[vbcol=seagreen]
> Hi Chris, please take a look at this tip on what to take care of when running
> a SQL Server Agent job using a proxy account:
> http://www.sqlcommunity.com/Default.aspx?id=97&tabid=77
> --
> Thank you,
> Saleem Hakani
> HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
> SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
> Articles, SQL Clinic and a lot of SQL fun.
>
> "Chris Lumnah" wrote:
|||That's correct Chris. It's for SQL Server Agent service but you can applyit
for both as well.
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
"Chris Lumnah" wrote:
[vbcol=seagreen]
> Thank you for the reply. I will try this out. Is this aimed at the SQL
> Agent Service account or the proxy account? Should I apply it to both?
> Thanks again.
> "Saleem Hakani" wrote:
|||Saleem,
I have done what you suggested. However I still have the same problem. I
did all the items on that list, short of rebooting the server. Any other
ideas?
"Saleem Hakani" wrote:
[vbcol=seagreen]
> That's correct Chris. It's for SQL Server Agent service but you can applyit
> for both as well.
> --
> Thank you,
> Saleem Hakani
> HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
> SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
> Articles, SQL Clinic and a lot of SQL fun.
>
> "Chris Lumnah" wrote:

Cannot get proxy account to work.

For some reason I cannot get a job to run under a different account other
than the SQL Agent. What I have done is the following.
1)Created a credential called operations that has the domain\user format
with its password. The user used is the SA of the sql server.
2)I created a proxy that is linked to this credential. In this Proxy I have
set it up to run all subsystems. I have also linked two users to this proxy
.
3)I changed the job owner to be a user that will use the proxy
4)I changed each job step to run as the proxy created.
When I run the job, the job instantly fails. I keep getting the following
error.
Executed as user: DOMAIN\user. The process could not be created for step 1
of job 0x34E60C35C09E184EA8FD2E9E223821E2 (reason: A required privilege is
not held by the client). The step failed.
At one time this worked great. I believe this broke because of an update
that was applied.
I have recreated the credential and the proxy several times and I cannot see
what I am doing wrong.
Can anyone help me.Hi Chris, please take a look at this tip on what to take care of when runnin
g
a SQL Server Agent job using a proxy account:
http://www.sqlcommunity.com/Default.aspx?id=97&tabid=77
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
"Chris Lumnah" wrote:

> For some reason I cannot get a job to run under a different account other
> than the SQL Agent. What I have done is the following.
> 1)Created a credential called operations that has the domain\user format
> with its password. The user used is the SA of the sql server.
> 2)I created a proxy that is linked to this credential. In this Proxy I ha
ve
> set it up to run all subsystems. I have also linked two users to this pro
xy.
> 3)I changed the job owner to be a user that will use the proxy
> 4)I changed each job step to run as the proxy created.
> When I run the job, the job instantly fails. I keep getting the following
> error.
> Executed as user: DOMAIN\user. The process could not be created for step 1
> of job 0x34E60C35C09E184EA8FD2E9E223821E2 (reason: A required privilege is
> not held by the client). The step failed.
> At one time this worked great. I believe this broke because of an update
> that was applied.
> I have recreated the credential and the proxy several times and I cannot s
ee
> what I am doing wrong.
> Can anyone help me.|||Thank you for the reply. I will try this out. Is this aimed at the SQL
Agent Service account or the proxy account? Should I apply it to both?
Thanks again.
"Saleem Hakani" wrote:
[vbcol=seagreen]
> Hi Chris, please take a look at this tip on what to take care of when runn
ing
> a SQL Server Agent job using a proxy account:
> http://www.sqlcommunity.com/Default.aspx?id=97&tabid=77
> --
> Thank you,
> Saleem Hakani
> HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
> SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
> Articles, SQL Clinic and a lot of SQL fun.
>
> "Chris Lumnah" wrote:
>|||That's correct Chris. It's for SQL Server Agent service but you can applyit
for both as well.
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
"Chris Lumnah" wrote:
[vbcol=seagreen]
> Thank you for the reply. I will try this out. Is this aimed at the SQL
> Agent Service account or the proxy account? Should I apply it to both?
> Thanks again.
> "Saleem Hakani" wrote:
>|||Saleem,
I have done what you suggested. However I still have the same problem. I
did all the items on that list, short of rebooting the server. Any other
ideas?
"Saleem Hakani" wrote:
[vbcol=seagreen]
> That's correct Chris. It's for SQL Server Agent service but you can applyi
t
> for both as well.
> --
> Thank you,
> Saleem Hakani
> HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
> SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
> Articles, SQL Clinic and a lot of SQL fun.
>
> "Chris Lumnah" wrote:
>

Cannot get proxy account to work.

For some reason I cannot get a job to run under a different account other
than the SQL Agent. What I have done is the following.
1)Created a credential called operations that has the domain\user format
with its password. The user used is the SA of the sql server.
2)I created a proxy that is linked to this credential. In this Proxy I have
set it up to run all subsystems. I have also linked two users to this proxy.
3)I changed the job owner to be a user that will use the proxy
4)I changed each job step to run as the proxy created.
When I run the job, the job instantly fails. I keep getting the following
error.
Executed as user: DOMAIN\user. The process could not be created for step 1
of job 0x34E60C35C09E184EA8FD2E9E223821E2 (reason: A required privilege is
not held by the client). The step failed.
At one time this worked great. I believe this broke because of an update
that was applied.
I have recreated the credential and the proxy several times and I cannot see
what I am doing wrong.
Can anyone help me.Hi Chris, please take a look at this tip on what to take care of when running
a SQL Server Agent job using a proxy account:
http://www.sqlcommunity.com/Default.aspx?id=97&tabid=77
--
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
"Chris Lumnah" wrote:
> For some reason I cannot get a job to run under a different account other
> than the SQL Agent. What I have done is the following.
> 1)Created a credential called operations that has the domain\user format
> with its password. The user used is the SA of the sql server.
> 2)I created a proxy that is linked to this credential. In this Proxy I have
> set it up to run all subsystems. I have also linked two users to this proxy.
> 3)I changed the job owner to be a user that will use the proxy
> 4)I changed each job step to run as the proxy created.
> When I run the job, the job instantly fails. I keep getting the following
> error.
> Executed as user: DOMAIN\user. The process could not be created for step 1
> of job 0x34E60C35C09E184EA8FD2E9E223821E2 (reason: A required privilege is
> not held by the client). The step failed.
> At one time this worked great. I believe this broke because of an update
> that was applied.
> I have recreated the credential and the proxy several times and I cannot see
> what I am doing wrong.
> Can anyone help me.|||Thank you for the reply. I will try this out. Is this aimed at the SQL
Agent Service account or the proxy account? Should I apply it to both?
Thanks again.
"Saleem Hakani" wrote:
> Hi Chris, please take a look at this tip on what to take care of when running
> a SQL Server Agent job using a proxy account:
> http://www.sqlcommunity.com/Default.aspx?id=97&tabid=77
> --
> Thank you,
> Saleem Hakani
> HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
> SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
> Articles, SQL Clinic and a lot of SQL fun.
>
> "Chris Lumnah" wrote:
> > For some reason I cannot get a job to run under a different account other
> > than the SQL Agent. What I have done is the following.
> > 1)Created a credential called operations that has the domain\user format
> > with its password. The user used is the SA of the sql server.
> >
> > 2)I created a proxy that is linked to this credential. In this Proxy I have
> > set it up to run all subsystems. I have also linked two users to this proxy.
> >
> > 3)I changed the job owner to be a user that will use the proxy
> >
> > 4)I changed each job step to run as the proxy created.
> >
> > When I run the job, the job instantly fails. I keep getting the following
> > error.
> >
> > Executed as user: DOMAIN\user. The process could not be created for step 1
> > of job 0x34E60C35C09E184EA8FD2E9E223821E2 (reason: A required privilege is
> > not held by the client). The step failed.
> >
> > At one time this worked great. I believe this broke because of an update
> > that was applied.
> >
> > I have recreated the credential and the proxy several times and I cannot see
> > what I am doing wrong.
> >
> > Can anyone help me.|||That's correct Chris. It's for SQL Server Agent service but you can applyit
for both as well.
--
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
"Chris Lumnah" wrote:
> Thank you for the reply. I will try this out. Is this aimed at the SQL
> Agent Service account or the proxy account? Should I apply it to both?
> Thanks again.
> "Saleem Hakani" wrote:
> > Hi Chris, please take a look at this tip on what to take care of when running
> > a SQL Server Agent job using a proxy account:
> > http://www.sqlcommunity.com/Default.aspx?id=97&tabid=77
> >
> > --
> > Thank you,
> > Saleem Hakani
> > HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
> > SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
> > Articles, SQL Clinic and a lot of SQL fun.
> >
> >
> >
> > "Chris Lumnah" wrote:
> >
> > > For some reason I cannot get a job to run under a different account other
> > > than the SQL Agent. What I have done is the following.
> > > 1)Created a credential called operations that has the domain\user format
> > > with its password. The user used is the SA of the sql server.
> > >
> > > 2)I created a proxy that is linked to this credential. In this Proxy I have
> > > set it up to run all subsystems. I have also linked two users to this proxy.
> > >
> > > 3)I changed the job owner to be a user that will use the proxy
> > >
> > > 4)I changed each job step to run as the proxy created.
> > >
> > > When I run the job, the job instantly fails. I keep getting the following
> > > error.
> > >
> > > Executed as user: DOMAIN\user. The process could not be created for step 1
> > > of job 0x34E60C35C09E184EA8FD2E9E223821E2 (reason: A required privilege is
> > > not held by the client). The step failed.
> > >
> > > At one time this worked great. I believe this broke because of an update
> > > that was applied.
> > >
> > > I have recreated the credential and the proxy several times and I cannot see
> > > what I am doing wrong.
> > >
> > > Can anyone help me.|||Saleem,
I have done what you suggested. However I still have the same problem. I
did all the items on that list, short of rebooting the server. Any other
ideas?
"Saleem Hakani" wrote:
> That's correct Chris. It's for SQL Server Agent service but you can applyit
> for both as well.
> --
> Thank you,
> Saleem Hakani
> HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
> SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
> Articles, SQL Clinic and a lot of SQL fun.
>
> "Chris Lumnah" wrote:
> > Thank you for the reply. I will try this out. Is this aimed at the SQL
> > Agent Service account or the proxy account? Should I apply it to both?
> >
> > Thanks again.
> >
> > "Saleem Hakani" wrote:
> >
> > > Hi Chris, please take a look at this tip on what to take care of when running
> > > a SQL Server Agent job using a proxy account:
> > > http://www.sqlcommunity.com/Default.aspx?id=97&tabid=77
> > >
> > > --
> > > Thank you,
> > > Saleem Hakani
> > > HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
> > > SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
> > > Articles, SQL Clinic and a lot of SQL fun.
> > >
> > >
> > >
> > > "Chris Lumnah" wrote:
> > >
> > > > For some reason I cannot get a job to run under a different account other
> > > > than the SQL Agent. What I have done is the following.
> > > > 1)Created a credential called operations that has the domain\user format
> > > > with its password. The user used is the SA of the sql server.
> > > >
> > > > 2)I created a proxy that is linked to this credential. In this Proxy I have
> > > > set it up to run all subsystems. I have also linked two users to this proxy.
> > > >
> > > > 3)I changed the job owner to be a user that will use the proxy
> > > >
> > > > 4)I changed each job step to run as the proxy created.
> > > >
> > > > When I run the job, the job instantly fails. I keep getting the following
> > > > error.
> > > >
> > > > Executed as user: DOMAIN\user. The process could not be created for step 1
> > > > of job 0x34E60C35C09E184EA8FD2E9E223821E2 (reason: A required privilege is
> > > > not held by the client). The step failed.
> > > >
> > > > At one time this worked great. I believe this broke because of an update
> > > > that was applied.
> > > >
> > > > I have recreated the credential and the proxy several times and I cannot see
> > > > what I am doing wrong.
> > > >
> > > > Can anyone help me.

Cannot get CREATE LOGIN from a Windows group to work

I have created a database fronted by an ASP.Net application. It's all nice and simple, and I only need a very simple level of security (and even that is only as a protection against accidents rather than maliciousness). My intention is that users connect using Windows impersonation (<identity="true">), with the database creator having full access and the public group (I'm talking SQL groups here) having specific premissions granted on specific tables.

If I set <identity="false"> on my XP box the application connects to the database as [MACHINE\ASPNET]. This is easy to set up access for - I simply do a

CREATE LOGIN [MACHINE\ASPNET] FROM WINDOWS

and then within the actual database do a

CREATE USER [MACHINE\ASPNET]

But as I said, I want to use Windows impersonation. When I set <identity="true">, the application correctly attempts to connect as the actual Windows user account (e.g. [MACHINE\testuser]). If that user is the user who installed the database, then all is well and it has full access. For anything else, I get a "cannot log on" error - this much I expect.

So I want to permit logins for all other users, and I want this to work regardless of whether the machine is a standalone machine whose "domain" is simply the machine's own name, whether it is in some form of traditional peer-to-peer workgroup, or whether the machine is connected to a real domain. I also want it to work on XP and Windows Server 2003 (and ideally Vista also, but that can wait). When I try the following:

CREATE LOGIN [MACHINE\Users] FROM WINDOWS

I get this error:

Msg 15401, Level 16, State 1, Server MACHINE\SQLEXPRESS, Line 1
Windows NT user or group 'MACHINE\Users' not found. Check the name again.

Nor does it work with [Everyone] (that one has no domain/folder listed against it in any permissions dialogs on my domainless development PC). So I'm stuck and confused. It's taken me ages just to get this far. Any suggestions anyone?

Thanks in advance.

Hi,

Ensure your windows users have grant access for that db.

Refer for adding windows user/group to sql server for work around.

http://msdn2.microsoft.com/en-gb/library/aa905177(sql.80).aspx

http://msdn2.microsoft.com/en-us/library/aa163753(office.10).aspx

http://www.databasedesign-resource.com/adding-users-in-sql-server.html

Hemantgiri S. Goswami

|||

Thanks, but that doesn't really help. One of these articles simply explains how to create Windows accounts, one explains how to use the sp_grantlogin storproc (which essentially issues the same SQL commands as I have listed above, and it gives exactly the same error messages), and the third tells you how to do it all manually, whereas I need to do it programmatically.

I should add that when I try to add a specific user account rather than the group account, the command works fine, so something is wrong with the attempt to add the group account. Does anyone know anything specific to groups?

|||I have found the answer. The issue is local versus global groups. CREATE LOGIN [domain\group] FROM WINDOWS works fine (i.e. a global group), but if you try it with a local group such as MACHINE\Users it will fail every time - this is a security feature of SQL Server. Which means that this approach will only work in a domain environment and not in a workgroup or on a shared single machine. The alternative is to use a nice GUI tool to manually add logins and users to SQL Express, but since SQL Express does not come with nice tools like Enterprise Manager, I may have to write my own and include it in the distribution. The group 'Everyone' fails also because it's what I would term a pseudo-group rather than either a local or a glocal group.|||

hi,

michael412 wrote:

I have found the answer. The issue is local versus global groups. CREATE LOGIN [domain\group] FROM WINDOWS works fine (i.e. a global group), but if you try it with a local group such as MACHINE\Users it will fail every time - this is a security feature of SQL Server. Which means that this approach will only work in a domain environment and not in a workgroup or on a shared single machine. The alternative is to use a nice GUI tool to manually add logins and users to SQL Express, but since SQL Express does not come with nice tools like Enterprise Manager, I may have to write my own and include it in the distribution. The group 'Everyone' fails also because it's what I would term a pseudo-group rather than either a local or a glocal group.

you can try defining your own local Windows group...
add a new Group via the "Computer Management" MMC snap-in, say you name it "MyMachineAllowedAccounts" and add the required windows accounts as members to that group...

then use the "nice ui tool" SQLExpress is provided with (yes, SQLEpress provides an official one ) and execute a standard
CREATE LOGIN [MACHINE_NAME\MyMachineAllowedAccounts] FROM WINDOWS;
and it will succed as expected..

regards

|||

The plot thickens. If I define a group MyGroup myself, then I can do CREATE LOGIN [MACHINE\MyGroup] FROM WINDOWS and it works. If I try to use one of the predefined groups such as MACHINE\Users, it fails. I don't at this point know whether this rule is constrained to local groups or whether it applies to global groups also. The group I added this morning in the office was a global group that we had created (i.e. it wasn't a predefined one), whereas the group that I failed to add was a predefined local group. I concluded that the important difference was whether the group was local or global, but now I realise that it could have been purely down to whether the group was predefined or created after installation. I don't see why SQL Server would want to prevent the use of predefined groups, and I've seen no mention of the importance of this distinction in any of the documentation. Can anyone throw any light on this?

Also, what is this GUI tool that is supposedly provided? I've looked through all the directories that were installed with SQL EXPRESS and haven't found one.

|||

hi Michael,

michael412 wrote:

The plot thickens. If I define a group MyGroup myself, then I can do CREATE LOGIN [MACHINE\MyGroup] FROM WINDOWS and it works. If I try to use one of the predefined groups such as MACHINE\Users, it fails.

it's only a "syntactical" problem as "how" you reference your predefined group's names...

CREATE LOGIN [BUILTIN\Users] FROM WINDOWS;

I don't at this point know whether this rule is constrained to local groups or whether it applies to global groups also. The group I added this morning in the office was a global group that we had created (i.e. it wasn't a predefined one), whereas the group that I failed to add was a predefined local group. I concluded that the important difference was whether the group was local or global, but now I realise that it could have been purely down to whether the group was predefined or created after installation. I don't see why SQL Server would want to prevent the use of predefined groups, and I've seen no mention of the importance of this distinction in any of the documentation. Can anyone throw any light on this?

check your syntax

CREATE LOGIN [BUILTIN\Users] FROM WINDOWS;

Also, what is this GUI tool that is supposedly provided? I've looked through all the directories that were installed with SQL EXPRESS and haven't found one.

SQL Server Management Studio Express is not installed as part of the "client components" of the "standard" package and must be manually and separately downloaded and installed.. on the contrary, SQL Server Express with Advanced Services includes it and the tool can be selected to be installed as part of the installation process..

regards

|||

Thanks Andrea - I think that's me sorted out now. Sorry to take so long to reply - I got tired and took a couple of days break from the PC.

Best regards,

Michael

Sunday, February 12, 2012

cannot generate ResultSet code

I am using Visual Studio 2005 and SQL Server mobile edition. From Visual Studio I went to Data->Add New Data Source. From there I created and added an SQL server Mobile database. I want to use result sets instead of data sets. A file was added to my profect called: "databaseNameDataSet.xsd". In the properties for that file, when I change the Custom Tool property to MSResultSetGenerator, I get the following error:

Failed to generate ResultSet code. Typed ResultSets are only valid for Microsoft SQL Server Mobile Edition databases.

But I am using a SQL Server Mobile Edition database. Any help will be appreciated.

We have tried to do the same but everything seems to be working on our side. Can you please let us know the exact repro steps so that I can repro here locally. Also can you try doing yourself the same steps in a fresh project?

Thanks

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||I have tried starting a new project and doing it with an existing project. You asked me to tell you the steps I did, but I already told you all the steps. I did finally get it working by starting a new project and adding an example database(northwind). For some reason that worked. I think somehow when it doesn't work, is when I create a new database, and it shows up in my solution explorer and in my server explorer, but not in my data sources. Why would it not be in my data sources when I just added it using the method mentioned where I choose add new data source? Anyway, even though I don't know what I did I finally got it addded as a data source, and it is working for now.|||

Glad that things are working on your end. Thanks for using SQL Mobile.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||i had to remove the |DataDirectory| tag in my connection string then it worked , when i add it back in the MSResultSetGenerator fails.

cannot generate ResultSet code

I am using Visual Studio 2005 and SQL Server mobile edition. From Visual Studio I went to Data->Add New Data Source. From there I created and added an SQL server Mobile database. I want to use result sets instead of data sets. A file was added to my profect called: "databaseNameDataSet.xsd". In the properties for that file, when I change the Custom Tool property to MSResultSetGenerator, I get the following error:

Failed to generate ResultSet code. Typed ResultSets are only valid for Microsoft SQL Server Mobile Edition databases.

But I am using a SQL Server Mobile Edition database. Any help will be appreciated.

We have tried to do the same but everything seems to be working on our side. Can you please let us know the exact repro steps so that I can repro here locally. Also can you try doing yourself the same steps in a fresh project?

Thanks

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||I have tried starting a new project and doing it with an existing project. You asked me to tell you the steps I did, but I already told you all the steps. I did finally get it working by starting a new project and adding an example database(northwind). For some reason that worked. I think somehow when it doesn't work, is when I create a new database, and it shows up in my solution explorer and in my server explorer, but not in my data sources. Why would it not be in my data sources when I just added it using the method mentioned where I choose add new data source? Anyway, even though I don't know what I did I finally got it addded as a data source, and it is working for now.
|||

Glad that things are working on your end. Thanks for using SQL Mobile.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||i had to remove the |DataDirectory| tag in my connection string then it worked , when i add it back in the MSResultSetGenerator fails.

cannot generate ResultSet code

I am using Visual Studio 2005 and SQL Server mobile edition. From Visual Studio I went to Data->Add New Data Source. From there I created and added an SQL server Mobile database. I want to use result sets instead of data sets. A file was added to my profect called: "databaseNameDataSet.xsd". In the properties for that file, when I change the Custom Tool property to MSResultSetGenerator, I get the following error:

Failed to generate ResultSet code. Typed ResultSets are only valid for Microsoft SQL Server Mobile Edition databases.

But I am using a SQL Server Mobile Edition database. Any help will be appreciated.

We have tried to do the same but everything seems to be working on our side. Can you please let us know the exact repro steps so that I can repro here locally. Also can you try doing yourself the same steps in a fresh project?

Thanks

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||I have tried starting a new project and doing it with an existing project. You asked me to tell you the steps I did, but I already told you all the steps. I did finally get it working by starting a new project and adding an example database(northwind). For some reason that worked. I think somehow when it doesn't work, is when I create a new database, and it shows up in my solution explorer and in my server explorer, but not in my data sources. Why would it not be in my data sources when I just added it using the method mentioned where I choose add new data source? Anyway, even though I don't know what I did I finally got it addded as a data source, and it is working for now.
|||

Glad that things are working on your end. Thanks for using SQL Mobile.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||i had to remove the |DataDirectory| tag in my connection string then it worked , when i add it back in the MSResultSetGenerator fails.

Cannot Forward Scheduled PDF Attachments from Outlook Web Access

I cannot forward pdf attachments that were created via daily scheduling
within outlook web access. This does not seem to occur with manually
attached pdfs that were created via Reporting Services or from within regular
outlook. This leads me to believe there is something funky with the WAY the
attachment is done in daily schedules. Please Advise.
Thanks,
Scott EguiresDidn´t had that problem, even I did that sometime on my own, perhaps if
nobody knows something about it you could keep in touch with that guy from
the post to see wheter he solved the problem in some way:
http://groups.google.de/group/microsoft.public.sqlserver.reportingsvcs/browse_frm/thread/15ca7440b6815a48/ef9c4b2c34e979cd?q=forward+attachments&rnum=2&hl=de#ef9c4b2c34e979cd
--
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Scott Eguires" <ScottEguires@.discussions.microsoft.com> schrieb im
Newsbeitrag news:7D9D869A-1F6B-4D41-8CB9-BD962F6411CE@.microsoft.com...
>I cannot forward pdf attachments that were created via daily scheduling
> within outlook web access. This does not seem to occur with manually
> attached pdfs that were created via Reporting Services or from within
> regular
> outlook. This leads me to believe there is something funky with the WAY
> the
> attachment is done in daily schedules. Please Advise.
> Thanks,
> Scott Eguires

cannot find database.mdf under app_Data using sql

Why can I not connect to the database created under app_data folder with sql express and view the tables. I am trying to understand the structure of how it works, I have gone through the My personal web site starter kit's files to try and understand how it writes to the database.Why is the databse not visible in SQL express and why are the databases attached database files and not directly in SQL2005.

I'm not sure I understand what you are asking. My version of the Personal Web Site starter kit came with the mdf in with all the other files. In VWD, I chose Add ASP.NET folder, and created an App_Data folder. I moved the Personal.mdf file into it and double clicked, and voila - it opened in Database Explorer.

If I wanted to examine such a database through Sql Server Management Studio (Express), I would attach the file myself to make it available to SSMSE.

|||

In VWD 2005 express, if you select database explorer you will see the connection to aspnetdb.mdf, which is created by personal starter kit. If you try and expand it to view the tables or store procedures it does not allow you to. Why? If I create a database manually in sql server express, and then create a connection via database explorer I can see all the tables created.

Error(This is the error I get when trying to view aspnetdb.mdf in database explorer

An error has occurred while establishing a connection to the server. When connecting to sql server 2005, this failure may be caused by the fact that under the default settings SQL server does not allow remote connections(Provider:SQL Network interface, error 26 errorlocating server/instance specified.

I also cannot create a .mdf file by adding " add new item SQL database"

Error

(Connection to SQL server files(*.mdf) requires SQL server express 2005 to function properly. Please verify the installation of the component or download from URL http://go.microsoft.com/fwlink/?linkid=49251.

SQL Express was installed at the same time when I installed VWD express 2005. So it is installed. I have aslo installed the SQL server managment studio

What I am ultimately trying to achieve is creating a authentication create user, but I do not want to use the Web administration tool for the reason I want the user to enter his information required and then auto generate a password but using his email address as his username, and then sending it to him via email for activation. I would prefer to customise the my ouwn database as to using aspnetdb.mdf


|||

Problem solved. If you install SQL 2000, and then uninstall and instal sql express 2005 it leaves some or other entries behind, thus it will not allow you to edit or view attached mdf database files it will tell you the instance name or server could not be found. I could not find the exact entry in ht registry so I reinstalled my os and applications and now it works fine.

Friday, February 10, 2012

Cannot find Snapshot - SQL 2005

Running Win 2003 & SQL 2005 on both machines.
I created a publication on serverA. I subscribed to it on serverB. I
received the error...
Command attempted:
E:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\REPLDATA\unc\unc\R99S-SQLA_DBMOTO_AS400 MASTER
FILES\20061206113840\APVENDP_2.sch
(Transaction sequence number: 0x000049A200000088002A00000000, Command
ID: 16)
Error messages:
The device is not ready.
Thinking that replication was attempting to access the snapshot
locally, I changed to the location of the snapshot in the subscription
to \\serverA\E$\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\REPLDATA\unc\unc\R99S-SQLA_DBMOTO_AS400 MASTER
FILES\20061206113840\APVENDP_2.sch
Note that the location of the snapshot is ....repldata\unc\unc\... in
the error message. I browsed to serverA & there is no
....repldata\unc\unc folder, just a ...repldata\unc folder, then the
folder R99S-SQLA_DBMOTO_AS400 MASTER FILES.
Next I changed the location of the snapshot to reflect where the
subscription was looking ...repldata\unc\unc & now the subscription is
initialized & receiving transactions from the publisher.
With all that said....does anyone know why I had to jump through these
back flips to get replication to work when I did not deviate from the
defaults?
AHIA,
Larry...
It sounds like your default snapshot share location was not specified
correctly. I think it was the double unc which gave you this error message.
I take it this is a pull, if that is the case you don't need to use a UNC.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"LPR-3rd" <lreames@.gmail.com> wrote in message
news:1165429383.129815.72350@.n67g2000cwd.googlegro ups.com...
> Running Win 2003 & SQL 2005 on both machines.
> I created a publication on serverA. I subscribed to it on serverB. I
> received the error...
> Command attempted:
> E:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\REPLDATA\unc\unc\R99S-SQLA_DBMOTO_AS400 MASTER
> FILES\20061206113840\APVENDP_2.sch
> (Transaction sequence number: 0x000049A200000088002A00000000, Command
> ID: 16)
> Error messages:
> The device is not ready.
> Thinking that replication was attempting to access the snapshot
> locally, I changed to the location of the snapshot in the subscription
> to \\serverA\E$\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\REPLDATA\unc\unc\R99S-SQLA_DBMOTO_AS400 MASTER
> FILES\20061206113840\APVENDP_2.sch
> Note that the location of the snapshot is ....repldata\unc\unc\... in
> the error message. I browsed to serverA & there is no
> ...repldata\unc\unc folder, just a ...repldata\unc folder, then the
> folder R99S-SQLA_DBMOTO_AS400 MASTER FILES.
> Next I changed the location of the snapshot to reflect where the
> subscription was looking ...repldata\unc\unc & now the subscription is
> initialized & receiving transactions from the publisher.
> With all that said....does anyone know why I had to jump through these
> back flips to get replication to work when I did not deviate from the
> defaults?
>
> AHIA,
> Larry...
>
|||Thanks for the response Hilary. How do I fix this? I do not want to
have to do this for every publication/subscription I create.
Larry...
On Dec 6, 12:41 pm, "Hilary Cotter" <hilary.cot...@.gmail.com> wrote:
> It sounds like your default snapshot share location was not specified
> correctly. I think it was the double unc which gave you this error message.
> I take it this is a pull, if that is the case you don't need to use a UNC.
>

Cannot find PInvoke DLL SqlCeMe30.dll

I create a smll app that should created a database in the hand held, it compiles without problem but when I debugg it

I ge the error message: Cannot find PInvoke DLL SqlCeMe30.dll

I found such dll to be located in:C:\Program Files\Microsoft SQL Server 2005 Mobile Edition\Device\Mobile\v3.0\wce500\x86 among other folders.

Why then is "not found"?

Soft reset your device, reinstall the SQL Mobile CAB(s) and try again. I have seen issues on WM5 devices where it appears that SQL Mobile cannot find DLLs that are actually there. I've seen it under low memory situations on the device and immediately following errors during replication or RDA.

Darren

|||

hi, i have found this issue very frequencly happened on the WM5 devices.

I believe softreset and reinstall is a better way but it is cause by the programming behaviour which is not apply logically. For example create a lot of object and did not dispose properly. Is there anyother way to avoid the low memory occur by clear off the prvious undispose object or thread that are still runnning in the background?

Please advise.

Thanks

|||

Maybe this will be helpful: (LoadLibrary) - http://forums.microsoft.com/msdn/showpost.aspx?postid=1349826&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=1