Create SQL Script - CreateFile Error

  • wondering if somebody has encountered such an error while creating/previewing Sql script:

    [SQL-DMO]CreateFile error on <servername>.<databasename>.DP1

    i know this is most probabaly a permission error but what user on what location?

    i use sql server 2000 SP3 on windows 2003 server though i have faced with the same error on windows 2000.

    i appreciate ur comments/solutions.

  • seems no one has faced this, but i was on it throught last 6 months... help needed.

    regards

  • Don't know anything about this but I did find some helpful information on one website....maybe it'll help you identify the source of your problem!

    *********************************

    You need to be aware of a few anomalies about SQLScript. First, you can use the script to populate a new database. However, if you define rules, defaults, and UDDTs in your model database and the script also has CREATE statements for those objects, you will get errors because you are defining a duplicate name.

    Second, if you get a message that states "Cannot add rows to Sysdepends for the current stored procedure because it depends...," you probably need to recompile the stored procedure that generates the error. This message means that the stored procedure depends on one or more objects that have been altered and recompiled since the last time you compiled the stored procedure. Recompiling the stored procedure reestablishes the dependency that SQL Server needs.

    Finally, SQLScript does not create any scripts to add SQL Server logins or create database users. The object scripts are owner qualified, so if a user does not exist in the database where you apply the script, that CREATE will fail.

    ********************







    **ASCII stupid question, get a stupid ANSI !!!**

  • Thank u so much for ur reply

    but none of these was the case. when generating sql script, i can use another machin to do the same job (on same database, table, etc).

    this is sth related to my OS / SQL Server. it maybe sort of write permission on the temp folder where sql tries to create script file on. where is it written as a temp text file? what user must have permission to write there? these are most probable questions i have to work on.

    this error even occurs when i only want to get a preview (by clicking previow button). and i repeat... i do the same job on another machin successfully on the same database, table, ... . i mean i cant generate sql script using my local mmc, rather i connect to my own database through another pc and do it there successfully.

    also... may u please provide me with links u may find relative?

    regards

  • 1) What kind of a script are you trying to generate ?!

    2) Have you compared "roles" and "users" between the successful server and the one in which your "create" fails ?!

    3) Also, if you're using "roles"...have you made sure that you are a member of that role ?!

    4) Have you tried adding your name/account to the "user" role in the database you're trying to script ?!







    **ASCII stupid question, get a stupid ANSI !!!**

  • lets talk about it this way:

    on my mmc i choose a simple database... such as Northwind.

    i right click on it ... all tasks - generate sql script.

    on the window i click show all.

    from the objects pane i select only Categories table.

    after i click on preview after the progres bar reaches the end i suddenly get the error.

    if i click ok, i select a file name, the progress bar reaches the end and i get the error.

    i'm logged in as sa, no restrictions exist and by default i have all permissions.

    on generate sql script window all other checkboxes on formatting and options tabs are clear.

    regards

  • I'm confused about a couple of things...

    Are you using Northwind only as an example or are you actually trying to generate a script for "Categories" ?!

    You say that all other checkboxes under "formatting" & "options" tabs are clear - surely that doesn't include "generate the create command" ?

    Have you tried rightclicking on table object, selecting "copy" and then pasting the results in query analyzer pane ? What happens when you do this ?

    Lastly, have you posted the entire error msg exactly as you see it ?







    **ASCII stupid question, get a stupid ANSI !!!**

  • yeah, northwind was an example.. it's the same for every object.

    i said i leave the default checkboxes, i have checked worked on checkboxes, tried them all. it is not a problem of checkboxes.

    query analyzer works excilent. nothing wrong there.

    the error message is exactly what is shown.

    regards

  • Yashar,

    Here's some things you can try:

    1) In Query Analyzer do a select user_name() to ensure that logging in via both PCs shows identical user names.

    2) Ditto with "Log" in Enterprise Manager with "current activity"...see if you can find out what the difference is when you log in using different PCs.

    3) see if you can detect access rights through Permissions(), sp_table_privileges etc..

    Could you please list everything you've tried so far ?!

    Is it right to assume that you can do everything else in the database - data manipulation etc. and it is only on trying to generate the script that you get an error ?!

    Are you using windows authentication or sql or mixed ?!

    Are the 2 machines you are using on the same network/domain ?







    **ASCII stupid question, get a stupid ANSI !!!**

  • I have ran into that error before.  If you are using some kind of repository software like Microsoft Visual Source Safe, you need to first check out the script from Visual Source Safe first then script out your object using SQL Query Analyzer and then check the object back in. 

    Hope that helps.

     

  • >>wondering if somebody has encountered such an error while creating/previewing Sql script:

    >>[SQL-DMO]CreateFile error on ..DP1

    I experience that error today when using the SQL Server Enterprise Manager client from my PC to connect to a remote server.

    When I connected directly to the remote server (using Terminal Services) and ran the Enterprise Manager from there instead, the preview for the Generate SQL Script command completed without error. So I can't say the exact reason for the error, but that was a workaround that solved the problem for me.

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply