New errors access MS SQL Server Database on (CREATE DATABASE and Batch SQL Statement)

------=_NextPart_000_002B_01C2F2CB.0C201FF0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I'm running ActiveState perl 5.8.0 on a WIN2K box with MS SQL Server =
2000.

Recently I updated DBD-ODBC to v1.05 and DBI to v1.35

Now I get the following errors executing some sql commands

CREATE SQLSTMT:[CREATE DATABASE POMS_SER ON (NAME =3D 'POMS_SER_DAT', =
FILENAME =3D 'd:\Database\POMS\POMS_SER_Data.MDF', SIZE =3D 10MB) LOG ON =
( NAME =3D 'POMS_SER_LOG', FILENAME =3D =
'd:\Database\POMS\POMS_SER_Log.MDF', SIZE =3D 5MB)]

DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver][SQL =
Server]The CREATE DATABASE process is allocating 10.00 MB on disk =
'POMS_SER_DAT'. (SQL-01000)
[Microsoft][ODBC SQL Server Driver][SQL Server]The CREATE DATABASE =
process is allocating 5.00 MB on disk 'POMS_SER_LOG'. (SQL-01000) at =
D:\Transportation\POMS\Tools\Scotts_Unified_POMS_Install.pl line 766.

Database POMS_SER Created!

EXEC SQLSTMT:[USE POMS_SER
exec sp_grantdbaccess 'LLVAH-STRICSC\IUSR_POMS_SER', 'IUSR_POMS_SER']

DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver]Invalid =
cursor state (SQL-24000)(DBD: dbd_describe/SQLNumResultCols err=3D-1) at =
D:\Transportation\POMS\Tools\Scotts_Unified_POMS_Install.pl line 827.
Can't execute statement
USE POMS_SER
exec sp_grantdbaccess 'LLVAH-STRICSC\IUSR_POMS_SER', 'IUSR_POMS_SER'
[Microsoft][ODBC SQL Server Driver]Invalid cursor state (SQL-24000)(DBD: =
dbd_describe/SQLNumResultCols err=3D-1) at =
D:\Transportation\POMS\Tools\Scotts_Unified_POMS_Install.pl line 827.

Code fragments that generated this follow;

 my $the_odbc =3D 'dbi:ODBC:LocalServer';

  my $dbh =3D DBI->connect($the_odbc, '', '', {RaiseError=3D>0});

  my $sqlstmt_s =3D "CREATE DATABASE $db_name";
  $sqlstmt_s .=3D " ON (NAME =3D \'$db_logical_name\', FILENAME =3D =
\'$db_file_name\', SIZE =3D $db_size)";
  $sqlstmt_s .=3D " LOG ON ( NAME =3D \'$tlog_logical_name\', FILENAME =
=3D \'$tlog_file_name\', SIZE =3D $tlog_size)";
  print "CREATE SQLSTMT:[$sqlstmt_s]\n";
  my $sth_s =3D $dbh->prepare($sqlstmt_s) || die "Can't prepare =
statement\n$sqlstmt_s\n$DBI::errstr";
  my $rc =3D $sth_s->execute || die "Can't execute =
statement\n$sqlstmt_s\n$DBI::errstr"; #### LINE 766
  $sth_s->finish;
  print "Database $db_name Created!\n";

  $sqlstmt_s =3D "USE $db_name";
  $sqlstmt_s .=3D "\nexec sp_grantdbaccess \'$db_user_and_domain\', =
\'$db_user\'";
  print "EXEC SQLSTMT:[$sqlstmt_s]\n";
  $sth_s =3D $dbh->prepare($sqlstmt_s) || die "Can't prepare =
statement\n$sqlstmt_s\n$DBI::errstr";
  $rc =3D $sth_s->execute || die "Can't execute =
statement\n$sqlstmt_s\n$DBI::errstr"; ##### LINE 827
  $sth_s->finish;


E. Scott Stricker - NGIT @ Smartlink
------=_NextPart_000_002B_01C2F2CB.0C201FF0--

0
stricsc
3/25/2003 5:35:41 PM
perl.dbi.users 11083 articles. 1 followers. Follow

1 Replies
1028 Views

Similar Articles

[PageSpeed] 4

>=20
> I'm running ActiveState perl 5.8.0 on a WIN2K box with MS SQL=20
> Server 2000.
>=20
> Recently I updated DBD-ODBC to v1.05 and DBI to v1.35
>=20
> Now I get the following errors executing some sql commands
>=20
> CREATE SQLSTMT:[CREATE DATABASE POMS_SER ON (NAME =3D=20
> 'POMS_SER_DAT', FILENAME =3D=20
> 'd:\Database\POMS\POMS_SER_Data.MDF', SIZE =3D 10MB) LOG ON (=20
> NAME =3D 'POMS_SER_LOG', FILENAME =3D=20
> 'd:\Database\POMS\POMS_SER_Log.MDF', SIZE =3D 5MB)]
>=20
> DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server=20
> Driver][SQL Server]The CREATE DATABASE process is allocating=20
> 10.00 MB on disk 'POMS_SER_DAT'. (SQL-01000) [Microsoft][ODBC=20
> SQL Server Driver][SQL Server]The CREATE DATABASE process is=20
> allocating 5.00 MB on disk 'POMS_SER_LOG'. (SQL-01000) at=20
> D:\Transportation\POMS\Tools\Scotts_Unified_POMS_Install.pl line 766.
>=20
> Database POMS_SER Created!

>=20
> I've seen similar problems with the newer versions of the dbi=20
> and odbc software on my WIN2K box running MS SQL Server. =20
> Have not seen any reported workarounds or fixes yet.

On the surface, it looks like the create database informational message =
is
being treated as an error and that may be intentional on the SQL Server =
ODBC
driver side.  I'll have to look at it.  But, you should think about =
calling
"do" for these, as neither of these statements should return result sets =
(At
least I do not believe they should.)  That should solve the second =
issue.

Jeff

>=20
> EXEC SQLSTMT:[USE POMS_SER
> exec sp_grantdbaccess 'LLVAH-STRICSC\IUSR_POMS_SER', 'IUSR_POMS_SER']
>=20
> DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server=20
> Driver]Invalid cursor state (SQL-24000)(DBD:=20
> dbd_describe/SQLNumResultCols err=3D-1) at=20
> D:\Transportation\POMS\Tools\Scotts_Unified_POMS_Install.pl=20
> line 827. Can't execute statement USE POMS_SER exec=20
> sp_grantdbaccess 'LLVAH-STRICSC\IUSR_POMS_SER',=20
> 'IUSR_POMS_SER' [Microsoft][ODBC SQL Server Driver]Invalid=20
> cursor state (SQL-24000)(DBD: dbd_describe/SQLNumResultCols=20
> err=3D-1) at=20
> D:\Transportation\POMS\Tools\Scotts_Unified_POMS_Install.pl line 827.
>=20
> Code fragments that generated this follow;
>=20
>  my $the_odbc =3D 'dbi:ODBC:LocalServer';
>=20
>   my $dbh =3D DBI->connect($the_odbc, '', '', {RaiseError=3D>0});
>=20
>   my $sqlstmt_s =3D "CREATE DATABASE $db_name";
>   $sqlstmt_s .=3D " ON (NAME =3D \'$db_logical_name\', FILENAME =3D=20
> \'$db_file_name\', SIZE =3D $db_size)";
>   $sqlstmt_s .=3D " LOG ON ( NAME =3D \'$tlog_logical_name\',=20
> FILENAME =3D \'$tlog_file_name\', SIZE =3D $tlog_size)";
>   print "CREATE SQLSTMT:[$sqlstmt_s]\n";
>   my $sth_s =3D $dbh->prepare($sqlstmt_s) || die "Can't prepare=20
> statement\n$sqlstmt_s\n$DBI::errstr";
>   my $rc =3D $sth_s->execute || die "Can't execute=20
> statement\n$sqlstmt_s\n$DBI::errstr"; #### LINE 766
>   $sth_s->finish;
>   print "Database $db_name Created!\n";
>=20
>   $sqlstmt_s =3D "USE $db_name";
>   $sqlstmt_s .=3D "\nexec sp_grantdbaccess=20
> \'$db_user_and_domain\', \'$db_user\'";
>   print "EXEC SQLSTMT:[$sqlstmt_s]\n";
>   $sth_s =3D $dbh->prepare($sqlstmt_s) || die "Can't prepare=20
> statement\n$sqlstmt_s\n$DBI::errstr";
>   $rc =3D $sth_s->execute || die "Can't execute=20
> statement\n$sqlstmt_s\n$DBI::errstr"; ##### LINE 827
>   $sth_s->finish;
>=20
>=20
> E. Scott Stricker - NGIT @ Smartlink
>=20


0
jurlwin
3/31/2003 11:50:36 PM
Reply:

Similar Artilces:

Why does a simple select query in MS Access return the error: [Intersolv][ODBC SQL Server Driver][SQL Server]ct_results(): user api layer: internal client library error: Read from the server has timed
I have applied the information contained in support document 10447954. That did not resolve the problem. I am running a simple query with one criteria and one table Thanks. Hi Bill, The doc refers to a different ODBC driver (for DirectConnect product) so you might have a completely different problem. The message implies you are using ODBC 12.0 (Client Library based) or prior since the message indicates CtLib info. You might want to post more details involved with getting to this error. You also might want to post exact versions of ASE and ODBC driver, including Open ...

Problem with creating new SQL server database in VWDExpress using SQL Server 2005 Express
 when I try to create a SQL Database from Visual Web Developer 2005 Express Edition, I get the following error message: "Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URL http://go.microsoft.com/fwlink/?LinkID=49251" When I go to that URL, it brings me to the page to download SQL Server Express 2005. any ideathanks for advance  Did you install SQL Server Express on your server/system? JeffPlease: Don't forget to click "Mark as Answe...

How to create SQL Mobile 2005 database from a MS SQL 2005 database?
Hi guys,I'm trying to find solutions to help me in creating a SQL Mobile 2005 database from a SQL 2005 database, with the same table structure and data.May I know how can I achieve this?Thanks.Regards,Jenson Hi Jenson, Visual Studio 2005 or SQL Server 2005 is able to open SQL Mobile 2005 database. However you need either SQL or .NET code to convert SQL Mobile 2005 database this way. Here is an example from MSDN forums which is to convert to xls instead: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=78640&SiteID=1Zhao Ji MaSincerely,Microsoft Online Community Suppo...

Please Help me:SQL statement failed: (-301) Internal database error ??? -- transaction rolled back SQL statement failed: (-101) Not connected to a database
Hi all, I am using Adaptive Server Anywhere 8 version 8.0.2.4239. I am able to sync successfully between 2 desktops with the same version. When I am trying to sync with my pocket pc device version 8.0.4122, Towards the end of Synchronization (nearly 95% completed) ,I am getting this error "E. 05/29 19:28:31. SQL statement failed: (-301) Internal database error ??? -- transaction rolled back E. 05/29 19:28:31. SQL statement failed: (-101) Not connected to a database" The log file contains E. 05/29 19:28:31. SQL statement failed: (-301) Internal database er...

Error 7405 accessing SQL Server database by database link
I'm persistently getting the above error when executing a stored procedure that uses a dabase link to another SQL Server database. I can run the procedure in MS SQL Server management studio fine. I'm setting ANSI_NULLS and ANSI_WARNINGS ON before creating the procedure. Procedure code: SET ANSI_NULLS ON SET ANSI_WARNINGS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[SSP_WAR_RPT_MANUAL_RECLAIM] @adt_sbi_from datetime, @adt_sbi_to datetime, @as_vendor varchar(15) output, @as_campaigns Char(1) AS BEGIN SET ANSI_NULLS O...

Creating New MS SQL Database using SQL (without path)
Hello Everyone, I have to be able to allow a user of my app to create a new MS SQL Database from within the program. I have found the SQL statement to do it - but it requires a full qualified file name. However, I do not want to put in the path. The user may not know where it should go... The user may be using a Database server - and should not be able to speicify a path... It should use the default directory setup for the DB server. Does anyone know the sytax to do this so that I do not have to specify a path with the file name? I have tried a few times - but does not ...

moving an sql server 2005 database to a sql server 2000 database
I am trying to move a database which I wrote in SQL Server 2005 to a SQL Server 2000 database. I'm not sure the best way to do this....... Can anyone enlighten me?.....   this article explains it. http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1149585_tax301536,00.html hth,mcm pizzamaker74: I am trying to move a database which I wrote in SQL Server 2005 to a SQL Server 2000 database. I'm not sure the best way to do this....... Can anyone enlighten me?..... If both are in the same network or box just register the 2005 with the 2000 cr...

Porting Ms Sql Server 6.5 database to Ms Sql Server 7.0
Hi, We have developed a product using PowerBuilder7.0, Ms Sql Server 6.5 and connecting them using powerbuilder native driver. Now we are thinking of porting Ms Sql Server 6.5 database to Ms Sql Server 7.0.As we feel, we could achive new features of Sql server 7.0.e.g row level locking. Actually i want to know, what things i have to do.e.g what sort of connection i have to use? what new features i will able to use?.will Stored procedures work properly. Is there anyting i have to chang in my application(at front end)e.g datawindows or any embeded sql, external functions. Should i po...

SQL Attached mdf database files VS database imported into or created in SQL Server 2005
 Hi all (newbie @ asp.net)(oldie @ ASP 3)What is the purpose of using an attached MDF database files in the App_Data folder on a web site as to importing it into the SQL server directly or creating it on the SQL server. Does a mdf database attached file purely use the SQL server as a connection interface.Is it something similiar to DSN(ODBC) Connections for ms access databases. AFAIK it is only for deployment conveniance, I have always imported the database directly into SQL Server and set up the connection string accordingly.Don't forget to click "Mark as Answer" on the...

Porting Ms Sql Server 6.5 Database to Ms Sql Server 7.0
Hi, We have developed a product using PowerBuilder7.0, Ms Sql Server 6.5 and connecting them using powerbuilder native driver. Now we are thinking of porting Ms Sql Server 6.5 database to Ms Sql Server 7.0.As we feel, we could achive new features of Sql server 7.0.e.g row level locking. Actually i want to know, what things i have to do.e.g what sort of connection i have to use? what new features i will able to use?.will Stored procedures work properly. Is there anyting i have to chang in my application(at front end)e.g datawindows or any embeded sql, external functions. Should i po...

How to create a connection with database in MS-Access or SQL-Server
 Hi all, Recently I was trying to create a connection between my web page and a database created in MS-Access/SQL-Server. But I fail at last. Please help me to do this. Write all the steps. Looking for a perfect solution.   Thanking,Kristian  please do not waste our time... http://www.asp.net/learn/data-access/Matthew M. Osbornhttp://blog.osbornm.comhttp://weblogs.asp.net/asptest"Change the world or go home." Hi Kristian, Connecting to MS-Access or SQL-Server by ADO.NET is simple, you can do a research on the Internet or MSDN. The following de...

ms sql mdf database file attached vs created on sql server
 Hi allI have a question concerning sql database mdf files. In the old days I would user a ms access database. This file would be stored with the actual web files and would utilise a dsn connection. I have noted when designing with vwd 2005 express it allows you to use 2 methods of creating a mdf database. You can either create it as an attachment mdf or you can create it directly using sql manager. My question is, if you create the mdf database as an attachement file can you store it in the same manner as if you where using a ms access database, meaning can you store it with the w...

Migrating sql server 2005 express database to sql server 2005 database
Hi, I have an application developed using VWD and sqlserver express database. The express database is turning out to be small in size and we need to migrate to larger sqlserver 2005 database. What are the steps for this migration, please list in detail. Regards, Sandyhttp://www.thequinn.infohttp://www.sksdataservices.comhttp://www.infobasket.info Hi Sandy, To move a database from SQL Express to SQL 2005, you can use the following steps. 1. If your database file is attached to the server instance, you will need to detach it first using SQL management studio. If it is under App_Data folde...

SQL Server Database File vs SQL Server Database -VWD Express
VWD Express 2008, SQL Server Express 2005. I have been using SQL Server Express with ASP and VB for some years - I just create a DB in Management Studio Express, have SQL Server set to 'SQL Server and Windows authentication', and use a connection string with 'sa' and a password (I never have managed to get it working with 'integrated security', but that is probably irrelevant to this post). So I have a list of DB's attached to SQL Server that I can see, attach, detach etc in MSE. I am getting started with .NET. Working through a VWD Express book tutori...

Web resources about - New errors access MS SQL Server Database on (CREATE DATABASE and Batch SQL Statement) - perl.dbi.users

User:Jimbo Wales/Statement of principles - Wikipedia, the free encyclopedia
As we move forward with software and social changes, I think it is imperative that I state clearly and forcefully my views on openness and the ...

Category:Articles containing potentially dated statements from July 2011 - Wikipedia, the free encyclopedia ...
This is an administration category . It is used for administration of the Wikipedia project and is not part of the encyclopedia. It contains ...

The innovation nation: Elitist statement which won't generate change
Readers discuss the Turnbull government's innovation statement.

The statements murdered grandmother Helen Dawson Key's family will never get to read
If the family members of Helen Dawson Key had their chance, they would have faced her killer and told of their pain. 

Innovation Statement: Tech industry asks Turnbull for more money, please
The government's Innovation Statement on Monday was widely applauded, but did it go far enough?

Madonna says Sean Penn never assaulted her in court statement, denying previous reports
... of the allegations that have surfaced over the years accusing Sean of incidents of physical assault and abuse against me," she said in a statement ...

FOMC Statement: Fed Funds Rate target range increased to 1/4 to 1/2 percent
FOMC Statement: Information received since the Federal Open Market Committee met in October suggests that economic activity has been expanding ...

What changed in new Fed statement
This is a comparison of today's FOMC statement with the one issued after the Fed's previous policy-making meeting on Oct. 28.

Dallas Stars: Cold facts: Loss to Blues 'clearly a statement' that Stars' upcoming divisional games will ...
Blues 3, Stars 0Click here for the full box score.Three Stars1. David Backes, Blues Goal, assist and fight give St. Louis captain the Gordie... ...

Comic-Con Organizers Issue Statement After Fan Confusion
... desire to expand their annual convention in San Diego. Comic-Con International made the unusual move today of putting out a statement regarding ...

Resources last updated: 12/17/2015 11:40:47 PM