Showing posts with label contains. Show all posts
Showing posts with label contains. Show all posts

Monday, March 26, 2012

Error 16916: A cursor with the name "tentative_cursor" does not exist

Hi,

I am creating a stored procedure which contains the declaration of a cursor, fetch the cursor, close the cursor, deallocate cursor. I tried executing this code in SQL analyzer and found working. But when I use the same code inside a create stored procedure, it throws the following error message.

Error 16916: A cursor with the name "tentative_cursor" does not exist

As a result, I am not able to proceed in creation of stored procedure with the above SQL statements.

Can any one help me where the problem is..

My SQL statements..
---
DECLARE tentative_cursor CURSOR
FOR select * from TbTentativeBookingTable where ExpTime < GETDATE()
GO
OPEN tentative_cursor
GO
DECLARE @.transactionno BIGINT
...
...
FETCH ...
CLOSE tentative_cursor
---

Thanks
-SudhakarThe GO keyword serves to terminate a SQL batch, so it implicitly ends a stored procedure declaration. There may be other problems too, but at the very least you need to remove the GO keyword(s).

-PatP

Friday, February 17, 2012

Error

I have full text catalog on my table.
SELECT TOP 10 * FROM MyTable My(NOLOCK)
WHERE CONTAINS My.*, '"a.b.c.d*"')
query execute error;
"Msg 9937, Level 16, State 5, Line 1
Too many full-text columns or the full-text query is too complex to be
executed."
otherwise another query which doesn't have --"--
SELECT TOP 10 * FROM MyTable My(NOLOCK)
WHERE CONTAINS My.*, 'a.b.c.d*')
returns data normally.
what is the differences between them?
Is anyone can help me?
The wildcard is applied to each term in your query, so its a* and b* and c*
and d*. That is why you are getting the error. I can't see a good solution
to this.
RelevantNoise.com - dedicated to mining blogs for business intelligence.
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
"Deniz Emeci" <Deniz Emeci@.discussions.microsoft.com> wrote in message
news:176E6C5D-D092-42B7-A7AD-F501304CA6D7@.microsoft.com...
>I have full text catalog on my table.
> SELECT TOP 10 * FROM MyTable My(NOLOCK)
> WHERE CONTAINS My.*, '"a.b.c.d*"')
> query execute error;
> "Msg 9937, Level 16, State 5, Line 1
> Too many full-text columns or the full-text query is too complex to be
> executed."
>
> otherwise another query which doesn't have --"--
> SELECT TOP 10 * FROM MyTable My(NOLOCK)
> WHERE CONTAINS My.*, 'a.b.c.d*')
> returns data normally.
> what is the differences between them?
> Is anyone can help me?
|||a.b.c.d is one term like u.s.a.(united states of america)
so i dont want to divide my term.
"Hilary Cotter" wrote:

> The wildcard is applied to each term in your query, so its a* and b* and c*
> and d*. That is why you are getting the error. I can't see a good solution
> to this.
> --
> RelevantNoise.com - dedicated to mining blogs for business intelligence.
> 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
> "Deniz Emeci" <Deniz Emeci@.discussions.microsoft.com> wrote in message
> news:176E6C5D-D092-42B7-A7AD-F501304CA6D7@.microsoft.com...
>
>

Wednesday, February 15, 2012

ERREUR to open a data base with SSMSEE

I installed Visual Studio 2005 Standard Edition which contains SQL Server Express.

I downloaded and installed SQL Server Management Studio Express. It run !

I established a connection server BellFixe\SQLEXPRESS (BellFixe is the name of my computer). Ok.

The command " add " of the function " attach " of SSMSE allows to navigate on the disk and to attach diverse data bases but it refuses to open the directory D:\Documents and Settings\Alain (this path is the base of all my directories of data). This directory appears empty. I cannot thus attach the data bases which are under this directory !

I can open a data base only if it is elsewhere localised.

Why this limitation of access and how to resolve this problem? There is certainly a relation with the management of the users of the PC.

I am only user and administrator of my PC under XP. All my directories of data are under D:\Documents and Settings\Alain. The explorer Windows allows to navigate everywhere the disk.

Tanks.

hi,

the position you specfied is not a good one for such a kind of data as it is meant as "private" storage for the current (aka Alain) logged user... you should modify the path to something available to all users, even if SQLExpress always is run under the credential of the account you specified at install time or later, via the Surface Area Configuration or SQL Server Configuration Manager..

regards

|||

But SSMSEE should be able to cross all the disk, in mode administrator. He is not right for such a limitaion there is not it ?

This is only an MSDN exercise "Coatch ASP.NET". But it is blocking for me.

Regards

|||

hi,

AchLog wrote:

But SSMSEE should be able to cross all the disk, in mode administrator. He is not right for such a limitaion there is not it ?

is your SQL Server engine service running under Network Service or Local Service account?

please verify via SQL Server Configuration Manager..

regards

|||

Thank You for your answer Andrea.

SQL Server is local on my machine of development.

I have not yet understood how to verify the connexion mode with SQL Server Configuration Manager. I am a little bit novice with SQL Server and his tools.
Can you tell me how to verify it?

Here method indicated by coach ASP.NET to attach a local data base with SSMSEE. On my computer it is the step 4 which does not function.

===========================================

A simple solution is to attach your data base to your waiter SQL Express. It is now very easy with the console of administration “SQL Server Management Studio Express train” of the final version of SQL Server Express:

1 - to launch the console of administration since the menu To start/All the programs/Microsoft SQL Server 2005/SQL Server Management Studio Express train CTP.

2 - connect to the waiter of name”. \ SQLExpress " via the Windows authentification.

3 - in the explorer of object, made a right click on the file “Databases” then the order “attach”.

4 - find on the disc your file .mdf and add it. Your data base is now attached to SQL Server. You must see it in the list of the data bases of the console.

============================================
Thank you

|||

AchLog wrote:

Thank You for your answer Andrea.

SQL Server is local on my machine of development.

I have not yet understood how to verify the connexion mode with SQL Server Configuration Manager. I am a little bit novice with SQL Server and his tools.
Can you tell me how to verify it?

execute the SQL Server Configuration Manager.. in the SQL Server services locate the SQL Server engine you are dealing with.. right click on it and access it's properties.. you can there see (and set) the account running the services... if you modify it you have to restart the service..

AchLog wrote:

Here method indicated by coach ASP.NET to attach a local data base with SSMSEE. On my computer it is the step 4 which does not function.

===========================================

A simple solution is to attach your data base to your waiter SQL Express. It is now very easy with the console of administration “SQL Server Management Studio Express train” of the final version of SQL Server Express:

1 - to launch the console of administration since the menu To start/All the programs/Microsoft SQL Server 2005/SQL Server Management Studio Express train CTP.

2 - connect to the waiter of name”. \ SQLExpress " via the Windows authentification.

3 - in the explorer of object, made a right click on the file “Databases” then the order “attach”.

4 - find on the disc your file .mdf and add it. Your data base is now attached to SQL Server. You must see it in the list of the data bases of the console.

============================================
Thank you

the "explanation" is correct... this is the "traditional" way to attach a database to a SQL Server instance via SSMS (and SSMSE), but not to "user instances" as the perform differently...

regards

|||

Tank You Andrea,

The parameters are the following ones :

Name : bellfixe\sqlexpress

ERREUR to open a data base with SSMSEE

I installed Visual Studio 2005 Standard Edition which contains SQL Server Express.

I downloaded and installed SQL Server Management Studio Express. It run !

I established a connection server BellFixe\SQLEXPRESS (BellFixe is the name of my computer). Ok.

The command " add " of the function " attach " of SSMSE allows to navigate on the disk and to attach diverse data bases but it refuses to open the directory D:\Documents and Settings\Alain (this path is the base of all my directories of data). This directory appears empty. I cannot thus attach the data bases which are under this directory !

I can open a data base only if it is elsewhere localised.

Why this limitation of access and how to resolve this problem? There is certainly a relation with the management of the users of the PC.

I am only user and administrator of my PC under XP. All my directories of data are under D:\Documents and Settings\Alain. The explorer Windows allows to navigate everywhere the disk.

Tanks.

hi,

the position you specfied is not a good one for such a kind of data as it is meant as "private" storage for the current (aka Alain) logged user... you should modify the path to something available to all users, even if SQLExpress always is run under the credential of the account you specified at install time or later, via the Surface Area Configuration or SQL Server Configuration Manager..

regards

|||

But SSMSEE should be able to cross all the disk, in mode administrator. He is not right for such a limitaion there is not it ?

This is only an MSDN exercise "Coatch ASP.NET". But it is blocking for me.

Regards

|||

hi,

AchLog wrote:

But SSMSEE should be able to cross all the disk, in mode administrator. He is not right for such a limitaion there is not it ?

is your SQL Server engine service running under Network Service or Local Service account?

please verify via SQL Server Configuration Manager..

regards

|||

Thank You for your answer Andrea.

SQL Server is local on my machine of development.

I have not yet understood how to verify the connexion mode with SQL Server Configuration Manager. I am a little bit novice with SQL Server and his tools.
Can you tell me how to verify it?

Here method indicated by coach ASP.NET to attach a local data base with SSMSEE. On my computer it is the step 4 which does not function.

===========================================

A simple solution is to attach your data base to your waiter SQL Express. It is now very easy with the console of administration “SQL Server Management Studio Express train” of the final version of SQL Server Express:

1 - to launch the console of administration since the menu To start/All the programs/Microsoft SQL Server 2005/SQL Server Management Studio Express train CTP.

2 - connect to the waiter of name”. \ SQLExpress " via the Windows authentification.

3 - in the explorer of object, made a right click on the file “Databases” then the order “attach”.

4 - find on the disc your file .mdf and add it. Your data base is now attached to SQL Server. You must see it in the list of the data bases of the console.

============================================
Thank you

|||

AchLog wrote:

Thank You for your answer Andrea.

SQL Server is local on my machine of development.

I have not yet understood how to verify the connexion mode with SQL Server Configuration Manager. I am a little bit novice with SQL Server and his tools.
Can you tell me how to verify it?

execute the SQL Server Configuration Manager.. in the SQL Server services locate the SQL Server engine you are dealing with.. right click on it and access it's properties.. you can there see (and set) the account running the services... if you modify it you have to restart the service..

AchLog wrote:

Here method indicated by coach ASP.NET to attach a local data base with SSMSEE. On my computer it is the step 4 which does not function.

===========================================

A simple solution is to attach your data base to your waiter SQL Express. It is now very easy with the console of administration “SQL Server Management Studio Express train” of the final version of SQL Server Express:

1 - to launch the console of administration since the menu To start/All the programs/Microsoft SQL Server 2005/SQL Server Management Studio Express train CTP.

2 - connect to the waiter of name”. \ SQLExpress " via the Windows authentification.

3 - in the explorer of object, made a right click on the file “Databases” then the order “attach”.

4 - find on the disc your file .mdf and add it. Your data base is now attached to SQL Server. You must see it in the list of the data bases of the console.

============================================
Thank you

the "explanation" is correct... this is the "traditional" way to attach a database to a SQL Server instance via SSMS (and SSMSE), but not to "user instances" as the perform differently...

regards

|||

Tank You Andrea,

The parameters are the following ones :

Name : bellfixe\sqlexpress