I have used SQL Server Management Studio Express (SSMSE) and Visual Basic 2005 Express (VBE) for more than one year to pick up the Transect-SQL, ADO.NET 2.0, SQL Server 2005 Express, SQLCLR, etc. Yesterday, I used SSEUtil to execute: C:SSEUtil>SSEUtil -l I got the following: 1. master 2. tempdb 3. model1 4. msdb 5. 56713D4D965AE4455_TSVISUAL STUDIO 2005PROJECTSMYFIRSTAPPSSE-VBEXPRESS-WINDOWSAPPLICATION1BINDEBUGMYDB1.MDF 6. C:DOCUMENTS AND SETTINGSCOTT H CHANGMY DOCUMENTSVISUAL STUDIO 2005PROJECTSMASTERDETAILMASTERDETAILBINDEBUGMYDB1.MDF 7. C:ADONET2CODE-JOHNSONVBCHAPTER02CONNECTEDCLASSESSETBINDEBUGPUBS.MDF 8. C:PROGRAM FILESMICROSOFT SQL SERVERMSSQL.1MSSQLDATANORTHWIND.MDF 9. C:ADVENTUREWORKSLTADVENTUREWORKSLT_DATA.MDF I created some VBE projects and used some examples from some tutorial books and websites in the past. But, I thought that user instance timeout is 60 minutes and user instances should be gone after 60 minutes. Why do I have the above-mentioned user instances remained in SSEUtil now? Please explain this thing for me.
I am new to this, but have scoured the web and not found an answer to my question...
I have an execute process task that runs a simple batch file. When this batch file completes with an ERRORLEVEL greater than 0, I would like the task to fail. I thought this simply meant setting the "FailTaskIfReturnCodeIsNotSuccessValue" property to true, and setting the SuccessValue to 0. However, this does not appear to work.
Even with a simple batch file forcing the errorcode to 1 as follows, the task still completes "successfully".
I've been tasked with creating an installer that will either install SQL Express or connect to an existing SQL server. Then I'm to run an .sql script to initialize a new database.
I'm using SSEUtil.exe as there will be no SQLCMD if the existing SQL server is on a remote machine.
Can I package SSEUtil.exe into my installer? Is this legal?
If not, is there a standard SQL Server client I can use to achieve this?
it seems the first line in testscript.sql has to be use "<fullpath> est.mdf", or the script runs against some other database (which one, I'm not sure). It makes we wonder what the attach is doing.
Anyway, I'm looking for a command file way to create and define a database that is not tied to a directory structure. In other words, the commands above may be part of a .bat file, and many different developers may try to run this on their pc in an unknown directory. Any ideas or pointers greatly appreciated! Thanx!
I've been tasked with creating an installer that will either install SQL Express or connect to an existing SQL server. Then I'm to run an .sql script to initialize a new database.
I'm using SSEUtil.exe as there will be no SQLCMD if the existing SQL server is on a remote machine.
Can I package SSEUtil.exe into my installer? Is this legal?
If not, is there a standard SQL Server client I can use to achieve this?
When I try to start the SQL Server Express Utility (SSEUtil.exe), I get the following crash output message below ...
I have checked all of my instances. The all work with windows authentication and sql server authentication.
I have used the surface area configration manager to allow 'everything' and rebooted my machine.
I have tested each through osql. I have turned my firewall on an off. The problem stilll persists.
Could this have something to do with my SQL Services running under the local account?
Y:All_DatabaseMSsSQLServerSQLServerExpressUtilityJan2006Extracted>SSEUtil.exe -consolewnd -server HOME -user sa -password mypass -timeout 60
Unhandled Exception: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Versi at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Console.SetOut(TextWriter newOut) at SSEUtil.ConsoleHandler.EnsureRedirectOutputStream() at SSEUtil.Program.Main(String[] args) The action that failed was: Demand The type of the first permission that failed was: System.Security.Permissions.SecurityPermission The first permission that failed was: <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode"/>
The demand was for: <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode"/>
The assembly or AppDomain that failed was: SSEUtil, Version=1.0.2130.35318, Culture=neutral, PublicKeyToken=null The method that caused the failure was: Void EnsureRedirectOutputStream() The Zone of the assembly that failed was: Internet The Url of the assembly that failed was: file:///Y:/All_DatabaseMSs/SQLServer/SQLServerExpressUtilityJan2006Extracted/SSEUtil.exe
Does sseutil work properly on vista? I need a way to programmatically detach a user instance on Vista. The following launches and runs ok on XP. Doesn't run on Vista? Is there some problem with Process on Vista? sseutil runs ok from the command line in Vista.
public void DetachDatabase(string filePath) { ProcessStartInfo startInfo = new ProcessStartInfo("SSEUtil.exe"); startInfo.WindowStyle = ProcessWindowStyle.Normal; //.Hidden; startInfo.Arguments = "-d "" + filePath + """; Process detachProcess = Process.Start(startInfo); while(!detachProcess.HasExited) { Thread.Sleep(1000); }
I have three systems that running different version of SQL sever.. 1. my notebook - SQL Server Express 2005 2. my WS - SQL Server 2005 Standard 3. my server - SQL Server 2000
I installed SSEUtil to all of them and only the notebook works.. I read the Read me but it doesn't help me resolve my problem so I hope someone from this forum can help me out..
The problem: Running sseutil on system 2. and 3. get this error, but not on 1. SSEUtil 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 Interfaces, error: 26 - Error Locating Server/Instance Specified) Additional information: The service 'MSSQL$SQLEXPRESS' is not installed.
I am currently in the process of setting up an SQL Server Express installation that comes packaged with an application I have written. My problem is that I want to use SQL Server user management (not just windows users) which work fine if I set them up manually. I started writing a script that I have SSEUtil execute once the application is fully installed (a step in my installation script) which sets up the users and passwords etc. The script is similar to the following:
ALTER USER user1 WITH DEFAULT_SCHEMA = MySchema ALTER USER user2 WITH DEFAULT_SCHEMA = MySchema ALTER USER user3 WITH DEFAULT_SCHEMA = MySchema ALTER USER user4 WITH DEFAULT_SCHEMA = MySchema GO
REVOKE ALTER,DELETE,INSERT,SELECT,UPDATE ON MySchema.Table1 FROM MyRole REVOKE ALTER,DELETE,INSERT,SELECT,UPDATE ON MySchema.Table2 FROM MyRole REVOKE ALTER,DELETE,INSERT,SELECT,UPDATE ON MySchema.Table3 FROM MyRole REVOKE ALTER,DELETE,INSERT,SELECT,UPDATE ON MySchema.Table4 FROM MyRole GO
EXEC sp_DropRole 'MyRole' EXEC sp_AddRole 'MyRole' GO
GRANT ALTER,DELETE,INSERT,SELECT,UPDATE ON MySchema.Table1 TO MyRole GRANT ALTER,DELETE,INSERT,SELECT,UPDATE ON MySchema.Table2 TO MyRole GRANT ALTER,DELETE,INSERT,SELECT,UPDATE ON MySchema.Table3 TO MyRole GRANT ALTER,DELETE,INSERT,SELECT,UPDATE ON MySchema.Table4 TO MyRole GO
Now if I run this script from within SQL Server Management Studio it executes perfectly. The logins add, the role is added, each user is added to the database logins and assigned to the role, the schema is set correctly on each user.
Then when I try to run the exact same script from the SSEUtil application (SSEUTIL -s PCNAMEInstance -run USERS.SQL), it processes everything, except the Logins.
This is frustrating as it means to install for a client I would need to either get them to open the management console and run the script from there, or I have to go to site just to setup users.
Am I on the right track? Or is there another way to automate the adding of Logins?
I downloaded the SSEUtilSetup.EXE and extracted the SSEUtil.exe to a folder of C:drive of my PC that is Windows XP Pro. I plan to learn the CLR programming via user-instance of SQL Server Express. I need to have SQL Server Express Utility installed. Please help and tell me how I can install SSEUtil.exe in my PC and how I use it to interact with SQL Server Express.